Package org.jgrapht.alg
Class StoerWagnerMinimumCut.VertexAndWeight
- java.lang.Object
-
- org.jgrapht.alg.StoerWagnerMinimumCut.VertexAndWeight
-
- All Implemented Interfaces:
java.lang.Comparable<StoerWagnerMinimumCut.VertexAndWeight>
- Enclosing class:
- StoerWagnerMinimumCut<V,E>
protected class StoerWagnerMinimumCut.VertexAndWeight extends java.lang.Object implements java.lang.Comparable<StoerWagnerMinimumCut.VertexAndWeight>
Class for weighted vertices
-
-
Constructor Summary
Constructors Constructor Description VertexAndWeight(java.util.Set<V> v, double w, boolean active)
Construct a new weighted vertex.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(StoerWagnerMinimumCut.VertexAndWeight that)
compareTo that sorts in reverse order because we need extract-max and queue provides extract-min.java.lang.String
toString()
-
-
-
Field Detail
-
vertex
public java.util.Set<V> vertex
-
weight
public java.lang.Double weight
-
active
public boolean active
-
-
Constructor Detail
-
VertexAndWeight
public VertexAndWeight(java.util.Set<V> v, double w, boolean active)
Construct a new weighted vertex.- Parameters:
v
- the vertexw
- the weight of the vertexactive
- whether it is active
-
-
Method Detail
-
compareTo
public int compareTo(StoerWagnerMinimumCut.VertexAndWeight that)
compareTo that sorts in reverse order because we need extract-max and queue provides extract-min.- Specified by:
compareTo
in interfacejava.lang.Comparable<StoerWagnerMinimumCut.VertexAndWeight>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-