Changes in / [959:17e36e175725:957:2eebc8f7dca5] in lemon-main
- Files:
-
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
AUTHORS
r951 r320 24 24 25 25 Again, please visit the history of the old LEMON repository for more 26 details: http://lemon.cs.elte.hu/ hg/lemon-0.x26 details: http://lemon.cs.elte.hu/svn/lemon/trunk -
doc/lgf.dox
r950 r440 64 64 \endcode 65 65 66 The \c \@arcs section is very similar to the \c \@nodes section, it67 again starts with a header line describing the names of the maps, but 68 the \c "label" map is not obligatory here. The following lines69 describe the arcs. The first two tokens of each line are the source70 and the target node of the arc, respectively, then come the map66 The \c \@arcs section is very similar to the \c \@nodes section, 67 it again starts with a header line describing the names of the maps, 68 but the \c "label" map is not obligatory here. The following lines 69 describe the arcs. The first two tokens of each line are 70 the source and the target node of the arc, respectively, then come the map 71 71 values. The source and target tokens must be node labels. 72 72 … … 79 79 \endcode 80 80 81 If there is no map in the \c \@arcs section at all, then it must be82 indicated by a sole '-' sign in the first line.83 84 \code85 @arcs86 -87 1 288 1 389 2 390 \endcode91 92 81 The \c \@edges is just a synonym of \c \@arcs. The \@arcs section can 93 82 also store the edge set of an undirected graph. In such case there is 94 83 a conventional method for store arc maps in the file, if two columns 95 ha vethe same caption with \c '+' and \c '-' prefix, then these columns84 has the same caption with \c '+' and \c '-' prefix, then these columns 96 85 can be regarded as the values of an arc map. 97 86 -
lemon/Makefile.am
r959 r681 1 1 EXTRA_DIST += \ 2 2 lemon/lemon.pc.in \ 3 lemon/lemon.pc.cmake \4 3 lemon/CMakeLists.txt \ 5 4 lemon/config.h.cmake -
lemon/bits/path_dump.h
r887 r529 50 50 51 51 bool empty() const { 52 return predMap[target] == INVALID;52 return predMap[target] != INVALID; 53 53 } 54 54 … … 124 124 125 125 bool empty() const { 126 return predMatrixMap(source, target) == INVALID;126 return source != target; 127 127 } 128 128 -
lemon/core.h
r959 r671 395 395 static void copy(const From& from, Digraph &to, 396 396 NodeRefMap& nodeRefMap, ArcRefMap& arcRefMap) { 397 to.clear();398 397 for (typename From::NodeIt it(from); it != INVALID; ++it) { 399 398 nodeRefMap[it] = to.addNode(); … … 423 422 static void copy(const From& from, Graph &to, 424 423 NodeRefMap& nodeRefMap, EdgeRefMap& edgeRefMap) { 425 to.clear();426 424 for (typename From::NodeIt it(from); it != INVALID; ++it) { 427 425 nodeRefMap[it] = to.addNode(); -
lemon/dfs.h
r959 r584 558 558 void start(Node t) 559 559 { 560 while ( !emptyQueue() && !(*_reached)[t])560 while ( !emptyQueue() && G->target(_stack[_stack_head])!=t ) 561 561 processNextArc(); 562 562 } … … 1510 1510 /// with addSource() before using this function. 1511 1511 void start(Node t) { 1512 while ( !emptyQueue() && !(*_reached)[t])1512 while ( !emptyQueue() && _digraph->target(_stack[_stack_head]) != t ) 1513 1513 processNextArc(); 1514 1514 } -
lemon/graph_to_eps.h
r959 r617 685 685 #else 686 686 os << bits::getWinFormattedDate(); 687 os << std::endl;688 687 #endif 689 688 } 689 os << std::endl; 690 690 691 691 if (_autoArcWidthScale) { -
lemon/lgf_reader.h
r959 r599 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 115 * Copyright (C) 2003-2009 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 965 965 int index = 0; 966 966 while (_reader_bits::readToken(line, map)) { 967 if(map == "-") {968 if(index!=0)969 throw FormatError("'-' is not allowed as a map name");970 else if (line >> std::ws >> c)971 throw FormatError("Extra character at the end of line");972 else break;973 }974 967 if (maps.find(map) != maps.end()) { 975 968 std::ostringstream msg; … … 1842 1835 int index = 0; 1843 1836 while (_reader_bits::readToken(line, map)) { 1844 if(map == "-") {1845 if(index!=0)1846 throw FormatError("'-' is not allowed as a map name");1847 else if (line >> std::ws >> c)1848 throw FormatError("Extra character at the end of line");1849 else break;1850 }1851 1837 if (maps.find(map) != maps.end()) { 1852 1838 std::ostringstream msg; -
test/CMakeLists.txt
r959 r945 32 32 heap_test 33 33 kruskal_test 34 lgf_test35 34 maps_test 36 35 matching_test -
test/Makefile.am
r959 r649 26 26 test/heap_test \ 27 27 test/kruskal_test \ 28 test/lgf_test \29 28 test/maps_test \ 30 29 test/matching_test \ … … 72 71 test_kruskal_test_SOURCES = test/kruskal_test.cc 73 72 test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc 74 test_lgf_test_SOURCES = test/lgf_test.cc75 73 test_lp_test_SOURCES = test/lp_test.cc 76 74 test_maps_test_SOURCES = test/maps_test.cc -
test/dfs_test.cc
r959 r585 51 51 "@attributes\n" 52 52 "source 0\n" 53 "target 5\n" 54 "source1 6\n" 55 "target1 3\n"; 56 53 "target 5\n"; 57 54 58 55 void checkDfsCompile() … … 183 180 Digraph G; 184 181 Node s, t; 185 Node s1, t1;186 182 187 183 std::istringstream input(test_lgf); … … 189 185 node("source", s). 190 186 node("target", t). 191 node("source1", s1).192 node("target1", t1).193 187 run(); 194 188 … … 217 211 218 212 { 219 Dfs<Digraph> dfs(G);220 check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6.");221 }222 223 {224 213 NullMap<Node,Arc> myPredMap; 225 214 dfs(G).predMap(myPredMap).run(s); -
test/graph_copy_test.cc
r893 r440 30 30 const int nn = 10; 31 31 32 // Build a digraph33 32 SmartDigraph from; 34 33 SmartDigraph::NodeMap<int> fnm(from); … … 53 52 } 54 53 55 // Test digraph copy56 54 ListDigraph to; 57 55 ListDigraph::NodeMap<int> tnm(to); … … 71 69 nodeCrossRef(ncr).arcCrossRef(ecr). 72 70 node(fn, tn).arc(fa, ta).run(); 73 74 check(countNodes(from) == countNodes(to), "Wrong copy.");75 check(countArcs(from) == countArcs(to), "Wrong copy.");76 71 77 72 for (SmartDigraph::NodeIt it(from); it != INVALID; ++it) { … … 96 91 check(tn == nr[fn], "Wrong copy."); 97 92 check(ta == er[fa], "Wrong copy."); 98 99 // Test repeated copy100 digraphCopy(from, to).run();101 102 check(countNodes(from) == countNodes(to), "Wrong copy.");103 check(countArcs(from) == countArcs(to), "Wrong copy.");104 93 } 105 94 … … 107 96 const int nn = 10; 108 97 109 // Build a graph110 98 SmartGraph from; 111 99 SmartGraph::NodeMap<int> fnm(from); … … 135 123 } 136 124 137 // Test graph copy138 125 ListGraph to; 139 126 ListGraph::NodeMap<int> tnm(to); … … 157 144 nodeCrossRef(ncr).arcCrossRef(acr).edgeCrossRef(ecr). 158 145 node(fn, tn).arc(fa, ta).edge(fe, te).run(); 159 160 check(countNodes(from) == countNodes(to), "Wrong copy.");161 check(countEdges(from) == countEdges(to), "Wrong copy.");162 check(countArcs(from) == countArcs(to), "Wrong copy.");163 146 164 147 for (SmartGraph::NodeIt it(from); it != INVALID; ++it) { … … 198 181 check(ta == ar[fa], "Wrong copy."); 199 182 check(te == er[fe], "Wrong copy."); 200 201 // Test repeated copy202 graphCopy(from, to).run();203 204 check(countNodes(from) == countNodes(to), "Wrong copy.");205 check(countEdges(from) == countEdges(to), "Wrong copy.");206 check(countArcs(from) == countArcs(to), "Wrong copy.");207 183 } 208 184
Note: See TracChangeset
for help on using the changeset viewer.