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>
private static class CapacityScalingMinimumCostFlow.Node extends java.lang.Object
Supporting data structure for theCapacityScalingMinimumCostFlow
.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
Fields Modifier and Type Field Description (package private) int
excess
The excess of this node.(package private) CapacityScalingMinimumCostFlow.Arc
firstNonSaturated
Reference of the first outgoing non-saturated arc (with positive residual capacity) incident to this node.(package private) CapacityScalingMinimumCostFlow.Arc
firstSaturated
Reference of the first outgoing saturated arc (with zero residual capacity) incident to this node(package private) org.jheaps.AddressableHeap.Handle<java.lang.Double,CapacityScalingMinimumCostFlow.Node>
handle
Reference to theFibonacciHeapNode
this node is contained inprivate int
id
Variable for debug purposes(package private) int
labelType
The label of this node.private static int
nextID
Variable for debug purposes(package private) CapacityScalingMinimumCostFlow.Arc
parentArc
An arc on the augmenting path which head is this node.(package private) double
potential
The dual variable of this node.
-
Constructor Summary
Constructors Constructor Description Node(int excess)
Constructs a new node withexcess
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) CapacityScalingMinimumCostFlow.Arc
addArcTo(CapacityScalingMinimumCostFlow.Node opposite, int capacity, double cost)
Adds a new arc withcapacity
,cost
to theopposite
.java.lang.String
toString()
-
-
-
Field Detail
-
nextID
private static int nextID
Variable for debug purposes
-
handle
org.jheaps.AddressableHeap.Handle<java.lang.Double,CapacityScalingMinimumCostFlow.Node> handle
Reference to theFibonacciHeapNode
this node is contained in
-
parentArc
CapacityScalingMinimumCostFlow.Arc parentArc
An arc on the augmenting path which head is this node.
-
labelType
int labelType
The label of this node. Is used to distinguish temporarily and permanently labeled nodes during the Dijkstra's algorithm
-
excess
int excess
The 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 potential
The 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 firstSaturated
Reference of the first outgoing saturated arc (with zero residual capacity) incident to this node
-
firstNonSaturated
CapacityScalingMinimumCostFlow.Arc firstNonSaturated
Reference of the first outgoing non-saturated arc (with positive residual capacity) incident to this node.
-
id
private int id
Variable for debug purposes
-
-
Method Detail
-
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-