Changes in / [366:efbd0ab50a77:365:a12eef1f82b2] in lemon-main
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile.am
r363 r321 1 1 ACLOCAL_AMFLAGS = -I m4 2 3 AM_CXXFLAGS = $(WARNINGCXXFLAGS)4 2 5 3 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) -
configure.ac
r363 r310 19 19 AC_CONFIG_SRCDIR([lemon/list_graph.h]) 20 20 AC_CONFIG_HEADERS([config.h lemon/config.h]) 21 22 lx_cmdline_cxxflags_set=${CXXFLAGS+set} 21 23 22 24 dnl Do compilation tests using the C++ compiler. … … 45 47 46 48 dnl Set custom compiler flags when using g++. 47 if test "$GXX" = yes -a "$ICC" = no; then48 WARNINGCXXFLAGS="-Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo-Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"49 if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes -a "$ICC" = no; then 50 CXXFLAGS="$CXXFLAGS -Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas" 49 51 fi 50 AC_SUBST([WARNINGCXXFLAGS])51 52 52 53 dnl Checks for libraries. … … 113 114 echo 114 115 echo C++ compiler.................. : $CXX 115 echo C++ compiles flags............ : $ WARNINGCXXFLAGS $CXXFLAGS116 echo C++ compiles flags............ : $CXXFLAGS 116 117 echo 117 118 #echo GLPK support.................. : $lx_glpk_found -
lemon/Makefile.am
r366 r364 13 13 lemon/random.cc 14 14 15 #lemon_libemon_la_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS) $(SOPLEX_CXXFLAGS) $(AM_CXXFLAGS)15 #lemon_libemon_la_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS) $(SOPLEX_CXXFLAGS) 16 16 #lemon_libemon_la_LDFLAGS = $(GLPK_LIBS) $(CPLEX_LIBS) $(SOPLEX_LIBS) 17 17 -
lemon/bits/alteration_notifier.h
r361 r314 36 36 // a container. 37 37 // 38 // The simple graph s can be refered as two containers: anode container39 // and an edge container. But they do not store values directly,they40 // are just key continars for more value containers, which are the41 // node and edge maps.42 // 43 // The node and edge sets of the graphs can be changed as we add or erase38 // The simple graph's can be refered as two containers, one node container 39 // and one edge container. But they are not standard containers they 40 // does not store values directly they are just key continars for more 41 // value containers which are the node and edge maps. 42 // 43 // The graph's node and edge sets can be changed as we add or erase 44 44 // nodes and edges in the graph. LEMON would like to handle easily 45 45 // that the node and edge maps should contain values for all nodes or 46 46 // edges. If we want to check on every indicing if the map contains 47 47 // the current indicing key that cause a drawback in the performance 48 // in the library. We use another solution :we notify all maps about48 // in the library. We use another solution we notify all maps about 49 49 // an alteration in the graph, which cause only drawback on the 50 50 // alteration of the graph. 51 51 // 52 // This class provides an interface to a node or edge container. 53 // The first() and next() member functions make possible 54 // to iterate on the keys of the container. 55 // The id() function returns an integer id for each key. 56 // The maxId() function gives back an upper bound of the ids. 52 // This class provides an interface to the container. The \e first() and \e 53 // next() member functions make possible to iterate on the keys of the 54 // container. The \e id() function returns an integer id for each key. 55 // The \e maxId() function gives back an upper bound of the ids. 57 56 // 58 57 // For the proper functonality of this class, we should notify it 59 // about each alteration in the container. The alterations have four type :60 // a dd(), erase(), build() and clear(). The add() and61 // erase() signalthat only one or few items added or erased to or62 // from the graph. If all items are erased from the graph or if a new graph63 // is built from an empty graph,then it can be signaled with the58 // about each alteration in the container. The alterations have four type 59 // as \e add(), \e erase(), \e build() and \e clear(). The \e add() and 60 // \e erase() signals that only one or few items added or erased to or 61 // from the graph. If all items are erased from the graph or from an empty 62 // graph a new graph is builded then it can be signaled with the 64 63 // clear() and build() members. Important rule that if we erase items 65 // from graph swe should first signal the alteration and after that erase64 // from graph we should first signal the alteration and after that erase 66 65 // them from the container, on the other way on item addition we should 67 66 // first extend the container and just after that signal the alteration. 68 67 // 69 68 // The alteration can be observed with a class inherited from the 70 // ObserverBase nested class. The signals can be handled with69 // \e ObserverBase nested class. The signals can be handled with 71 70 // overriding the virtual functions defined in the base class. The 72 71 // observer base can be attached to the notifier with the 73 // attach() member and can be detached with detach() function. The72 // \e attach() member and can be detached with detach() function. The 74 73 // alteration handlers should not call any function which signals 75 74 // an other alteration in the same notifier and should not 76 75 // detach any observer from the notifier. 77 76 // 78 // Alteration observers try to be exception safe. If an add() or79 // a clear() function throws an exception then the remaining77 // Alteration observers try to be exception safe. If an \e add() or 78 // a \e clear() function throws an exception then the remaining 80 79 // observeres will not be notified and the fulfilled additions will 81 // be rolled back by calling the erase() or clear() functions.82 // Hence erase() and clear() should not throw exception.83 // Actullay, they can throw only \ref ImmediateDetach exception,84 // which detach the observer from the notifier.85 // 86 // There are some cases,when the alteration observing is not completly80 // be rolled back by calling the \e erase() or \e clear() 81 // functions. Thence the \e erase() and \e clear() should not throw 82 // exception. Actullay, it can be throw only \ref ImmediateDetach 83 // exception which detach the observer from the notifier. 84 // 85 // There are some place when the alteration observing is not completly 87 86 // reliable. If we want to carry out the node degree in the graph 88 // as in the \ref InDegMap and we use the reverse Arc(), then it cause87 // as in the \ref InDegMap and we use the reverseEdge that cause 89 88 // unreliable functionality. Because the alteration observing signals 90 // only erasing and adding but not the reversing ,it will stores bad91 // degrees. Apart form that the subgraph adaptors cannot even signal92 // the alterations because just a setting in the filter map can modify93 // the graph and this cannotbe watched in any way.89 // only erasing and adding but not the reversing it will stores bad 90 // degrees. The sub graph adaptors cannot signal the alterations because 91 // just a setting in the filter map can modify the graph and this cannot 92 // be watched in any way. 94 93 // 95 94 // \param _Container The container which is observed. … … 105 104 typedef _Item Item; 106 105 107 // \brief Exception which can be called from clear() and108 // erase().109 // 110 // From the clear() anderase() function only this106 // \brief Exception which can be called from \e clear() and 107 // \e erase(). 108 // 109 // From the \e clear() and \e erase() function only this 111 110 // exception is allowed to throw. The exception immediatly 112 111 // detaches the current observer from the notifier. Because the 113 // clear() anderase() should not throw other exceptions112 // \e clear() and \e erase() should not throw other exceptions 114 113 // it can be used to invalidate the observer. 115 114 struct ImmediateDetach {}; … … 123 122 // The observer interface contains some pure virtual functions 124 123 // to override. The add() and erase() functions are 125 // to notify the oberver when one item is added or erased. 124 // to notify the oberver when one item is added or 125 // erased. 126 126 // 127 127 // The build() and clear() members are to notify the observer -
lemon/bits/array_map.h
r361 r314 37 37 // \brief Graph map based on the array storage. 38 38 // 39 // The ArrayMap template class is graph map structure that automatically 40 // updates the map when a key is added to or erased from the graph. 41 // This map uses the allocators to implement the container functionality. 39 // The ArrayMap template class is graph map structure what 40 // automatically updates the map when a key is added to or erased from 41 // the map. This map uses the allocators to implement 42 // the container functionality. 42 43 // 43 // The template parameters are the Graph ,the current Item type and44 // The template parameters are the Graph the current Item type and 44 45 // the Value type of the map. 45 46 template <typename _Graph, typename _Item, typename _Value> … … 47 48 : public ItemSetTraits<_Graph, _Item>::ItemNotifier::ObserverBase { 48 49 public: 49 // The graph type .50 // The graph type of the maps. 50 51 typedef _Graph Graph; 51 // The item type .52 // The item type of the map. 52 53 typedef _Item Item; 53 54 // The reference map tag. 54 55 typedef True ReferenceMapTag; 55 56 56 // The key type of the map .57 // The key type of the maps. 57 58 typedef _Item Key; 58 59 // The value type of the map. … … 200 201 // \brief Adds a new key to the map. 201 202 // 202 // It adds a new key to the map. It iscalled by the observer notifier203 // It adds a new key to the map. It called by the observer notifier 203 204 // and it overrides the add() member function of the observer base. 204 205 virtual void add(const Key& key) { … … 228 229 // \brief Adds more new keys to the map. 229 230 // 230 // It adds more new keys to the map. It iscalled by the observer notifier231 // It adds more new keys to the map. It called by the observer notifier 231 232 // and it overrides the add() member function of the observer base. 232 233 virtual void add(const std::vector<Key>& keys) { … … 272 273 // \brief Erase a key from the map. 273 274 // 274 // Erase a key from the map. It iscalled by the observer notifier275 // Erase a key from the map. It called by the observer notifier 275 276 // and it overrides the erase() member function of the observer base. 276 277 virtual void erase(const Key& key) { … … 281 282 // \brief Erase more keys from the map. 282 283 // 283 // Erase more keys from the map. It iscalled by the observer notifier284 // Erase more keys from the map. It called by the observer notifier 284 285 // and it overrides the erase() member function of the observer base. 285 286 virtual void erase(const std::vector<Key>& keys) { … … 290 291 } 291 292 292 // \brief Build s the map.293 // 294 // It build s the map. It iscalled by the observer notifier293 // \brief Buildes the map. 294 // 295 // It buildes the map. It called by the observer notifier 295 296 // and it overrides the build() member function of the observer base. 296 297 virtual void build() { … … 306 307 // \brief Clear the map. 307 308 // 308 // It erase all items from the map. It iscalled by the observer notifier309 // It erase all items from the map. It called by the observer notifier 309 310 // and it overrides the clear() member function of the observer base. 310 311 virtual void clear() { -
lemon/bits/base_extender.h
r361 r314 31 31 //\ingroup digraphbits 32 32 //\file 33 //\brief Extenders for the graph types33 //\brief Extenders for the digraph types 34 34 namespace lemon { 35 35 -
lemon/bits/graph_extender.h
r361 r314 30 30 //\ingroup graphbits 31 31 //\file 32 //\brief Extenders for the graph types32 //\brief Extenders for the digraph types 33 33 namespace lemon { 34 34 35 35 // \ingroup graphbits 36 36 // 37 // \brief Extender for the digraph implementations37 // \brief Extender for the Digraphs 38 38 template <typename Base> 39 39 class DigraphExtender : public Base { -
lemon/bits/traits.h
r360 r314 219 219 220 220 template <typename Graph, typename Enable = void> 221 struct ArcNumTagIndicator {222 static const bool value = false;223 };224 225 template <typename Graph>226 struct ArcNumTagIndicator<227 Graph,228 typename enable_if<typename Graph::ArcNumTag, void>::type229 > {230 static const bool value = true;231 };232 233 template <typename Graph, typename Enable = void>234 221 struct EdgeNumTagIndicator { 235 222 static const bool value = false; … … 245 232 246 233 template <typename Graph, typename Enable = void> 247 struct FindArcTagIndicator {248 static const bool value = false;249 };250 251 template <typename Graph>252 struct FindArcTagIndicator<253 Graph,254 typename enable_if<typename Graph::FindArcTag, void>::type255 > {256 static const bool value = true;257 };258 259 template <typename Graph, typename Enable = void>260 234 struct FindEdgeTagIndicator { 261 235 static const bool value = false; -
lemon/bits/vector_map.h
r361 r314 39 39 // \brief Graph map based on the std::vector storage. 40 40 // 41 // The VectorMap template class is graph map structure that automatically42 // updates the map when a key is added to or erased from the graph.43 // This map type usesstd::vector to store the values.41 // The VectorMap template class is graph map structure what 42 // automatically updates the map when a key is added to or erased from 43 // the map. This map type uses the std::vector to store the values. 44 44 // 45 45 // \tparam _Graph The graph this map is attached to. … … 170 170 // \brief Adds a new key to the map. 171 171 // 172 // It adds a new key to the map. It iscalled by the observer notifier172 // It adds a new key to the map. It called by the observer notifier 173 173 // and it overrides the add() member function of the observer base. 174 174 virtual void add(const Key& key) { … … 181 181 // \brief Adds more new keys to the map. 182 182 // 183 // It adds more new keys to the map. It iscalled by the observer notifier183 // It adds more new keys to the map. It called by the observer notifier 184 184 // and it overrides the add() member function of the observer base. 185 185 virtual void add(const std::vector<Key>& keys) { … … 196 196 // \brief Erase a key from the map. 197 197 // 198 // Erase a key from the map. It iscalled by the observer notifier198 // Erase a key from the map. It called by the observer notifier 199 199 // and it overrides the erase() member function of the observer base. 200 200 virtual void erase(const Key& key) { … … 204 204 // \brief Erase more keys from the map. 205 205 // 206 // It erases more keys from the map. It iscalled by the observer notifier206 // Erase more keys from the map. It called by the observer notifier 207 207 // and it overrides the erase() member function of the observer base. 208 208 virtual void erase(const std::vector<Key>& keys) { … … 212 212 } 213 213 214 // \brief Build the map.215 // 216 // It build s the map. It iscalled by the observer notifier214 // \brief Buildes the map. 215 // 216 // It buildes the map. It called by the observer notifier 217 217 // and it overrides the build() member function of the observer base. 218 218 virtual void build() { … … 224 224 // \brief Clear the map. 225 225 // 226 // It erase s all items from the map. It iscalled by the observer notifier226 // It erase all items from the map. It called by the observer notifier 227 227 // and it overrides the clear() member function of the observer base. 228 228 virtual void clear() { -
lemon/full_graph.h
r360 r355 307 307 308 308 typedef True NodeNumTag; 309 typedef True ArcNumTag;310 309 typedef True EdgeNumTag; 311 310 … … 345 344 346 345 typedef True FindEdgeTag; 347 typedef True FindArcTag;348 346 349 347 Edge findEdge(Node u, Node v, Edge prev = INVALID) const { -
lemon/grid_graph.h
r360 r338 83 83 84 84 typedef True NodeNumTag; 85 typedef True EdgeNumTag;86 85 typedef True ArcNumTag; 87 86 … … 129 128 130 129 typedef True FindEdgeTag; 131 typedef True FindArcTag;132 130 133 131 Edge findEdge(Node u, Node v, Edge prev = INVALID) const { -
lemon/nauty_reader.h
r359 r352 39 39 /// general, connected, biconnected, triangle-free, 4-cycle-free, 40 40 /// bipartite and graphs with given edge number and degree 41 /// constraints). This function reads a \e nauty \e graph 6\e format41 /// constraints). This function reads a \e nauty \e graph \e format 42 42 /// line from the given stream and builds it in the given graph. 43 43 /// … … 49 49 /// int num = 0; 50 50 /// SmartGraph graph; 51 /// while (readNauty Graph(graph, std::cin)) {51 /// while (readNauty(graph, std::cin)) { 52 52 /// PlanarityChecking<SmartGraph> pc(graph); 53 53 /// if (pc.run()) ++num; … … 62 62 ///\endcode 63 63 template <typename Graph> 64 std::istream& readNauty Graph(Graph& graph, std::istream& is = std::cin) {64 std::istream& readNauty(Graph& graph, std::istream& is = std::cin) { 65 65 graph.clear(); 66 66 -
lemon/smart_graph.h
r360 r329 68 68 69 69 typedef True NodeNumTag; 70 typedef True ArcNumTag;70 typedef True EdgeNumTag; 71 71 72 72 int nodeNum() const { return nodes.size(); } -
tools/lemon-0.x-to-1.x.sh
r366 r365 92 92 -e "s/\<storeBoolMap\>/loggerBoolMap/g"\ 93 93 -e "s/\<BoundingBox\>/Box/g"\ 94 -e "s/\<readNauty\>/readNautyGraph/g"\95 94 <$i > $TMP 96 95 mv $TMP $i
Note: See TracChangeset
for help on using the changeset viewer.