java.lang.Object
org.jgrapht.alg.matching.blossom.v5.BlossomVOptions
BlossomVOptions that define the strategies to use during the algorithm for updating duals and
initializing the matching
According to the experimental results, the greedy initialization substantially speeds up the algorithm.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum for choosing dual updates strategystatic enumEnum for types of matching initialization -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a default set of options for the algorithmBlossomVOptions(BlossomVOptions.InitializationType initializationType) Constructs a new options instance with ainitializationTypeBlossomVOptions(BlossomVOptions.InitializationType initializationType, BlossomVOptions.DualUpdateStrategy dualUpdateStrategy, boolean updateDualsBefore, boolean updateDualsAfter) Constructs a custom set of options for the algorithm -
Method Summary
Modifier and TypeMethodDescriptionReturns dual updates strategyReturns initialization typebooleanReturns theupdateDualsAfterflagbooleanReturns theupdateDualsBeforeflagtoString()
-
Field Details
-
ALL_OPTIONS
All possible options
-
-
Constructor Details
-
BlossomVOptions
public BlossomVOptions(BlossomVOptions.InitializationType initializationType, BlossomVOptions.DualUpdateStrategy dualUpdateStrategy, boolean updateDualsBefore, boolean updateDualsAfter) Constructs a custom set of options for the algorithm- Parameters:
dualUpdateStrategy- greedy strategy to update dual variables globallyinitializationType- strategy for initializing the matchingupdateDualsBefore- whether to update duals of the tree before growthupdateDualsAfter- whether to update duals of the tree after growth
-
BlossomVOptions
Constructs a new options instance with ainitializationType- Parameters:
initializationType- defines a strategy to use to initialize the matching
-
BlossomVOptions
public BlossomVOptions()Constructs a default set of options for the algorithm
-
-
Method Details
-
toString
-
isUpdateDualsBefore
public boolean isUpdateDualsBefore()Returns theupdateDualsBeforeflag- Returns:
- the flag
updateDualsBefore
-
isUpdateDualsAfter
public boolean isUpdateDualsAfter()Returns theupdateDualsAfterflag- Returns:
- the flag
updateDualsAfter
-
getDualUpdateStrategy
Returns dual updates strategy- Returns:
- dual updates strategy
-
getInitializationType
Returns initialization type- Returns:
- initialization type
-