Changeset 949:54464584b157 in lemon-main
- Timestamp:
- 08/02/11 18:13:34 (13 years ago)
- Branch:
- default
- Children:
- 950:2d583da4ba40, 951:3dcb45a871c3
- Phase:
- public
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/lgf.dox
r313 r949 64 64 \endcode 65 65 66 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 butthe \c "label" map is not obligatory here. The following lines69 describe the arcs. The first two tokens of each line are 70 the sourceand the target node of the arc, respectively, then come the map66 The \c \@arcs section is very similar to the \c \@nodes section, it 67 again starts with a header line describing the names of the maps, but 68 the \c "label" map is not obligatory here. The following lines 69 describe the arcs. The first two tokens of each line are the source 70 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 be 82 indicated by a sole '-' sign in the first line. 83 84 \code 85 @arcs 86 - 87 1 2 88 1 3 89 2 3 90 \endcode 91 81 92 The \c \@edges is just a synonym of \c \@arcs. The \@arcs section can 82 93 also store the edge set of an undirected graph. In such case there is 83 94 a conventional method for store arc maps in the file, if two columns 84 ha sthe same caption with \c '+' and \c '-' prefix, then these columns95 have the same caption with \c '+' and \c '-' prefix, then these columns 85 96 can be regarded as the values of an arc map. 86 97 -
lemon/lgf_reader.h
r498 r949 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 085 * Copyright (C) 2003-2011 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 964 964 int index = 0; 965 965 while (_reader_bits::readToken(line, map)) { 966 if(map == "-") { 967 if(index!=0) 968 throw FormatError("'-' is not allowed as a map name"); 969 else if (line >> std::ws >> c) 970 throw FormatError("Extra character at the end of line"); 971 else break; 972 } 966 973 if (maps.find(map) != maps.end()) { 967 974 std::ostringstream msg; … … 1804 1811 int index = 0; 1805 1812 while (_reader_bits::readToken(line, map)) { 1813 if(map == "-") { 1814 if(index!=0) 1815 throw FormatError("'-' is not allowed as a map name"); 1816 else if (line >> std::ws >> c) 1817 throw FormatError("Extra character at the end of line"); 1818 else break; 1819 } 1806 1820 if (maps.find(map) != maps.end()) { 1807 1821 std::ostringstream msg; -
test/CMakeLists.txt
r510 r949 19 19 heap_test 20 20 kruskal_test 21 lgf_test 21 22 maps_test 22 23 random_test -
test/Makefile.am
r228 r949 19 19 test/heap_test \ 20 20 test/kruskal_test \ 21 test/lgf_test \ 21 22 test/maps_test \ 22 23 test/random_test \ … … 42 43 test_heap_test_SOURCES = test/heap_test.cc 43 44 test_kruskal_test_SOURCES = test/kruskal_test.cc 45 test_lgf_test_SOURCES = test/lgf_test.cc 44 46 test_maps_test_SOURCES = test/maps_test.cc 45 47 test_path_test_SOURCES = test/path_test.cc
Note: See TracChangeset
for help on using the changeset viewer.