java.lang.Object
org.jgrapht.alg.StoerWagnerMinimumCut.VertexAndWeight
- All Implemented Interfaces:
Comparable<StoerWagnerMinimumCut<V,
E>.VertexAndWeight>
- Enclosing class:
- StoerWagnerMinimumCut<V,
E>
protected class StoerWagnerMinimumCut.VertexAndWeight
extends Object
implements Comparable<StoerWagnerMinimumCut<V,E>.VertexAndWeight>
Class for weighted vertices
-
Field Summary
-
Constructor Summary
ConstructorDescriptionVertexAndWeight
(Set<V> v, double w, boolean active) Construct a new weighted vertex. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo that sorts in reverse order because we need extract-max and queue provides extract-min.toString()
-
Field Details
-
vertex
-
weight
-
active
public boolean active
-
-
Constructor Details
-
VertexAndWeight
Construct a new weighted vertex.- Parameters:
v
- the vertexw
- the weight of the vertexactive
- whether it is active
-
-
Method Details
-
compareTo
compareTo that sorts in reverse order because we need extract-max and queue provides extract-min.- Specified by:
compareTo
in interfaceComparable<StoerWagnerMinimumCut<V,
E>.VertexAndWeight>
-
toString
-