0
5
0
... | ... |
@@ -20,3 +20,3 @@ |
20 | 20 |
IF(MSVC) |
21 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996") |
|
21 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4503 /wd4800 /wd4996") |
|
22 | 22 |
# Suppressed warnings: |
... | ... |
@@ -24,2 +24,3 @@ |
24 | 24 |
# C4355: 'this' : used in base member initializer list |
25 |
# C4503: 'function' : decorated name length exceeded, name was truncated |
|
25 | 26 |
# C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning) |
... | ... |
@@ -73,2 +73,7 @@ |
73 | 73 |
|
74 |
/// \brief Assignment operator for INVALID. |
|
75 |
/// |
|
76 |
/// This operator makes the item invalid. |
|
77 |
GraphItem& operator=(Invalid) { return *this; } |
|
78 |
|
|
74 | 79 |
/// \brief Equality operator. |
... | ... |
@@ -98,2 +103,3 @@ |
98 | 103 |
_GraphItem i1; |
104 |
i1=INVALID; |
|
99 | 105 |
_GraphItem i2 = i1; |
... | ... |
@@ -223,10 +229,3 @@ |
223 | 229 |
Edge(const Arc&) {} |
224 |
|
|
225 |
/// \brief Assign an arc to an edge. |
|
226 |
/// |
|
227 |
/// This function assigns an arc to an edge. |
|
228 |
/// Besides the core graph item functionality each arc should |
|
229 |
/// be convertible to the represented edge. |
|
230 |
Edge& operator=(const Arc&) { return *this; } |
|
231 |
}; |
|
230 |
}; |
|
232 | 231 |
|
... | ... |
@@ -355,2 +354,3 @@ |
355 | 354 |
typename _Digraph::Node node; |
355 |
node=INVALID; |
|
356 | 356 |
int nid = digraph.id(node); |
... | ... |
@@ -359,2 +359,3 @@ |
359 | 359 |
typename _Digraph::Arc arc; |
360 |
arc=INVALID; |
|
360 | 361 |
int eid = digraph.id(arc); |
... | ... |
@@ -86,2 +86,8 @@ |
86 | 86 |
|
87 |
Node addNode() { |
|
88 |
LEMON_ASSERT(false, |
|
89 |
"This graph structure does not support node insertion"); |
|
90 |
return INVALID; // avoid warning |
|
91 |
} |
|
92 |
|
|
87 | 93 |
Arc addArc(const Node& u, const Node& v) { |
... | ... |
@@ -418,2 +424,8 @@ |
418 | 424 |
|
425 |
Node addNode() { |
|
426 |
LEMON_ASSERT(false, |
|
427 |
"This graph structure does not support node insertion"); |
|
428 |
return INVALID; // avoid warning |
|
429 |
} |
|
430 |
|
|
419 | 431 |
Edge addEdge(const Node& u, const Node& v) { |
... | ... |
@@ -818,2 +830,8 @@ |
818 | 830 |
|
831 |
Node addNode() { |
|
832 |
LEMON_ASSERT(false, |
|
833 |
"This graph structure does not support node insertion"); |
|
834 |
return INVALID; // avoid warning |
|
835 |
} |
|
836 |
|
|
819 | 837 |
Arc addArc(const Node& u, const Node& v) { |
... | ... |
@@ -1114,2 +1132,8 @@ |
1114 | 1132 |
|
1133 |
Node addNode() { |
|
1134 |
LEMON_ASSERT(false, |
|
1135 |
"This graph structure does not support node insertion"); |
|
1136 |
return INVALID; // avoid warning |
|
1137 |
} |
|
1138 |
|
|
1115 | 1139 |
Edge addEdge(const Node& u, const Node& v) { |
... | ... |
@@ -95,4 +95,6 @@ |
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; |
... | ... |
@@ -100,7 +102,7 @@ |
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(); |
... | ... |
@@ -109,4 +111,4 @@ |
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); |
... | ... |
@@ -122,11 +124,12 @@ |
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; |
0 comments (0 inline)