Package com.jgalgo
Interface VertexCover.Result
-
- Enclosing interface:
- VertexCover
public static interface VertexCover.Result
A result object ofVertexCover
computation.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 boolean
isInCover(int vertex)
Check whether a vertex is included in the cover.IntCollection
vertices()
Get the vertices which are included in the cover.double
weight(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:
true
ifvertex
is 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
-
-