public final class Node extends Object
Modifier and Type | Field and Description |
---|---|
Arc[] |
adjacencyList
adjacency list (recorded when degree reaches 2)
|
Arc |
artificial
connects this node to the root
|
int |
balance
balance of the last feasible flow
|
int |
degree
number of connected arcs
|
int |
deltaBalance
change in balance for the next flow computation
|
int |
depth |
int |
initialBalance
for debug only
|
String |
name
a label, great for debugging
|
Node |
parent |
int |
potential
the potential (or dual variable) of the network simplex
|
Node |
thread |
Arc |
toParent |
Modifier and Type | Method and Description |
---|---|
Node |
lca(Node that)
Finds the root of the smallest subtree that contains both this node and
that node.
|
void |
markTree(boolean setMark)
Sets or clears a mark on a subtree rooted at this node
|
Node |
predecessorOnThread()
Finds the predecessor of this node on the thread.
|
Node |
rightMostLeaf()
Finds the last node on the thread that has a larger depth than this node.
|
String |
toString() |
public final int initialBalance
public final String name
public int potential
public int balance
public int deltaBalance
public Arc artificial
public Arc toParent
public Node parent
public Node thread
public int depth
public int degree
public Arc[] adjacencyList
public Node(String name, int balance)
public Node lca(Node that)
that
- another nodepublic Node rightMostLeaf()
public Node predecessorOnThread()
public void markTree(boolean setMark)
setMark
- whether to set or clear the markCopyright © 2015. All rights reserved.