Package org.jgrapht.alg.interfaces
Interface MinimumVertexCoverAlgorithm.VertexCover<V>
-
- Type Parameters:
V
- the vertex type
- All Known Implementing Classes:
MinimumVertexCoverAlgorithm.VertexCoverImpl
- Enclosing interface:
- MinimumVertexCoverAlgorithm<V,E>
public static interface MinimumVertexCoverAlgorithm.VertexCover<V>
A vertex cover
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<V>
getVertices()
Set of vertices constituting the vertex coverdouble
getWeight()
Returns the weight of the vertex cover.
-
-
-
Method Detail
-
getWeight
double getWeight()
Returns the weight of the vertex cover. When solving the minimum weighted vertex cover problem, the weight returned is the sum of the weights of the vertices in the cover. When solving the unweighted variant, the cardinality of the vertex cover is returned instead.- Returns:
- weight of the vertex cover
-
getVertices
java.util.Set<V> getVertices()
Set of vertices constituting the vertex cover- Returns:
- vertices in the vertex cover
-
-