Module org.jgrapht.core
Package org.jgrapht.alg.flow.mincost
Class CapacityScalingMinimumCostFlow.Node
java.lang.Object
org.jgrapht.alg.flow.mincost.CapacityScalingMinimumCostFlow.Node
- Enclosing class:
CapacityScalingMinimumCostFlow<V,
E>
Supporting data structure for the
CapacityScalingMinimumCostFlow
.
Is used as an internal representation of the vertices of the flow network. Contains all information needed during the computation.
- Since:
- July 2018
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
The excess of this node.(package private) CapacityScalingMinimumCostFlow.Arc
Reference of the first outgoing non-saturated arc (with positive residual capacity) incident to this node.(package private) CapacityScalingMinimumCostFlow.Arc
Reference of the first outgoing saturated arc (with zero residual capacity) incident to this node(package private) org.jheaps.AddressableHeap.Handle
<Double, CapacityScalingMinimumCostFlow.Node> Reference to theinvalid reference
FibonacciHeapNode
private int
Variable for debug purposes(package private) int
The label of this node.private static int
Variable for debug purposes(package private) CapacityScalingMinimumCostFlow.Arc
An arc on the augmenting path which head is this node.(package private) double
The dual variable of this node. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) CapacityScalingMinimumCostFlow.Arc
addArcTo
(CapacityScalingMinimumCostFlow.Node opposite, int capacity, double cost) Adds a new arc withcapacity
,cost
to theopposite
.toString()
-
Field Details
-
nextID
private static int nextIDVariable for debug purposes -
handle
org.jheaps.AddressableHeap.Handle<Double,CapacityScalingMinimumCostFlow.Node> handleReference to theinvalid reference
FibonacciHeapNode
-
parentArc
CapacityScalingMinimumCostFlow.Arc parentArcAn arc on the augmenting path which head is this node. -
labelType
int labelTypeThe label of this node. Is used to distinguish temporarily and permanently labeled nodes during the Dijkstra's algorithm -
excess
int excessThe excess of this node. If this value is positive, then this is a source node. If this value is 0, then this is a transhipment node. If this value if negative, this is a sink node. -
potential
double potentialThe dual variable of this node. This is used to search for an augmenting path in the residual network using the reduced costs of the arcs as arc lengths. -
firstSaturated
CapacityScalingMinimumCostFlow.Arc firstSaturatedReference of the first outgoing saturated arc (with zero residual capacity) incident to this node -
firstNonSaturated
CapacityScalingMinimumCostFlow.Arc firstNonSaturatedReference of the first outgoing non-saturated arc (with positive residual capacity) incident to this node. -
id
private int idVariable for debug purposes
-
-
Constructor Details
-
Node
public Node(int excess) Constructs a new node withexcess
- Parameters:
excess
- the excess of this node
-
-
Method Details
-
addArcTo
CapacityScalingMinimumCostFlow.Arc addArcTo(CapacityScalingMinimumCostFlow.Node opposite, int capacity, double cost) Adds a new arc withcapacity
,cost
to theopposite
. This method also creates a reverse arc with zero capacity and-cost
.- Parameters:
opposite
- the head of the resulting arc.capacity
- the capacity of the resulting arc.cost
- the cost of the resulting arc- Returns:
- the resulting arc to the
opposite
node
-
toString
-