Module org.jgrapht.core
Package org.jgrapht.alg.interfaces
Interface VertexCoverAlgorithm.VertexCover<V>
- Type Parameters:
V
- the vertex type
- All Superinterfaces:
Collection<V>
,Iterable<V>
,Set<V>
- All Known Implementing Classes:
VertexCoverAlgorithm.VertexCoverImpl
- Enclosing interface:
- VertexCoverAlgorithm<V>
-
Method Summary
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Method Details
-
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
-