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
  • Field Summary

    Fields 
    Modifier and Type Field Description
    boolean active  
    java.util.Set<V> vertex  
    java.lang.Double weight  
  • Constructor Summary

    Constructors 
    Constructor Description
    VertexAndWeight​(java.util.Set<V> v, double w, boolean active)
    Construct a new weighted vertex.
  • Method Summary

    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()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • vertex

      public java.util.Set<V> vertex
    • weight

      public java.lang.Double weight
    • active

      public boolean active
  • Constructor Details

    • VertexAndWeight

      public VertexAndWeight​(java.util.Set<V> v, double w, boolean active)
      Construct a new weighted vertex.
      Parameters:
      v - the vertex
      w - the weight of the vertex
      active - whether it is active
  • Method Details