protected class NetworkSimplex.NSArc extends Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
capacity
Arc capacity.
|
(package private) BigMNumber |
cost
Arc cost.
|
(package private) int |
flow
Flow on this arc in the current BFS
|
(package private) String |
id
Arc id.
|
(package private) NetworkSimplex.NSNode |
source
Source node
|
(package private) NetworkSimplex.ArcStatus |
status
Status of this arc in the current BFS
|
(package private) NetworkSimplex.NSNode |
target
Target node
|
Constructor and Description |
---|
NSArc()
Default constructor.
|
NSArc(Edge edge,
boolean sameDirection)
Creates a copy of an edge of the original graph
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
changeFlow(int delta,
NetworkSimplex.NSNode first)
Changes the flow on this arc.
|
(package private) void |
computeAllowedFlowChange(NetworkSimplex.NSNode first,
BigMNumber flowChange)
Computes the maximum allowed flow change ot this arc.
|
(package private) void |
computeReducedCost(BigMNumber reducedCost)
Computes the reduced cost of this arc
|
(package private) NetworkSimplex.NSNode |
getOpposite(NetworkSimplex.NSNode node)
Returns the node on the other side.
|
(package private) String |
getOriginalId()
Returns the id of the edge of the original graph corresponding to
this arc.
|
boolean |
isArtificial()
Checks if this arc is artificial.
|
(package private) void |
setUIClass()
Sets the label and the
"ui.class" attribute of the edge (or
node if the arc is artificial) of the original graph corresponding to
this arc. |
(package private) void |
switchDirection()
Switches arc direction.
|
String id
int capacity
BigMNumber cost
NetworkSimplex.NSNode source
NetworkSimplex.NSNode target
int flow
NetworkSimplex.ArcStatus status
NSArc(Edge edge, boolean sameDirection)
edge
- an edge of the original graphsameDirection
- true if the arc must have the same direction as the
original edgeNSArc()
void computeReducedCost(BigMNumber reducedCost)
reducedCost
- The result is stored herevoid computeAllowedFlowChange(NetworkSimplex.NSNode first, BigMNumber flowChange)
first
- One of the endpoints of the arc. Determines the direction
in the cycle.flowChange
- The result is stored herevoid changeFlow(int delta, NetworkSimplex.NSNode first)
delta
- Flow changefirst
- One of the endpoints of the arc. Determines the direction
of the cycleNetworkSimplex.NSNode getOpposite(NetworkSimplex.NSNode node)
node
- One of the endpoints of this arcpublic boolean isArtificial()
String getOriginalId()
void setUIClass()
"ui.class"
attribute of the edge (or
node if the arc is artificial) of the original graph corresponding to
this arc.void switchDirection()
NetworkSimplex.changeSupply(NSNode, int)
for artificial basic
arcs.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses