protected class NetworkSimplex.NSNode extends Object
Modifier and Type | Field and Description |
---|---|
(package private) NetworkSimplex.NSArc |
arcToParent
The arc connecting this node to its parent in the BFS tree
|
(package private) NetworkSimplex.NSArc |
artificialArc
The artificial arc associated to this node
|
(package private) int |
depth
The depth in the BFS tree
|
(package private) String |
id
Node id.
|
(package private) NetworkSimplex.NSNode |
parent
Parent in the BFS tree
|
(package private) BigMNumber |
potential
Node potential
|
(package private) int |
supply
Node supply (or demand if negative).
|
(package private) NetworkSimplex.NSNode |
thread
The next node in the preorder traversal of the BFS tree
|
Constructor and Description |
---|
NSNode()
Default constructor.
|
NSNode(Node node)
Creates a copy of a node.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
changeParent(NetworkSimplex.NSNode newParent,
NetworkSimplex.NSArc newArcToParent)
Changes the parent of this node.
|
(package private) void |
computePotential()
Computes the potential of this node knowing the potential of its
father
|
(package private) void |
createArtificialArc()
Creates the artificial arc corresponding to this node and puts it in
the BFS
|
(package private) NetworkSimplex.NSNode |
lastSuccessor()
Finds the rightmost node of the subtree of this node when following
the thread.
|
(package private) NetworkSimplex.NSNode |
previousInThread()
Finds the previous node in the preorder traversal of the BFS tree
|
int supply
BigMNumber potential
NetworkSimplex.NSNode parent
NetworkSimplex.NSNode thread
int depth
NetworkSimplex.NSArc arcToParent
NetworkSimplex.NSArc artificialArc
NSNode()
void createArtificialArc()
NetworkSimplex.NSNode previousInThread()
NetworkSimplex.NSNode lastSuccessor()
void computePotential()
void changeParent(NetworkSimplex.NSNode newParent, NetworkSimplex.NSArc newArcToParent)
newParent
- the new parentnewArcToParent
- the arc to the new parentWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses