Package com.jgalgo.alg
Interface MatchingAlgo.Builder
-
- All Superinterfaces:
AlgorithmBuilderBase
- Enclosing interface:
- MatchingAlgo
public static interface MatchingAlgo.Builder extends AlgorithmBuilderBase
A builder forMatchingAlgo
objects.- Author:
- Barak Ugav
- See Also:
MatchingAlgo.builder()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MatchingAlgo
build()
Create a new matching algorithm object.MatchingAlgo.Builder
setBipartite(boolean bipartite)
Set whether the matching algorithms built by this builder should only support bipartite graphs.MatchingAlgo.Builder
setCardinality(boolean cardinality)
Set whether the matching algorithms built by this builder should support only maximum cardinality matching.-
Methods inherited from interface com.jgalgo.alg.AlgorithmBuilderBase
setOption
-
-
-
-
Method Detail
-
build
MatchingAlgo build()
Create a new matching algorithm object.- Returns:
- a new matching algorithm
-
setBipartite
MatchingAlgo.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
MatchingAlgo.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
-
-