Class NetworkGenerator.Node

  • Enclosing class:
    NetworkGenerator<V,​E>

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

      • graphVertex

        V graphVertex
        Graph vertex counterpart of this node.
      • supply

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

        java.util.List<NetworkGenerator.Node> chainNodes
        List of chain nodes. This list is empty for t-nodes and sinks.
    • Constructor Detail

      • 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 Detail

      • getLastInChain

        NetworkGenerator.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object