0
24
0
2
2
1
1
1
1
1
1
4
4
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -71,7 +71,7 @@ |
71 | 71 |
\dir bits |
72 | 72 |
\brief Auxiliary tools for implementation. |
73 | 73 |
|
74 |
This directory contains some auxiliary classes for implementing graphs, |
|
74 |
This directory contains some auxiliary classes for implementing graphs, |
|
75 | 75 |
maps and some other classes. |
76 | 76 |
As a user you typically don't have to deal with these files. |
77 | 77 |
*/ |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -303,7 +303,7 @@ |
303 | 303 |
@defgroup map_concepts Map Concepts |
304 | 304 |
@ingroup concept |
305 | 305 |
\brief Skeleton and concept checking classes for maps |
306 |
|
|
306 |
|
|
307 | 307 |
This group describes the skeletons and concept checking classes of maps. |
308 | 308 |
*/ |
309 | 309 |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -96,7 +96,7 @@ |
96 | 96 |
SYSTEMTIME time; |
97 | 97 |
GetSystemTime(&time); |
98 | 98 |
char buf1[11], buf2[9], buf3[5]; |
99 |
|
|
99 |
if (GetDateFormat(MY_LOCALE, 0, &time, |
|
100 | 100 |
("ddd MMM dd"), buf1, 11) && |
101 | 101 |
GetTimeFormat(MY_LOCALE, 0, &time, |
102 | 102 |
("HH':'mm':'ss"), buf2, 9) && |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -391,7 +391,7 @@ |
391 | 391 |
class DigraphReader; |
392 | 392 |
|
393 | 393 |
template <typename Digraph> |
394 |
DigraphReader<Digraph> digraphReader(Digraph& digraph, |
|
394 |
DigraphReader<Digraph> digraphReader(Digraph& digraph, |
|
395 | 395 |
std::istream& is = std::cin); |
396 | 396 |
template <typename Digraph> |
397 | 397 |
DigraphReader<Digraph> digraphReader(Digraph& digraph, const std::string& fn); |
... | ... |
@@ -563,7 +563,7 @@ |
563 | 563 |
template <typename DGR> |
564 | 564 |
friend DigraphReader<DGR> digraphReader(DGR& digraph, std::istream& is); |
565 | 565 |
template <typename DGR> |
566 |
friend DigraphReader<DGR> digraphReader(DGR& digraph, |
|
566 |
friend DigraphReader<DGR> digraphReader(DGR& digraph, |
|
567 | 567 |
const std::string& fn); |
568 | 568 |
template <typename DGR> |
569 | 569 |
friend DigraphReader<DGR> digraphReader(DGR& digraph, const char *fn); |
... | ... |
@@ -1229,9 +1229,9 @@ |
1229 | 1229 |
|
1230 | 1230 |
template <typename Graph> |
1231 | 1231 |
class GraphReader; |
1232 |
|
|
1232 |
|
|
1233 | 1233 |
template <typename Graph> |
1234 |
GraphReader<Graph> graphReader(Graph& graph, |
|
1234 |
GraphReader<Graph> graphReader(Graph& graph, |
|
1235 | 1235 |
std::istream& is = std::cin); |
1236 | 1236 |
template <typename Graph> |
1237 | 1237 |
GraphReader<Graph> graphReader(Graph& graph, const std::string& fn); |
... | ... |
@@ -1366,7 +1366,7 @@ |
1366 | 1366 |
template <typename GR> |
1367 | 1367 |
friend GraphReader<GR> graphReader(GR& graph, std::istream& is); |
1368 | 1368 |
template <typename GR> |
1369 |
friend GraphReader<GR> graphReader(GR& graph, const std::string& fn); |
|
1369 |
friend GraphReader<GR> graphReader(GR& graph, const std::string& fn); |
|
1370 | 1370 |
template <typename GR> |
1371 | 1371 |
friend GraphReader<GR> graphReader(GR& graph, const char *fn); |
1372 | 1372 |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -506,7 +506,7 @@ |
506 | 506 |
private: |
507 | 507 |
|
508 | 508 |
template <typename DGR> |
509 |
friend DigraphWriter<DGR> digraphWriter(const DGR& digraph, |
|
509 |
friend DigraphWriter<DGR> digraphWriter(const DGR& digraph, |
|
510 | 510 |
std::ostream& os); |
511 | 511 |
template <typename DGR> |
512 | 512 |
friend DigraphWriter<DGR> digraphWriter(const DGR& digraph, |
... | ... |
@@ -1082,7 +1082,7 @@ |
1082 | 1082 |
template <typename GR> |
1083 | 1083 |
friend GraphWriter<GR> graphWriter(const GR& graph, |
1084 | 1084 |
const char *fn); |
1085 |
|
|
1085 |
|
|
1086 | 1086 |
GraphWriter(GraphWriter& other) |
1087 | 1087 |
: _os(other._os), local_os(other.local_os), _graph(other._graph), |
1088 | 1088 |
_skip_nodes(other._skip_nodes), _skip_edges(other._skip_edges) { |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -840,8 +840,8 @@ |
840 | 840 |
explicit Arc(int pid) { id = pid;} |
841 | 841 |
|
842 | 842 |
public: |
843 |
operator Edge() const { |
|
844 |
return id != -1 ? edgeFromId(id / 2) : INVALID; |
|
843 |
operator Edge() const { |
|
844 |
return id != -1 ? edgeFromId(id / 2) : INVALID; |
|
845 | 845 |
} |
846 | 846 |
|
847 | 847 |
Arc() {} |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -966,20 +966,20 @@ |
966 | 966 |
} |
967 | 967 |
}; |
968 | 968 |
|
969 |
|
|
969 |
|
|
970 | 970 |
template <typename From, typename To, |
971 | 971 |
bool revEnable = RevPathTagIndicator<From>::value> |
972 | 972 |
struct PathCopySelector { |
973 | 973 |
static void copy(const From& from, To& to) { |
974 | 974 |
PathCopySelectorForward<From, To>::copy(from, to); |
975 |
} |
|
975 |
} |
|
976 | 976 |
}; |
977 | 977 |
|
978 | 978 |
template <typename From, typename To> |
979 | 979 |
struct PathCopySelector<From, To, true> { |
980 | 980 |
static void copy(const From& from, To& to) { |
981 | 981 |
PathCopySelectorBackward<From, To>::copy(from, to); |
982 |
} |
|
982 |
} |
|
983 | 983 |
}; |
984 | 984 |
|
985 | 985 |
} |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -466,8 +466,8 @@ |
466 | 466 |
explicit Arc(int id) { _id = id;} |
467 | 467 |
|
468 | 468 |
public: |
469 |
operator Edge() const { |
|
470 |
return _id != -1 ? edgeFromId(_id / 2) : INVALID; |
|
469 |
operator Edge() const { |
|
470 |
return _id != -1 ? edgeFromId(_id / 2) : INVALID; |
|
471 | 471 |
} |
472 | 472 |
|
473 | 473 |
Arc() {} |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -1189,7 +1189,7 @@ |
1189 | 1189 |
int ld = nodes[nodes[jd].next].left; |
1190 | 1190 |
popLeft(nodes[jd].next); |
1191 | 1191 |
pushRight(jd, ld); |
1192 |
if (less(ld, nodes[jd].left) || |
|
1192 |
if (less(ld, nodes[jd].left) || |
|
1193 | 1193 |
nodes[ld].item == nodes[pd].item) { |
1194 | 1194 |
nodes[jd].item = nodes[ld].item; |
1195 | 1195 |
nodes[jd].prio = nodes[ld].prio; |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -184,7 +184,7 @@ |
184 | 184 |
Dfs<Digraph> dfs(G); |
185 | 185 |
check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6."); |
186 | 186 |
} |
187 |
|
|
187 |
|
|
188 | 188 |
{ |
189 | 189 |
NullMap<Node,Arc> myPredMap; |
190 | 190 |
dfs(G).predMap(myPredMap).run(s); |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -70,7 +70,7 @@ |
70 | 70 |
nodeRef(nr).arcRef(er). |
71 | 71 |
nodeCrossRef(ncr).arcCrossRef(ecr). |
72 | 72 |
node(fn, tn).arc(fa, ta).run(); |
73 |
|
|
73 |
|
|
74 | 74 |
check(countNodes(from) == countNodes(to), "Wrong copy."); |
75 | 75 |
check(countArcs(from) == countArcs(to), "Wrong copy."); |
76 | 76 |
|
... | ... |
@@ -98,7 +98,7 @@ |
98 | 98 |
|
99 | 99 |
// Test repeated copy |
100 | 100 |
digraphCopy(from, to).run(); |
101 |
|
|
101 |
|
|
102 | 102 |
check(countNodes(from) == countNodes(to), "Wrong copy."); |
103 | 103 |
check(countArcs(from) == countArcs(to), "Wrong copy."); |
104 | 104 |
} |
... | ... |
@@ -200,7 +200,7 @@ |
200 | 200 |
|
201 | 201 |
// Test repeated copy |
202 | 202 |
graphCopy(from, to).run(); |
203 |
|
|
203 |
|
|
204 | 204 |
check(countNodes(from) == countNodes(to), "Wrong copy."); |
205 | 205 |
check(countEdges(from) == countEdges(to), "Wrong copy."); |
206 | 206 |
check(countArcs(from) == countArcs(to), "Wrong copy."); |
... | ... |
@@ -63,10 +63,10 @@ |
63 | 63 |
"0 1\n"; |
64 | 64 |
|
65 | 65 |
|
66 |
int main() |
|
66 |
int main() |
|
67 | 67 |
{ |
68 | 68 |
{ |
69 |
ListDigraph d; |
|
69 |
ListDigraph d; |
|
70 | 70 |
ListDigraph::Node s,t; |
71 | 71 |
ListDigraph::ArcMap<int> label(d); |
72 | 72 |
std::istringstream input(test_lgf); |
... | ... |
@@ -93,7 +93,7 @@ |
93 | 93 |
} |
94 | 94 |
|
95 | 95 |
{ |
96 |
ListDigraph d; |
|
96 |
ListDigraph d; |
|
97 | 97 |
std::istringstream input(test_lgf_nomap); |
98 | 98 |
digraphReader(d, input). |
99 | 99 |
run(); |
... | ... |
@@ -110,14 +110,14 @@ |
110 | 110 |
} |
111 | 111 |
|
112 | 112 |
{ |
113 |
ListDigraph d; |
|
113 |
ListDigraph d; |
|
114 | 114 |
std::istringstream input(test_lgf_bad1); |
115 | 115 |
bool ok=false; |
116 | 116 |
try { |
117 | 117 |
digraphReader(d, input). |
118 | 118 |
run(); |
119 | 119 |
} |
120 |
catch (FormatError& error) |
|
120 |
catch (FormatError& error) |
|
121 | 121 |
{ |
122 | 122 |
ok = true; |
123 | 123 |
} |
... | ... |
@@ -139,7 +139,7 @@ |
139 | 139 |
} |
140 | 140 |
|
141 | 141 |
{ |
142 |
ListDigraph d; |
|
142 |
ListDigraph d; |
|
143 | 143 |
std::istringstream input(test_lgf_bad2); |
144 | 144 |
bool ok=false; |
145 | 145 |
try { |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
* |
3 | 3 |
* This file is a part of LEMON, a generic C++ optimization library. |
4 | 4 |
* |
5 |
* Copyright (C) 2003- |
|
5 |
* Copyright (C) 2003-2011 |
|
6 | 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
7 | 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
8 | 8 |
* |
... | ... |
@@ -69,8 +69,10 @@ |
69 | 69 |
checkConcept<WriteMap<A,C>, WriteMap<A,C> >(); |
70 | 70 |
checkConcept<ReadWriteMap<A,B>, ReadWriteMap<A,B> >(); |
71 | 71 |
checkConcept<ReadWriteMap<A,C>, ReadWriteMap<A,C> >(); |
72 |
checkConcept<ReferenceMap<A,B,B&,const B&>, ReferenceMap<A,B,B&,const B&> >(); |
|
73 |
checkConcept<ReferenceMap<A,C,C&,const C&>, ReferenceMap<A,C,C&,const C&> >(); |
|
72 |
checkConcept<ReferenceMap<A,B,B&,const B&>, |
|
73 |
ReferenceMap<A,B,B&,const B&> >(); |
|
74 |
checkConcept<ReferenceMap<A,C,C&,const C&>, |
|
75 |
ReferenceMap<A,C,C&,const C&> >(); |
|
74 | 76 |
|
75 | 77 |
// NullMap |
76 | 78 |
{ |
... | ... |
@@ -199,7 +201,8 @@ |
199 | 201 |
B b = functorToMap(F())[A()]; |
200 | 202 |
|
201 | 203 |
checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >(); |
202 |
MapToFunctor<ReadMap<A,B> > map = |
|
204 |
MapToFunctor<ReadMap<A,B> > map = |
|
205 |
MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>()); |
|
203 | 206 |
|
204 | 207 |
check(functorToMap(&func)[A()] == 3, |
205 | 208 |
"Something is wrong with FunctorToMap"); |
0 comments (0 inline)