Changes in / [279:6307bbbf285b:278:931190050520] in lemon-main
- Files:
-
- 2 deleted
- 15 edited
-
CMakeLists.txt (modified) (2 diffs)
-
NEWS (modified) (1 diff)
-
configure.ac (modified) (1 diff)
-
doc/Makefile.am (modified) (1 diff)
-
doc/named-param.dox (deleted)
-
lemon/arg_parser.h (modified) (2 diffs)
-
lemon/assert.h (modified) (10 diffs)
-
lemon/bits/array_map.h (modified) (2 diffs)
-
lemon/bits/graph_extender.h (modified) (5 diffs)
-
lemon/bits/map_extender.h (modified) (4 diffs)
-
lemon/bits/vector_map.h (modified) (1 diff)
-
lemon/concepts/digraph.h (modified) (2 diffs)
-
lemon/concepts/graph.h (modified) (3 diffs)
-
lemon/concepts/graph_components.h (modified) (6 diffs)
-
scripts/chg-len.py (deleted)
-
test/error_test.cc (modified) (2 diffs)
-
test/graph_test.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r274 r236 1 1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6) 2 2 3 #EXECUTE_PROCESS( 4 # COMMAND hg id -i 5 # OUTPUT_VARIABLE HG_REVISION 6 # OUTPUT_STRIP_TRAILING_WHITESPACE) 7 3 8 SET(PROJECT_NAME "LEMON") 4 SET(PROJECT_VERSION "hg-tip" CACHE STRING "The version string.") 9 SET(PROJECT_VERSION_MAJOR "0") 10 SET(PROJECT_VERSION_MINOR "99") 11 SET(PROJECT_VERSION_PATCH "0") 12 SET(PROJECT_VERSION 13 "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") 5 14 6 15 PROJECT(${PROJECT_NAME}) … … 31 40 SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") 32 41 42 SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) 43 SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) 44 SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) 33 45 SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) 34 46 35 47 SET(CPACK_PACKAGE_INSTALL_DIRECTORY 36 "${PROJECT_NAME} ${PROJECT_VERSION }")48 "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") 37 49 SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY 38 "${PROJECT_NAME} ${PROJECT_VERSION }")50 "${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") 39 51 40 52 # Variables to generate a component-based installer. -
NEWS
r262 r5 1 20XX-XX-XX Version 1.0 released2 3 This is the first stable release of LEMON. Compared to the 0.x4 release series, it features a considerably smaller but more5 matured set of tools. The API has also completely revised and6 changed in several places.7 8 * The major name changes compared to the 0.x series9 * Graph -> Digraph, UGraph -> Graph10 * Edge -> Arc, UEdge -> Edge11 * source(UEdge)/target(UEdge) -> u(Edge)/v(Edge)12 * Other improvements13 * Better documentation14 * Reviewed and cleaned up codebase15 * CMake based build system (along with the autotools based one)16 * Contents of the library (ported from 0.x)17 * Algorithms18 * breadth-first search (bfs.h)19 * depth-first search (dfs.h)20 * Dijkstra's algorithm (dijkstra.h)21 * Kruskal's algorithm (kruskal.h)22 * Data structures23 * graph data structures (list_graph.h, smart_graph.h)24 * path data structures (path.h)25 * binary heap data structure (bin_heap.h)26 * union-find data structures (unionfind.h)27 * miscellaneous property maps (maps.h)28 * two dimensional vector and bounding box (dim2.h)29 * Concepts30 * graph structure concepts (concepts/digraph.h, concepts/graph.h,31 concepts/graph_components.h)32 * concepts for other structures (concepts/heap.h, concepts/maps.h,33 concepts/path.h)34 * Tools35 * Mersenne twister random number generator (random.h)36 * tools for measuring cpu and wall clock time (time_measure.h)37 * tools for counting steps and events (counter.h)38 * tool for parsing command line arguments (arg_parser.h)39 * tool for visualizing graphs (graph_to_eps.h)40 * tools for reading and writing data in LEMON Graph Format41 (lgf_reader.h, lgf_writer.h)42 * tools to handle the anomalies of calculations with43 floating point numbers (tolerance.h)44 * tools to manage RGB colors (color.h)45 * Infrastructure46 * extended assertion handling (assert.h)47 * exception classes and error handling (error.h)48 * concept checking (concept_check.h)49 * commonly used mathematical constants (math.h) -
configure.ac
r273 r259 2 2 3 3 dnl Version information. 4 m4_define([lemon_version_number], 5 [m4_normalize(esyscmd([echo ${LEMON_VERSION}]))]) 6 dnl m4_define([lemon_version_number], []) 7 m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))]) 4 m4_define([lemon_version_number], []) 8 5 m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))]) 9 m4_define([lemon_version], [ifelse(lemon_version_number(), 10 [], 11 [lemon_hg_path().lemon_hg_revision()], 12 [lemon_version_number()])]) 6 m4_define([lemon_version], [ifelse(lemon_version_number(), [], [lemon_hg_revision()], [lemon_version_number()])]) 13 7 14 8 AC_PREREQ([2.59]) -
doc/Makefile.am
r270 r227 7 7 doc/license.dox \ 8 8 doc/mainpage.dox \ 9 doc/named-param.dox \10 9 doc/namespaces.dox \ 11 10 doc/html \ -
lemon/arg_parser.h
r261 r214 17 17 */ 18 18 19 #ifndef LEMON_ARG_PARSER _H20 #define LEMON_ARG_PARSER _H19 #ifndef LEMON_ARG_PARSER 20 #define LEMON_ARG_PARSER 21 21 22 22 #include <vector> … … 383 383 } 384 384 385 #endif // LEMON_ARG_PARSER _H385 #endif // LEMON_ARG_PARSER -
lemon/assert.h
r277 r218 28 28 namespace lemon { 29 29 30 inline void assert_fail_abort(const char *file, int line, 31 const char *function, const char* message, 32 const char *assertion) 30 inline void assert_fail_log(const char *file, int line, const char *function, 31 const char *message, const char *assertion) 33 32 { 34 33 std::cerr << file << ":" << line << ": "; … … 39 38 std::cerr << " (assertion '" << assertion << "' failed)"; 40 39 std::cerr << std::endl; 40 } 41 42 inline void assert_fail_abort(const char *file, int line, 43 const char *function, const char* message, 44 const char *assertion) 45 { 46 assert_fail_log(file, line, function, message, assertion); 41 47 std::abort(); 42 48 } … … 58 64 59 65 #undef LEMON_ASSERT 66 #undef LEMON_FIXME 60 67 #undef LEMON_DEBUG 61 68 62 #if (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ 69 #if (defined(LEMON_ASSERT_LOG) ? 1 : 0) + \ 70 (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ 63 71 (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) > 1 64 72 #error "LEMON assertion system is not set properly" 65 73 #endif 66 74 67 #if ((defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ 75 #if ((defined(LEMON_ASSERT_LOG) ? 1 : 0) + \ 76 (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ 68 77 (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) == 1 || \ 69 78 defined(LEMON_ENABLE_ASSERTS)) && \ … … 74 83 75 84 76 #if defined LEMON_ASSERT_ABORT 85 #if defined LEMON_ASSERT_LOG 86 # undef LEMON_ASSERT_HANDLER 87 # define LEMON_ASSERT_HANDLER ::lemon::assert_fail_log 88 #elif defined LEMON_ASSERT_ABORT 77 89 # undef LEMON_ASSERT_HANDLER 78 90 # define LEMON_ASSERT_HANDLER ::lemon::assert_fail_abort … … 96 108 # elif defined _MSC_VER 97 109 # define LEMON_FUNCTION_NAME (__FUNCSIG__) 98 # el if __STDC_VERSION__ >= 199901L110 # else 99 111 # define LEMON_FUNCTION_NAME (__func__) 100 # else101 # define LEMON_FUNCTION_NAME ("<unknown>")102 112 # endif 103 113 #endif … … 109 119 /// \brief Macro for assertion with customizable message 110 120 /// 111 /// Macro for assertion with customizable message. 112 /// \param exp Anexpression that must be convertible to \c bool. If it is \c113 /// false, then an assertion is raised. The concrete behaviour depends on the114 /// settings of the assertion system.115 /// \param msg A <tt>const char*</tt> parameter, which can be used to provide116 /// informationabout the circumstances of the failed assertion.121 /// Macro for assertion with customizable message. \param exp An 122 /// expression that must be convertible to \c bool. If it is \c 123 /// false, then an assertion is raised. The concrete behaviour depends 124 /// on the settings of the assertion system. \param msg A <tt>const 125 /// char*</tt> parameter, which can be used to provide information 126 /// about the circumstances of the failed assertion. 117 127 /// 118 128 /// The assertions are enabled in the default behaviour. … … 128 138 /// The checking is also disabled when the standard macro \c NDEBUG is defined. 129 139 /// 130 /// As a default behaviour the failed assertion prints a short log message to 131 /// the standard error and aborts the execution. 132 /// 133 /// However, the following modes can be used in the assertion system: 134 /// - \c LEMON_ASSERT_ABORT The failed assertion prints a short log message to 135 /// the standard error and aborts the program. It is the default behaviour. 140 /// The LEMON assertion system has a wide range of customization 141 /// properties. As a default behaviour the failed assertion prints a 142 /// short log message to the standard error and aborts the execution. 143 /// 144 /// The following modes can be used in the assertion system: 145 /// 146 /// - \c LEMON_ASSERT_LOG The failed assertion prints a short log 147 /// message to the standard error and continues the execution. 148 /// - \c LEMON_ASSERT_ABORT This mode is similar to the \c 149 /// LEMON_ASSERT_LOG, but it aborts the program. It is the default 150 /// behaviour. 136 151 /// - \c LEMON_ASSERT_CUSTOM The user can define own assertion handler 137 152 /// function. … … 161 176 /// \ingroup exceptions 162 177 /// 178 /// \brief Macro for mark not yet implemented features. 179 /// 180 /// Macro for mark not yet implemented features and outstanding bugs. 181 /// It is close to be the shortcut of the following code: 182 /// \code 183 /// LEMON_ASSERT(false, msg); 184 /// \endcode 185 /// 186 /// \see LEMON_ASSERT 187 # define LEMON_FIXME(msg) \ 188 (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, \ 189 ::lemon::_assert_bits::cstringify(msg), \ 190 static_cast<const char*>(0))) 191 192 /// \ingroup exceptions 193 /// 163 194 /// \brief Macro for internal assertions 164 195 /// … … 192 223 # ifndef LEMON_ASSERT_HANDLER 193 224 # define LEMON_ASSERT(exp, msg) (static_cast<void>(0)) 225 # define LEMON_FIXME(msg) (static_cast<void>(0)) 194 226 # define LEMON_DEBUG(exp, msg) (static_cast<void>(0)) 195 227 # else … … 200 232 ::lemon::_assert_bits::cstringify(msg), \ 201 233 #exp), 0))) 234 # define LEMON_FIXME(msg) \ 235 (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, \ 236 ::lemon::_assert_bits::cstringify(msg), \ 237 static_cast<const char*>(0))) 238 202 239 # if LEMON_ENABLE_DEBUG 203 240 # define LEMON_DEBUG(exp, msg) \ -
lemon/bits/array_map.h
r263 r209 104 104 } 105 105 106 private:107 106 /// \brief Constructor to copy a map of the same map type. 108 107 /// … … 152 151 } 153 152 154 public:155 153 /// \brief The destructor of the map. 156 154 /// -
lemon/bits/graph_extender.h
r263 r220 228 228 : Parent(digraph, value) {} 229 229 230 private:231 230 NodeMap& operator=(const NodeMap& cmap) { 232 231 return operator=<NodeMap>(cmap); … … 253 252 : Parent(digraph, value) {} 254 253 255 private:256 254 ArcMap& operator=(const ArcMap& cmap) { 257 255 return operator=<ArcMap>(cmap); … … 611 609 : Parent(graph, value) {} 612 610 613 private:614 611 NodeMap& operator=(const NodeMap& cmap) { 615 612 return operator=<NodeMap>(cmap); … … 636 633 : Parent(graph, value) {} 637 634 638 private:639 635 ArcMap& operator=(const ArcMap& cmap) { 640 636 return operator=<ArcMap>(cmap); … … 662 658 : Parent(graph, value) {} 663 659 664 private:665 660 EdgeMap& operator=(const EdgeMap& cmap) { 666 661 return operator=<EdgeMap>(cmap); -
lemon/bits/map_extender.h
r263 r209 63 63 : Parent(graph, value) {} 64 64 65 private:66 65 MapExtender& operator=(const MapExtender& cmap) { 67 66 return operator=<MapExtender>(cmap); … … 74 73 } 75 74 76 public:77 75 class MapIt : public Item { 78 76 public: … … 203 201 : Parent(_graph, _value), graph(_graph) {} 204 202 205 private:206 203 SubMapExtender& operator=(const SubMapExtender& cmap) { 207 204 return operator=<MapExtender>(cmap); … … 218 215 } 219 216 220 public:221 217 class MapIt : public Item { 222 218 public: -
lemon/bits/vector_map.h
r263 r220 101 101 } 102 102 103 private:104 103 /// \brief Copy constructor 105 104 /// -
lemon/concepts/digraph.h
r263 r220 435 435 NodeMap(const Digraph&, T) { } 436 436 437 private:438 437 ///Copy constructor 439 438 NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { } … … 458 457 ///\e 459 458 ArcMap(const Digraph&, T) { } 460 private:461 459 ///Copy constructor 462 460 ArcMap(const ArcMap& em) : ReadWriteMap<Arc,T>(em) { } -
lemon/concepts/graph.h
r263 r220 513 513 NodeMap(const Graph&, T) { } 514 514 515 private:516 515 ///Copy constructor 517 516 NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { } … … 537 536 ///\e 538 537 ArcMap(const Graph&, T) { } 539 private:540 538 ///Copy constructor 541 539 ArcMap(const ArcMap& em) : ReadWriteMap<Arc,T>(em) { } … … 561 559 ///\e 562 560 EdgeMap(const Graph&, T) { } 563 private:564 561 ///Copy constructor 565 562 EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) {} -
lemon/concepts/graph_components.h
r263 r220 1006 1006 /// Construct a new map for the graph and initalise the values. 1007 1007 GraphMap(const Graph&, const Value&) {} 1008 1009 private:1010 1008 /// \brief Copy constructor. 1011 1009 /// … … 1024 1022 } 1025 1023 1026 public:1027 1024 template<typename _Map> 1028 1025 struct Constraints { … … 1034 1031 _Map a2(g,t); 1035 1032 // Copy constructor. 1036 // _Map b(c); 1037 1038 // ReadMap<Key, Value> cmap; 1039 // b = cmap; 1040 1041 ignore_unused_variable_warning(a); 1033 _Map b(c); 1034 1035 ReadMap<Key, Value> cmap; 1036 b = cmap; 1037 1042 1038 ignore_unused_variable_warning(a2); 1043 //ignore_unused_variable_warning(b);1039 ignore_unused_variable_warning(b); 1044 1040 } 1045 1041 … … 1087 1083 : Parent(digraph, value) {} 1088 1084 1089 private:1090 1085 /// \brief Copy constructor. 1091 1086 /// … … 1125 1120 : Parent(digraph, value) {} 1126 1121 1127 private:1128 1122 /// \brief Copy constructor. 1129 1123 /// … … 1222 1216 : Parent(graph, value) {} 1223 1217 1224 private:1225 1218 /// \brief Copy constructor. 1226 1219 /// -
test/error_test.cc
r277 r223 48 48 } 49 49 50 void fixme_disable() { 51 LEMON_FIXME("fixme_disable() is fixme!"); 52 } 53 50 54 void check_assertion_disable() { 51 55 no_assertion_text_disable(); 52 56 assertion_text_disable(); 57 fixme_disable(); 53 58 } 54 59 #undef LEMON_DISABLE_ASSERTS … … 74 79 } 75 80 81 void fixme_custom() { 82 LEMON_FIXME("fixme_custom() is fixme!"); 83 } 84 76 85 void check_assertion_custom() { 77 86 no_assertion_text_custom(); 78 87 assertion_text_custom(); 79 check(cnt == 1, "The custom assert handler does not work"); 88 fixme_custom(); 89 check(cnt == 2, "The custom assert handler does not work"); 80 90 } 81 91 -
test/graph_test.h
r263 r228 213 213 check(s == 0, "Wrong sum."); 214 214 215 //map = constMap<Node>(12);216 //for (NodeIt it(G); it != INVALID; ++it) {217 //check(map[it] == 12, "Wrong operator[].");218 //}215 map = constMap<Node>(12); 216 for (NodeIt it(G); it != INVALID; ++it) { 217 check(map[it] == 12, "Wrong operator[]."); 218 } 219 219 } 220 220 … … 243 243 check(s == 0, "Wrong sum."); 244 244 245 //map = constMap<Arc>(12);246 //for (ArcIt it(G); it != INVALID; ++it) {247 //check(map[it] == 12, "Wrong operator[].");248 //}245 map = constMap<Arc>(12); 246 for (ArcIt it(G); it != INVALID; ++it) { 247 check(map[it] == 12, "Wrong operator[]."); 248 } 249 249 } 250 250 … … 273 273 check(s == 0, "Wrong sum."); 274 274 275 //map = constMap<Edge>(12);276 //for (EdgeIt it(G); it != INVALID; ++it) {277 //check(map[it] == 12, "Wrong operator[].");278 //}275 map = constMap<Edge>(12); 276 for (EdgeIt it(G); it != INVALID; ++it) { 277 check(map[it] == 12, "Wrong operator[]."); 278 } 279 279 } 280 280
Note: See TracChangeset
for help on using the changeset viewer.

