Package org.graph4j.vsp
Class VertexSeparator
java.lang.Object
org.graph4j.vsp.VertexSeparator
Utility class for representing a vertex separator set.
- Author:
- Cristian Frăsinaru
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVertexSeparator(Graph graph) The default maximum shore size is2n/3, wherenis the number of vertices in the graph.VertexSeparator(Graph graph, int maxShoreSize) VertexSeparator(VertexSet separator, VertexSet leftShore, VertexSet rightShore) Deprecated.VertexSeparator(VertexSeparator other) Copy constructor. -
Method Summary
-
Constructor Details
-
VertexSeparator
The default maximum shore size is2n/3, wherenis the number of vertices in the graph.- Parameters:
graph- the graph on which the separator is defined.
-
VertexSeparator
- Parameters:
graph- the graph on which the separator is defined.maxShoreSize- the maximum shore size.
-
VertexSeparator
Copy constructor.- Parameters:
other- a vertex separator.
-
VertexSeparator
Deprecated.- Parameters:
separator- the separator vertex set.leftShore- the left shore.rightShore- the right shore.
-
-
Method Details
-
separator
- Returns:
- the separator.
-
leftShore
- Returns:
- the left shore.
-
rightShore
- Returns:
- the right shore.
-
contains
public boolean contains(int v) - Parameters:
v- a vertex number.- Returns:
trueif v is covered by any of the three sets.
-
isComplete
public boolean isComplete()- Returns:
trueif all the vertices of the graph are in one of the three sets: leftShore, rightShore or separator.
-
isValid
public boolean isValid()It does not test if it is complete, i.e. it contains all vertices of the graph.- Returns:
trueif the properties of a vertex separator are satisfied.
-
toString
-