Package com.jgalgo
Interface MatchingAlgorithm.Builder
-
- All Superinterfaces:
com.jgalgo.internal.util.BuilderAbstract<MatchingAlgorithm.Builder>
- Enclosing interface:
- MatchingAlgorithm
public static interface MatchingAlgorithm.Builder extends com.jgalgo.internal.util.BuilderAbstract<MatchingAlgorithm.Builder>
A builder forMatchingAlgorithm
objects.- Author:
- Barak Ugav
- See Also:
MatchingAlgorithm.newBuilder()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MatchingAlgorithm
build()
Create a new matching algorithm object.MatchingAlgorithm.Builder
setBipartite(boolean bipartite)
Set whether the matching algorithms built by this builder should only support bipartite graphs.MatchingAlgorithm.Builder
setCardinality(boolean cardinality)
Set whether the matching algorithms built by this builder should support only maximum cardinality matching.
-
-
-
Method Detail
-
build
MatchingAlgorithm build()
Create a new matching algorithm object.- Returns:
- a new matching algorithm
-
setBipartite
MatchingAlgorithm.Builder setBipartite(boolean bipartite)
Set whether the matching algorithms built by this builder should only support bipartite graphs.If the input graphs are known to be bipartite, simpler or more efficient algorithm may exists.
- Parameters:
bipartite
- iftrue
, the created matching algorithms will support bipartite graphs only- Returns:
- this builder
-
setCardinality
MatchingAlgorithm.Builder setCardinality(boolean cardinality)
Set whether the matching algorithms built by this builder should support only maximum cardinality matching.For cardinality weights, simpler or more efficient algorithm may exists.
- Parameters:
cardinality
- iftrue
, the created matching algorithms will support maximum cardinality matching only- Returns:
- this builder
-
-