Package org.graph4j.vsp
Class GreedyVertexSeparator
java.lang.Object
org.graph4j.SimpleGraphAlgorithm
org.graph4j.vsp.VertexSeparatorBase
org.graph4j.vsp.GreedyVertexSeparator
- All Implemented Interfaces:
VertexSeparatorAlgorithm
There is no guarantee that the vertex separator created by the greedy algorithm is of minimum size.
- Author:
- Cristian Frăsinaru
-
Field Summary
Fields inherited from class org.graph4j.vsp.VertexSeparatorBase
maxShoreSize, solutionFields inherited from class org.graph4j.SimpleGraphAlgorithm
graph -
Constructor Summary
ConstructorsConstructorDescriptionGreedyVertexSeparator(Graph graph) GreedyVertexSeparator(Graph graph, int maxShoreSize) -
Method Summary
Modifier and TypeMethodDescriptionComputes and returns a vertex separator set.Methods inherited from class org.graph4j.vsp.VertexSeparatorBase
maxShoreSizeMethods inherited from class org.graph4j.SimpleGraphAlgorithm
getGraphMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.graph4j.vsp.VertexSeparatorAlgorithm
getGraph
-
Constructor Details
-
GreedyVertexSeparator
-
GreedyVertexSeparator
-
-
Method Details
-
getSeparator
Computes and returns a vertex separator set. There is no guarantee that the vertex separator returned is of minimum size. The right shore may be empty (in case of complete graphs, for example).- Specified by:
getSeparatorin interfaceVertexSeparatorAlgorithm- Specified by:
getSeparatorin classVertexSeparatorBase- Returns:
- a vertex separator set.
-