C++ Reference
C++ Reference: Graph
SimpleMinCostFlow
Detailed Description
Definition at line 213 of file min_cost_flow.h.
Public Types | |
enum | Status { NOT_SOLVED, OPTIMAL, FEASIBLE, INFEASIBLE, UNBALANCED, BAD_RESULT, BAD_COST_RANGE } |
Public Member Functions | |
SimpleMinCostFlow (NodeIndex reserve_num_nodes=0, ArcIndex reserve_num_arcs=0) | |
ArcIndex | AddArcWithCapacityAndUnitCost (NodeIndex tail, NodeIndex head, FlowQuantity capacity, CostValue unit_cost) |
void | SetNodeSupply (NodeIndex node, FlowQuantity supply) |
Status | Solve () |
Status | SolveMaxFlowWithMinCost () |
CostValue | OptimalCost () const |
FlowQuantity | MaximumFlow () const |
FlowQuantity | Flow (ArcIndex arc) const |
NodeIndex | NumNodes () const |
ArcIndex | NumArcs () const |
NodeIndex | Tail (ArcIndex arc) const |
NodeIndex | Head (ArcIndex arc) const |
FlowQuantity | Capacity (ArcIndex arc) const |
FlowQuantity | Supply (NodeIndex node) const |
CostValue | UnitCost (ArcIndex arc) const |
Member Enumeration Documentation
◆ Status
|
inherited |
Enumerator | |
---|---|
NOT_SOLVED | |
OPTIMAL | |
FEASIBLE | |
INFEASIBLE | |
UNBALANCED | |
BAD_RESULT | |
BAD_COST_RANGE |
Definition at line 194 of file min_cost_flow.h.
Constructor & Destructor Documentation
◆ SimpleMinCostFlow()
|
explicit |
Member Function Documentation
◆ AddArcWithCapacityAndUnitCost()
ArcIndex AddArcWithCapacityAndUnitCost | ( | NodeIndex | tail, |
NodeIndex | head, | ||
FlowQuantity | capacity, | ||
CostValue | unit_cost | ||
) |
◆ Capacity()
FlowQuantity Capacity | ( | ArcIndex | arc | ) | const |
◆ Flow()
FlowQuantity Flow | ( | ArcIndex | arc | ) | const |
◆ Head()
◆ MaximumFlow()
FlowQuantity MaximumFlow | ( | ) | const |
◆ NumArcs()
ArcIndex NumArcs | ( | ) | const |
◆ NumNodes()
NodeIndex NumNodes | ( | ) | const |
◆ OptimalCost()
CostValue OptimalCost | ( | ) | const |
◆ SetNodeSupply()
void SetNodeSupply | ( | NodeIndex | node, |
FlowQuantity | supply | ||
) |
◆ Solve()
|
inline |
Definition at line 243 of file min_cost_flow.h.
◆ SolveMaxFlowWithMinCost()
|
inline |
Definition at line 252 of file min_cost_flow.h.
◆ Supply()
FlowQuantity Supply | ( | NodeIndex | node | ) | const |
◆ Tail()
◆ UnitCost()
The documentation for this class was generated from the following file: