Class NetworkGenerator.Node

java.lang.Object
org.jgrapht.generate.netgen.NetworkGenerator.Node
Enclosing class:
NetworkGenerator<V,E>

private class NetworkGenerator.Node extends Object
Internal representation of network nodes. This class is used to store auxiliary information during generation process.
  • Field Details

    • graphVertex

      V graphVertex
      Graph vertex counterpart of this node.
    • supply

      int supply
      Supply units of this node. This value is 0 for t-nodes.
    • type

      Type of this node.
    • chainNodes

      List<NetworkGenerator<V,E>.Node> chainNodes
      List of chain nodes. This list is empty for t-nodes and sinks.
  • Constructor Details

    • Node

      Node(V graphVertex, NetworkGenerator.NodeType type)
      Creates a new node using graphVertex and type.
      Parameters:
      graphVertex - network vertex.
      type - type of this node.
  • Method Details

    • getLastInChain

      NetworkGenerator<V,E>.Node getLastInChain()
      Returns the last node of this node's chain.
      Returns:
      the last node of this node's chain.
    • getChainLength

      int getChainLength()
      Returns the length of this node's chain.
      Returns:
      the length of this node's chain.
    • toString

      public String toString()
      Overrides:
      toString in class Object