Class BoykovKolmogorovMFImpl.VertexExtension

All Implemented Interfaces:
Extension
Enclosing class:
BoykovKolmogorovMFImpl<V,E>

private class BoykovKolmogorovMFImpl.VertexExtension extends MaximumFlowAlgorithmBase<V,E>.VertexExtensionBase
Network vertex extension used to store auxiliary vertex information.
  • Field Details

    • timestamp

      long timestamp
      This vertex timestamp. The timestamp is the last iteration in which the distance to terminal of this vertex was updated. If this value isn't equal to the most recent iteration index, the distance value may be outdated.
    • distance

      int distance
      The distance of this vertex to a terminal vertex (network source or sink). This value may not represent the actual distance as it's not updated every iteration.
    • active

      boolean active
      If this vertex is in the active vertex list.
    • parentEdge

      Edge to the tree parent.
    • treeStatus

      Tree status of this vertex.
  • Constructor Details

    • VertexExtension

      VertexExtension()
      Creates a new free vertex.
  • Method Details

    • isSourceTreeVertex

      boolean isSourceTreeVertex()
      Checks if this vertex belongs to the source tree.
      Returns:
      true if this vertex belongs to the source tree, false otherwise.
    • isSinkTreeVertex

      boolean isSinkTreeVertex()
      Checks if this vertex belongs to the sink tree.
      Returns:
      true if this vertex belongs to the sink tree, false otherwise.
    • isFreeVertex

      boolean isFreeVertex()
      Checks if this vertex belongs to no tree, i.e. is a free vertex.
      Returns:
      true if this vertex is free, false otherwise.
    • makeOrphan

      void makeOrphan()
      Disconnects this vertex from its parent.
    • getParent

      Returns the parent of this vertex.
      Returns:
      the parent of this vertex.
    • toString

      public String toString()
      Overrides:
      toString in class Object