- java.lang.Object
-
- org.jgrapht.generate.netgen.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 Summary
Fields Modifier and Type Field Description (package private) java.util.List<NetworkGenerator.Node>
chainNodes
List of chain nodes.(package private) V
graphVertex
Graph vertex counterpart of this node.(package private) int
supply
Supply units of this node.(package private) NetworkGenerator.NodeType
type
Type of this node.
-
Constructor Summary
Constructors Constructor Description Node(V graphVertex, NetworkGenerator.NodeType type)
Creates a new node usinggraphVertex
andtype
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
getChainLength()
Returns the length of this node's chain.(package private) NetworkGenerator.Node
getLastInChain()
Returns the last node of this node's chain.java.lang.String
toString()
-
-
-
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.
-
type
NetworkGenerator.NodeType type
Type of this node.
-
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 usinggraphVertex
andtype
.- 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 classjava.lang.Object
-
-