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 enum
Enum for choosing dual updates strategystatic enum
Enum for types of matching initialization -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BlossomVOptions[]
All possible optionsprivate static final BlossomVOptions.DualUpdateStrategy
Default dual updates strategyprivate static final BlossomVOptions.InitializationType
Default algorithm initialization typeprivate static final boolean
Default value for the flagupdateDualsAfter
private static final boolean
Default value for the flagupdateDualsBefore
(package private) BlossomVOptions.DualUpdateStrategy
What greedy strategy to use to perform a global dual update(package private) BlossomVOptions.InitializationType
What strategy to choose to initialize the matching before the main phase of the algorithm(package private) boolean
Whether to update duals of the tree after growth(package private) boolean
Whether to update duals of the tree before growth -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a default set of options for the algorithmBlossomVOptions
(BlossomVOptions.InitializationType initializationType) Constructs a new options instance with ainitializationType
BlossomVOptions
(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 typeboolean
Returns theupdateDualsAfter
flagboolean
Returns theupdateDualsBefore
flagtoString()
-
Field Details
-
ALL_OPTIONS
All possible options -
DEFAULT_INITIALIZATION_TYPE
Default algorithm initialization type -
DEFAULT_DUAL_UPDATE_TYPE
Default dual updates strategy -
DEFAULT_UPDATE_DUALS_BEFORE
private static final boolean DEFAULT_UPDATE_DUALS_BEFOREDefault value for the flagupdateDualsBefore
- See Also:
-
DEFAULT_UPDATE_DUALS_AFTER
private static final boolean DEFAULT_UPDATE_DUALS_AFTERDefault value for the flagupdateDualsAfter
- See Also:
-
dualUpdateStrategy
BlossomVOptions.DualUpdateStrategy dualUpdateStrategyWhat greedy strategy to use to perform a global dual update -
initializationType
BlossomVOptions.InitializationType initializationTypeWhat strategy to choose to initialize the matching before the main phase of the algorithm -
updateDualsBefore
boolean updateDualsBeforeWhether to update duals of the tree before growth -
updateDualsAfter
boolean updateDualsAfterWhether to update duals of the tree after growth
-
-
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:
initializationType
- strategy for initializing the matchingdualUpdateStrategy
- greedy strategy to update dual variables globallyupdateDualsBefore
- 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 theupdateDualsBefore
flag- Returns:
- the flag
updateDualsBefore
-
isUpdateDualsAfter
public boolean isUpdateDualsAfter()Returns theupdateDualsAfter
flag- Returns:
- the flag
updateDualsAfter
-
getDualUpdateStrategy
Returns dual updates strategy- Returns:
- dual updates strategy
-
getInitializationType
Returns initialization type- Returns:
- initialization type
-