- java.lang.Object
-
- org.jgrapht.alg.matching.blossom.v5.BlossomVOptions
-
public class BlossomVOptions extends java.lang.ObjectBlossomVOptions that define the strategies to use during the algorithm for updating duals and initializing the matchingAccording to the experimental results, the greedy initialization substantially speeds up the algorithm.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlossomVOptions.DualUpdateStrategyEnum for choosing dual updates strategystatic classBlossomVOptions.InitializationTypeEnum for types of matching initialization
-
Field Summary
Fields Modifier and Type Field Description static BlossomVOptions[]ALL_OPTIONSAll possible optionsprivate static BlossomVOptions.DualUpdateStrategyDEFAULT_DUAL_UPDATE_TYPEDefault dual updates strategyprivate static BlossomVOptions.InitializationTypeDEFAULT_INITIALIZATION_TYPEDefault algorithm initialization typeprivate static booleanDEFAULT_UPDATE_DUALS_AFTERDefault value for the flagupdateDualsAfterprivate static booleanDEFAULT_UPDATE_DUALS_BEFOREDefault value for the flagupdateDualsBefore(package private) BlossomVOptions.DualUpdateStrategydualUpdateStrategyWhat greedy strategy to use to perform a global dual update(package private) BlossomVOptions.InitializationTypeinitializationTypeWhat strategy to choose to initialize the matching before the main phase of the algorithm(package private) booleanupdateDualsAfterWhether to update duals of the tree after growth(package private) booleanupdateDualsBeforeWhether to update duals of the tree before growth
-
Constructor Summary
Constructors Constructor Description BlossomVOptions()Constructs 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlossomVOptions.DualUpdateStrategygetDualUpdateStrategy()Returns dual updates strategyBlossomVOptions.InitializationTypegetInitializationType()Returns initialization typebooleanisUpdateDualsAfter()Returns theupdateDualsAfterflagbooleanisUpdateDualsBefore()Returns theupdateDualsBeforeflagjava.lang.StringtoString()
-
-
-
Field Detail
-
ALL_OPTIONS
public static final BlossomVOptions[] ALL_OPTIONS
All possible options
-
DEFAULT_INITIALIZATION_TYPE
private static final BlossomVOptions.InitializationType DEFAULT_INITIALIZATION_TYPE
Default algorithm initialization type
-
DEFAULT_DUAL_UPDATE_TYPE
private static final BlossomVOptions.DualUpdateStrategy DEFAULT_DUAL_UPDATE_TYPE
Default dual updates strategy
-
DEFAULT_UPDATE_DUALS_BEFORE
private static final boolean DEFAULT_UPDATE_DUALS_BEFORE
Default value for the flagupdateDualsBefore- See Also:
- Constant Field Values
-
DEFAULT_UPDATE_DUALS_AFTER
private static final boolean DEFAULT_UPDATE_DUALS_AFTER
Default value for the flagupdateDualsAfter- See Also:
- Constant Field Values
-
dualUpdateStrategy
BlossomVOptions.DualUpdateStrategy dualUpdateStrategy
What greedy strategy to use to perform a global dual update
-
initializationType
BlossomVOptions.InitializationType initializationType
What strategy to choose to initialize the matching before the main phase of the algorithm
-
updateDualsBefore
boolean updateDualsBefore
Whether to update duals of the tree before growth
-
updateDualsAfter
boolean updateDualsAfter
Whether to update duals of the tree after growth
-
-
Constructor Detail
-
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
public BlossomVOptions(BlossomVOptions.InitializationType initializationType)
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 Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isUpdateDualsBefore
public boolean isUpdateDualsBefore()
Returns theupdateDualsBeforeflag- Returns:
- the flag
updateDualsBefore
-
isUpdateDualsAfter
public boolean isUpdateDualsAfter()
Returns theupdateDualsAfterflag- Returns:
- the flag
updateDualsAfter
-
getDualUpdateStrategy
public BlossomVOptions.DualUpdateStrategy getDualUpdateStrategy()
Returns dual updates strategy- Returns:
- dual updates strategy
-
getInitializationType
public BlossomVOptions.InitializationType getInitializationType()
Returns initialization type- Returns:
- initialization type
-
-