diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -102,7 +102,7 @@ EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO IMAGE_PATH = @abs_top_srcdir@/doc/images \ - @abs_top_builddir@/doc/gen-images + @abs_top_builddir@/doc/gen-images INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO diff --git a/doc/lgf.dox b/doc/lgf.dox --- a/doc/lgf.dox +++ b/doc/lgf.dox @@ -57,10 +57,10 @@ \code @nodes - label coordinates size title - 1 (10,20) 10 "First node" - 2 (80,80) 8 "Second node" - 3 (40,10) 10 "Third node" + label coordinates size title + 1 (10,20) 10 "First node" + 2 (80,80) 8 "Second node" + 3 (40,10) 10 "Third node" \endcode The \c \@arcs section is very similar to the \c \@nodes section, @@ -72,7 +72,7 @@ \code @arcs - capacity + capacity 1 2 16 1 3 12 2 3 18 diff --git a/lemon/assert.h b/lemon/assert.h --- a/lemon/assert.h +++ b/lemon/assert.h @@ -66,17 +66,17 @@ #undef LEMON_FIXME #undef LEMON_DEBUG -#if (defined(LEMON_ASSERT_LOG) ? 1 : 0) + \ - (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ +#if (defined(LEMON_ASSERT_LOG) ? 1 : 0) + \ + (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) > 1 #error "LEMON assertion system is not set properly" #endif -#if ((defined(LEMON_ASSERT_LOG) ? 1 : 0) + \ - (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ - (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) == 1 || \ - defined(LEMON_ENABLE_ASSERTS)) && \ - (defined(LEMON_DISABLE_ASSERTS) || \ +#if ((defined(LEMON_ASSERT_LOG) ? 1 : 0) + \ + (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ + (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) == 1 || \ + defined(LEMON_ENABLE_ASSERTS)) && \ + (defined(LEMON_DISABLE_ASSERTS) || \ defined(NDEBUG)) #error "LEMON assertion system is not set properly" #endif @@ -168,9 +168,9 @@ /// \ref lemon/assert.h "assert.h" file is reincluded, then the /// behaviour is changed appropiately to the new settings. # define LEMON_ASSERT(exp, msg) \ - (static_cast (!!(exp) ? 0 : ( \ - LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ - LEMON_FUNCTION_NAME, \ + (static_cast (!!(exp) ? 0 : ( \ + LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ + LEMON_FUNCTION_NAME, \ ::lemon::_assert_bits::cstringify(msg), #exp), 0))) /// \ingroup exceptions @@ -184,9 +184,9 @@ /// \endcode /// /// \see LEMON_ASSERT -# define LEMON_FIXME(msg) \ +# define LEMON_FIXME(msg) \ (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, \ - ::lemon::_assert_bits::cstringify(msg), \ + ::lemon::_assert_bits::cstringify(msg), \ static_cast(0))) /// \ingroup exceptions @@ -212,10 +212,10 @@ /// macro. /// /// \see LEMON_ASSERT -# define LEMON_DEBUG(exp, msg) \ - (static_cast (!!(exp) ? 0 : ( \ +# define LEMON_DEBUG(exp, msg) \ + (static_cast (!!(exp) ? 0 : ( \ LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ - LEMON_FUNCTION_NAME, \ + LEMON_FUNCTION_NAME, \ ::lemon::_assert_bits::cstringify(msg), #exp), 0))) #else @@ -225,23 +225,23 @@ # define LEMON_FIXME(msg) (static_cast(0)) # define LEMON_DEBUG(exp, msg) (static_cast(0)) # else -# define LEMON_ASSERT(exp, msg) \ - (static_cast (!!(exp) ? 0 : ( \ +# define LEMON_ASSERT(exp, msg) \ + (static_cast (!!(exp) ? 0 : ( \ LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ - LEMON_FUNCTION_NAME, \ - ::lemon::_assert_bits::cstringify(msg), \ + LEMON_FUNCTION_NAME, \ + ::lemon::_assert_bits::cstringify(msg), \ #exp), 0))) -# define LEMON_FIXME(msg) \ - (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, \ - ::lemon::_assert_bits::cstringify(msg), \ +# define LEMON_FIXME(msg) \ + (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, \ + ::lemon::_assert_bits::cstringify(msg), \ static_cast(0))) # if LEMON_ENABLE_DEBUG # define LEMON_DEBUG(exp, msg) - (static_cast (!!(exp) ? 0 : ( \ - LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ - LEMON_FUNCTION_NAME, \ - ::lemon::_assert_bits::cstringify(msg), \ + (static_cast (!!(exp) ? 0 : ( \ + LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ + LEMON_FUNCTION_NAME, \ + ::lemon::_assert_bits::cstringify(msg), \ #exp), 0))) # else # define LEMON_DEBUG(exp, msg) (static_cast(0)) @@ -249,13 +249,3 @@ # endif #endif - -#ifdef DOXYGEN - - -#else - - -#endif - - diff --git a/lemon/concepts/path.h b/lemon/concepts/path.h --- a/lemon/concepts/path.h +++ b/lemon/concepts/path.h @@ -100,8 +100,8 @@ bool operator==(const ArcIt&) const {return true;} /// Comparison operator bool operator!=(const ArcIt&) const {return true;} - /// Comparison operator - bool operator<(const ArcIt&) const {return false;} + /// Comparison operator + bool operator<(const ArcIt&) const {return false;} }; @@ -255,8 +255,8 @@ bool operator==(const ArcIt&) const {return true;} /// Comparison operator bool operator!=(const ArcIt&) const {return true;} - /// Comparison operator - bool operator<(const ArcIt&) const {return false;} + /// Comparison operator + bool operator<(const ArcIt&) const {return false;} }; @@ -283,8 +283,8 @@ bool operator==(const RevArcIt&) const {return true;} /// Comparison operator bool operator!=(const RevArcIt&) const {return true;} - /// Comparison operator - bool operator<(const RevArcIt&) const {return false;} + /// Comparison operator + bool operator<(const RevArcIt&) const {return false;} }; diff --git a/lemon/error.h b/lemon/error.h --- a/lemon/error.h +++ b/lemon/error.h @@ -70,7 +70,7 @@ if (ptr.get() == 0) return; try { if (!copy.valid()) return; - *ptr = copy.get(); + *ptr = copy.get(); } catch (...) {} } diff --git a/lemon/graph_to_eps.h b/lemon/graph_to_eps.h --- a/lemon/graph_to_eps.h +++ b/lemon/graph_to_eps.h @@ -908,7 +908,7 @@ double l=std::sqrt(dvec.normSquare()); //\todo better 'epsilon' would be nice here. dim2::Point d(dvec/std::max(l,EPSILON)); - dim2::Point m; + dim2::Point m; // m=dim2::Point(mycoords[g.target(*i)]+ // mycoords[g.source(*i)])/2.0; @@ -916,7 +916,7 @@ // dvec*(double(_nodeSizes[g.source(*i)])/ // (_nodeSizes[g.source(*i)]+_nodeSizes[g.target(*i)])); - m=dim2::Point(mycoords[g.source(*i)])+ + m=dim2::Point(mycoords[g.source(*i)])+ d*(l+_nodeSizes[g.source(*i)]-_nodeSizes[g.target(*i)])/2.0; for(typename std::vector::iterator e=i;e!=j;++e) { diff --git a/lemon/graph_utils.h b/lemon/graph_utils.h --- a/lemon/graph_utils.h +++ b/lemon/graph_utils.h @@ -52,18 +52,18 @@ ///\note If the graph type is a dependent type, ie. the graph type depend ///on a template parameter, then use \c TEMPLATE_DIGRAPH_TYPEDEFS() ///macro. -#define DIGRAPH_TYPEDEFS(Digraph) \ - typedef Digraph::Node Node; \ - typedef Digraph::NodeIt NodeIt; \ - typedef Digraph::Arc Arc; \ - typedef Digraph::ArcIt ArcIt; \ - typedef Digraph::InArcIt InArcIt; \ - typedef Digraph::OutArcIt OutArcIt; \ - typedef Digraph::NodeMap BoolNodeMap; \ - typedef Digraph::NodeMap IntNodeMap; \ - typedef Digraph::NodeMap DoubleNodeMap; \ - typedef Digraph::ArcMap BoolArcMap; \ - typedef Digraph::ArcMap IntArcMap; \ +#define DIGRAPH_TYPEDEFS(Digraph) \ + typedef Digraph::Node Node; \ + typedef Digraph::NodeIt NodeIt; \ + typedef Digraph::Arc Arc; \ + typedef Digraph::ArcIt ArcIt; \ + typedef Digraph::InArcIt InArcIt; \ + typedef Digraph::OutArcIt OutArcIt; \ + typedef Digraph::NodeMap BoolNodeMap; \ + typedef Digraph::NodeMap IntNodeMap; \ + typedef Digraph::NodeMap DoubleNodeMap; \ + typedef Digraph::ArcMap BoolArcMap; \ + typedef Digraph::ArcMap IntArcMap; \ typedef Digraph::ArcMap DoubleArcMap ///Creates convenience typedefs for the digraph types and iterators @@ -72,18 +72,18 @@ /// ///\note Use this macro, if the graph type is a dependent type, ///ie. the graph type depend on a template parameter. -#define TEMPLATE_DIGRAPH_TYPEDEFS(Digraph) \ - typedef typename Digraph::Node Node; \ - typedef typename Digraph::NodeIt NodeIt; \ - typedef typename Digraph::Arc Arc; \ +#define TEMPLATE_DIGRAPH_TYPEDEFS(Digraph) \ + typedef typename Digraph::Node Node; \ + typedef typename Digraph::NodeIt NodeIt; \ + typedef typename Digraph::Arc Arc; \ typedef typename Digraph::ArcIt ArcIt; \ - typedef typename Digraph::InArcIt InArcIt; \ - typedef typename Digraph::OutArcIt OutArcIt; \ - typedef typename Digraph::template NodeMap BoolNodeMap; \ - typedef typename Digraph::template NodeMap IntNodeMap; \ - typedef typename Digraph::template NodeMap DoubleNodeMap; \ - typedef typename Digraph::template ArcMap BoolArcMap; \ - typedef typename Digraph::template ArcMap IntArcMap; \ + typedef typename Digraph::InArcIt InArcIt; \ + typedef typename Digraph::OutArcIt OutArcIt; \ + typedef typename Digraph::template NodeMap BoolNodeMap; \ + typedef typename Digraph::template NodeMap IntNodeMap; \ + typedef typename Digraph::template NodeMap DoubleNodeMap; \ + typedef typename Digraph::template ArcMap BoolArcMap; \ + typedef typename Digraph::template ArcMap IntArcMap; \ typedef typename Digraph::template ArcMap DoubleArcMap ///Creates convenience typedefs for the graph types and iterators @@ -96,13 +96,13 @@ ///\note If the graph type is a dependent type, ie. the graph type depend ///on a template parameter, then use \c TEMPLATE_DIGRAPH_TYPEDEFS() ///macro. -#define GRAPH_TYPEDEFS(Graph) \ - DIGRAPH_TYPEDEFS(Graph); \ - typedef Graph::Edge Edge; \ - typedef Graph::EdgeIt EdgeIt; \ - typedef Graph::IncEdgeIt IncEdgeIt; \ - typedef Graph::EdgeMap BoolEdgeMap; \ - typedef Graph::EdgeMap IntEdgeMap; \ +#define GRAPH_TYPEDEFS(Graph) \ + DIGRAPH_TYPEDEFS(Graph); \ + typedef Graph::Edge Edge; \ + typedef Graph::EdgeIt EdgeIt; \ + typedef Graph::IncEdgeIt IncEdgeIt; \ + typedef Graph::EdgeMap BoolEdgeMap; \ + typedef Graph::EdgeMap IntEdgeMap; \ typedef Graph::EdgeMap DoubleEdgeMap ///Creates convenience typedefs for the graph types and iterators @@ -111,13 +111,13 @@ /// ///\note Use this macro, if the graph type is a dependent type, ///ie. the graph type depend on a template parameter. -#define TEMPLATE_GRAPH_TYPEDEFS(Graph) \ - TEMPLATE_DIGRAPH_TYPEDEFS(Graph); \ - typedef typename Graph::Edge Edge; \ +#define TEMPLATE_GRAPH_TYPEDEFS(Graph) \ + TEMPLATE_DIGRAPH_TYPEDEFS(Graph); \ + typedef typename Graph::Edge Edge; \ typedef typename Graph::EdgeIt EdgeIt; \ - typedef typename Graph::IncEdgeIt IncEdgeIt; \ - typedef typename Graph::template EdgeMap BoolEdgeMap; \ - typedef typename Graph::template EdgeMap IntEdgeMap; \ + typedef typename Graph::IncEdgeIt IncEdgeIt; \ + typedef typename Graph::template EdgeMap BoolEdgeMap; \ + typedef typename Graph::template EdgeMap IntEdgeMap; \ typedef typename Graph::template EdgeMap DoubleEdgeMap /// \brief Function to count the items in the graph. diff --git a/lemon/lgf_reader.h b/lemon/lgf_reader.h --- a/lemon/lgf_reader.h +++ b/lemon/lgf_reader.h @@ -146,7 +146,7 @@ public: ValueStorage(Value& value, const Converter& converter = Converter()) - : _value(value), _converter(converter) {} + : _value(value), _converter(converter) {} virtual void set(const std::string& value) { _value = _converter(value); @@ -510,7 +510,7 @@ /// file. DigraphReader(const std::string& fn, Digraph& digraph) : _is(new std::ifstream(fn.c_str())), local_is(true), _digraph(digraph), - _use_nodes(false), _use_arcs(false), + _use_nodes(false), _use_arcs(false), _skip_nodes(false), _skip_arcs(false) {} /// \brief Constructor @@ -519,7 +519,7 @@ /// file. DigraphReader(const char* fn, Digraph& digraph) : _is(new std::ifstream(fn)), local_is(true), _digraph(digraph), - _use_nodes(false), _use_arcs(false), + _use_nodes(false), _use_arcs(false), _skip_nodes(false), _skip_arcs(false) {} /// \brief Destructor @@ -1294,7 +1294,7 @@ /// file. GraphReader(const std::string& fn, Graph& graph) : _is(new std::ifstream(fn.c_str())), local_is(true), _graph(graph), - _use_nodes(false), _use_edges(false), + _use_nodes(false), _use_edges(false), _skip_nodes(false), _skip_edges(false) {} /// \brief Constructor @@ -1303,7 +1303,7 @@ /// file. GraphReader(const char* fn, Graph& graph) : _is(new std::ifstream(fn)), local_is(true), _graph(graph), - _use_nodes(false), _use_edges(false), + _use_nodes(false), _use_edges(false), _skip_nodes(false), _skip_edges(false) {} /// \brief Destructor diff --git a/lemon/lgf_writer.h b/lemon/lgf_writer.h --- a/lemon/lgf_writer.h +++ b/lemon/lgf_writer.h @@ -181,7 +181,7 @@ public: ValueStorage(const Value& value, const Converter& converter = Converter()) - : _value(value), _converter(converter) {} + : _value(value), _converter(converter) {} virtual std::string get() { return _converter(_value); diff --git a/lemon/list_graph.h b/lemon/list_graph.h --- a/lemon/list_graph.h +++ b/lemon/list_graph.h @@ -494,7 +494,7 @@ Node split(Node n, bool connect = true) { Node b = addNode(); for(OutArcIt e(*this,n);e!=INVALID;) { - OutArcIt f=e; + OutArcIt f=e; ++f; changeSource(e,b); e=f; diff --git a/test/heap_test.cc b/test/heap_test.cc --- a/test/heap_test.cc +++ b/test/heap_test.cc @@ -54,27 +54,27 @@ "8\n" "9\n" "@arcs\n" - " label capacity\n" - "0 5 0 94\n" - "3 9 1 11\n" - "8 7 2 83\n" - "1 2 3 94\n" - "5 7 4 35\n" - "7 4 5 84\n" - "9 5 6 38\n" - "0 4 7 96\n" - "6 7 8 6\n" - "3 1 9 27\n" - "5 2 10 77\n" - "5 6 11 69\n" - "6 5 12 41\n" - "4 6 13 70\n" - "3 2 14 45\n" - "7 9 15 93\n" - "5 9 16 50\n" - "9 0 17 94\n" - "9 6 18 67\n" - "0 9 19 86\n" + " label capacity\n" + "0 5 0 94\n" + "3 9 1 11\n" + "8 7 2 83\n" + "1 2 3 94\n" + "5 7 4 35\n" + "7 4 5 84\n" + "9 5 6 38\n" + "0 4 7 96\n" + "6 7 8 6\n" + "3 1 9 27\n" + "5 2 10 77\n" + "5 6 11 69\n" + "6 5 12 41\n" + "4 6 13 70\n" + "3 2 14 45\n" + "7 9 15 93\n" + "5 9 16 50\n" + "9 0 17 94\n" + "9 6 18 67\n" + "0 9 19 86\n" "@attributes\n" "source 3\n"; @@ -141,7 +141,7 @@ Node t = digraph.target(a); if (dijkstra.reached(s)) { check( dijkstra.dist(t) - dijkstra.dist(s) <= length[a], - "Error in a shortest path tree!"); + "Error in a shortest path tree!"); } }