Class BlossomVOptions
- java.lang.Object
-
- org.jgrapht.alg.matching.blossom.v5.BlossomVOptions
-
public class BlossomVOptions extends java.lang.Object
BlossomVOptions 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 class
BlossomVOptions.DualUpdateStrategy
Enum for choosing dual updates strategystatic class
BlossomVOptions.InitializationType
Enum for types of matching initialization
-
Field Summary
Fields Modifier and Type Field Description static BlossomVOptions[]
ALL_OPTIONS
All possible options
-
Constructor Summary
Constructors Constructor Description BlossomVOptions()
Constructs 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlossomVOptions.DualUpdateStrategy
getDualUpdateStrategy()
Returns dual updates strategyBlossomVOptions.InitializationType
getInitializationType()
Returns initialization typeboolean
isUpdateDualsAfter()
Returns theupdateDualsAfter
flagboolean
isUpdateDualsBefore()
Returns theupdateDualsBefore
flagjava.lang.String
toString()
-
-
-
Field Detail
-
ALL_OPTIONS
public static final BlossomVOptions[] ALL_OPTIONS
All possible options
-
-
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:
toString
in classjava.lang.Object
-
isUpdateDualsBefore
public boolean isUpdateDualsBefore()
Returns theupdateDualsBefore
flag- Returns:
- the flag
updateDualsBefore
-
isUpdateDualsAfter
public boolean isUpdateDualsAfter()
Returns theupdateDualsAfter
flag- 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
-
-