Package org.jgrapht.alg.interfaces
Interface VertexCoverAlgorithm.VertexCover<V>
-
- Type Parameters:
V
- the vertex type
- All Superinterfaces:
java.util.Collection<V>
,java.lang.Iterable<V>
,java.util.Set<V>
- All Known Implementing Classes:
VertexCoverAlgorithm.VertexCoverImpl
- Enclosing interface:
- VertexCoverAlgorithm<V>
public static interface VertexCoverAlgorithm.VertexCover<V> extends java.util.Set<V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getWeight()
Returns the weight of the vertex cover.
-
-
-
Method Detail
-
getWeight
double getWeight()
Returns the weight of the vertex cover. When solving a weighted vertex cover problem, the weight returned is the sum of the weights of the vertices in the vertex cover. When solving the unweighted variant, the cardinality of the vertex cover is returned instead.- Returns:
- weight of the independent set
-
-