Computes a min-cost flow using a network simplex method. More...
#include <ogdf/graphalg/MinCostFlowReinelt.h>
Inheritance diagram for ogdf::MinCostFlowReinelt< TCost >:Classes | |
| struct | arctype |
| struct | nodetype |
Public Member Functions | |
| MinCostFlowReinelt () | |
| virtual bool | call (const Graph &G, const EdgeArray< int > &lowerBound, const EdgeArray< int > &upperBound, const EdgeArray< TCost > &cost, const NodeArray< int > &supply, EdgeArray< int > &flow, NodeArray< TCost > &dual) override |
Computes a min-cost flow in the directed graph G using a network simplex method. More... | |
| int | infinity () const |
Public Member Functions inherited from ogdf::MinCostFlowModule< TCost > | |
| MinCostFlowModule () | |
| Initializes a min-cost flow module. More... | |
| virtual | ~MinCostFlowModule () |
| virtual bool | call (const Graph &G, const EdgeArray< int > &lowerBound, const EdgeArray< int > &upperBound, const EdgeArray< TCost > &cost, const NodeArray< int > &supply, EdgeArray< int > &flow) |
Computes a min-cost flow in the directed graph G. More... | |
Private Member Functions | |
| void | beacircle (arctype **eplus, arctype **pre, bool *from_ub) |
| void | beadouble (arctype **eplus, arctype **pre, bool *from_ub) |
| int | mcf (int mcfNrNodes, int mcfNrArcs, Array< int > &mcfSupply, Array< int > &mcfTail, Array< int > &mcfHead, Array< int > &mcfLb, Array< int > &mcfUb, Array< TCost > &mcfCost, Array< int > &mcfFlow, Array< TCost > &mcfDual, TCost *mcfObj) |
| void | start (Array< int > &supply) |
Private Attributes | |
| Array< arctype > | arcs |
| arctype * | last_n1 |
| arctype * | last_n2 |
| EpsilonTest | m_eps |
| TCost | m_maxCost |
| int | mm |
| int | nn |
| Array< nodetype > | nodes |
| nodetype * | root |
| nodetype | rootStruct |
| arctype * | searchend |
| arctype * | searchend_n1 |
| arctype * | searchend_n2 |
| arctype * | start_arc |
| arctype * | start_b |
| arctype * | start_n1 |
| arctype * | start_n2 |
| arctype * | startsearch |
Additional Inherited Members | |
Static Public Member Functions inherited from ogdf::MinCostFlowModule< TCost > | |
| static bool | checkComputedFlow (const Graph &G, EdgeArray< int > &lowerBound, EdgeArray< int > &upperBound, EdgeArray< TCost > &cost, NodeArray< int > &supply, EdgeArray< int > &flow, TCost &value) |
| checks if a computed flow is a feasible solution to the given problem instance. More... | |
| static bool | checkComputedFlow (const Graph &G, EdgeArray< int > &lowerBound, EdgeArray< int > &upperBound, EdgeArray< TCost > &cost, NodeArray< int > &supply, EdgeArray< int > &flow) |
| checks if a computed flow is a feasible solution to the given problem instance. More... | |
| static bool | checkProblem (const Graph &G, const EdgeArray< int > &lowerBound, const EdgeArray< int > &upperBound, const NodeArray< int > &supply) |
| Checks if a given min-cost flow problem instance satisfies the preconditions. More... | |
| static void | generateProblem (Graph &G, int n, int m, EdgeArray< int > &lowerBound, EdgeArray< int > &upperBound, EdgeArray< TCost > &cost, NodeArray< int > &supply) |
Generates an instance of a min-cost flow problem with n nodes and m + n edges. More... | |
Computes a min-cost flow using a network simplex method.
Definition at line 47 of file MinCostFlowReinelt.h.
|
inline |
Definition at line 50 of file MinCostFlowReinelt.h.
|
private |
Definition at line 324 of file MinCostFlowReinelt.h.
|
private |
Definition at line 444 of file MinCostFlowReinelt.h.
|
overridevirtual |
Computes a min-cost flow in the directed graph G using a network simplex method.
G must be connected, lowerBound[e] <= upperBound[e] for all edges e, and the sum over all supplies must be zero.| G | is the directed input graph. |
| lowerBound | gives the lower bound for the flow on each edge. |
| upperBound | gives the upper bound for the flow on each edge. |
| cost | gives the costs for each edge. |
| supply | gives the supply (or demand if negative) of each node. |
| flow | is assigned the computed flow on each edge. |
| dual | is assigned the computed dual variables. |
Implements ogdf::MinCostFlowModule< TCost >.
Definition at line 167 of file MinCostFlowReinelt.h.
|
inline |
Definition at line 81 of file MinCostFlowReinelt.h.
|
private |
->basis leaving arc
Definition at line 611 of file MinCostFlowReinelt.h.
|
private |
Definition at line 270 of file MinCostFlowReinelt.h.
|
private |
Definition at line 133 of file MinCostFlowReinelt.h.
|
private |
Definition at line 139 of file MinCostFlowReinelt.h.
|
private |
Definition at line 140 of file MinCostFlowReinelt.h.
|
private |
Definition at line 130 of file MinCostFlowReinelt.h.
|
private |
Definition at line 151 of file MinCostFlowReinelt.h.
|
private |
Definition at line 154 of file MinCostFlowReinelt.h.
|
private |
Definition at line 153 of file MinCostFlowReinelt.h.
|
private |
Definition at line 132 of file MinCostFlowReinelt.h.
|
private |
Definition at line 136 of file MinCostFlowReinelt.h.
|
private |
Definition at line 137 of file MinCostFlowReinelt.h.
|
private |
Definition at line 146 of file MinCostFlowReinelt.h.
|
private |
Definition at line 147 of file MinCostFlowReinelt.h.
|
private |
Definition at line 148 of file MinCostFlowReinelt.h.
|
private |
Definition at line 141 of file MinCostFlowReinelt.h.
|
private |
Definition at line 142 of file MinCostFlowReinelt.h.
|
private |
Definition at line 143 of file MinCostFlowReinelt.h.
|
private |
Definition at line 144 of file MinCostFlowReinelt.h.
|
private |
Definition at line 145 of file MinCostFlowReinelt.h.