Package com.jgalgo
Interface VertexCover.Result
-
- Enclosing interface:
- VertexCover
public static interface VertexCover.ResultA result object ofVertexCovercomputation.The result object is basically the set of vertices that form the cover.
- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisInCover(int vertex)Check whether a vertex is included in the cover.IntCollectionvertices()Get the vertices which are included in the cover.doubleweight(WeightFunction w)Get the weight of the cover with respect to a vertex weight function.
-
-
-
Method Detail
-
vertices
IntCollection vertices()
Get the vertices which are included in the cover.- Returns:
- the vertices that are included in the cover
-
isInCover
boolean isInCover(int vertex)
Check whether a vertex is included in the cover.- Parameters:
vertex- a graph vertex identifier- Returns:
trueifvertexis included in the cover
-
weight
double weight(WeightFunction w)
Get the weight of the cover with respect to a vertex weight function.- Parameters:
w- a vertex weight function- Returns:
- the weight sum of the vertices of the cover
-
-