... | ... |
@@ -93,22 +93,24 @@ |
93 | 93 |
struct Constraints { |
94 | 94 |
void constraints() { |
95 | 95 |
checkConcept<concepts::Digraph, GR>(); |
96 |
|
|
97 |
const Constraints& me = *this; |
|
96 | 98 |
|
97 |
MCF mcf(g); |
|
99 |
MCF mcf(me.g); |
|
98 | 100 |
const MCF& const_mcf = mcf; |
99 | 101 |
|
100 | 102 |
b = mcf.reset() |
101 |
.lowerMap(lower) |
|
102 |
.upperMap(upper) |
|
103 |
.costMap(cost) |
|
104 |
.supplyMap(sup) |
|
105 |
. |
|
103 |
.lowerMap(me.lower) |
|
104 |
.upperMap(me.upper) |
|
105 |
.costMap(me.cost) |
|
106 |
.supplyMap(me.sup) |
|
107 |
.stSupply(me.n, me.n, me.k) |
|
106 | 108 |
.run(); |
107 | 109 |
|
108 | 110 |
c = const_mcf.totalCost(); |
109 | 111 |
x = const_mcf.template totalCost<double>(); |
110 |
v = const_mcf.flow(a); |
|
111 |
c = const_mcf.potential(n); |
|
112 |
v = const_mcf.flow(me.a); |
|
113 |
c = const_mcf.potential(me.n); |
|
112 | 114 |
const_mcf.flowMap(fm); |
113 | 115 |
const_mcf.potentialMap(pm); |
114 | 116 |
} |
... | ... |
@@ -120,15 +122,16 @@ |
120 | 122 |
typedef concepts::ReadMap<Arc, Cost> CAM; |
121 | 123 |
typedef concepts::WriteMap<Arc, Value> FlowMap; |
122 | 124 |
typedef concepts::WriteMap<Node, Cost> PotMap; |
125 |
|
|
126 |
GR g; |
|
127 |
VAM lower; |
|
128 |
VAM upper; |
|
129 |
CAM cost; |
|
130 |
NM sup; |
|
131 |
Node n; |
|
132 |
Arc a; |
|
133 |
Value k; |
|
123 | 134 |
|
124 |
const GR &g; |
|
125 |
const VAM &lower; |
|
126 |
const VAM &upper; |
|
127 |
const CAM &cost; |
|
128 |
const NM ⊃ |
|
129 |
const Node &n; |
|
130 |
const Arc &a; |
|
131 |
const Value &k; |
|
132 | 135 |
FlowMap fm; |
133 | 136 |
PotMap pm; |
134 | 137 |
bool b; |
0 comments (0 inline)