Module org.jgrapht.core
Package org.jgrapht.alg.interfaces
Interface IndependentSetAlgorithm.IndependentSet<V>
-
- Type Parameters:
V
- the vertex type
- All Superinterfaces:
Collection<V>
,Iterable<V>
,Set<V>
- All Known Implementing Classes:
IndependentSetAlgorithm.IndependentSetImpl
- Enclosing interface:
- IndependentSetAlgorithm<V>
public static interface IndependentSetAlgorithm.IndependentSet<V> extends Set<V>
A (weighted) Independent Set
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getWeight()
Returns the weight of the independent set.-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Method Detail
-
getWeight
double getWeight()
Returns the weight of the independent set. When solving a weighted independent set problem, the weight returned is the sum of the weights of the vertices in the independent set. When solving the unweighted variant, the cardinality of the independent set is returned instead.- Returns:
- weight of the independent set
-
-