# HG changeset patch # User Alpar Juttner # Date 1215976187 -3600 # Node ID 81cfc04531e8fcf0a6e72f22ff2871fcb827c416 # Parent 765619b7cbb28b545c57b8000f02a525482a02bc Remove long lines (from all but one file) diff -r 765619b7cbb2 -r 81cfc04531e8 doc/coding_style.dox --- a/doc/coding_style.dox Sun Jul 13 19:51:02 2008 +0100 +++ b/doc/coding_style.dox Sun Jul 13 20:09:47 2008 +0100 @@ -89,7 +89,8 @@ \subsection cs-loc-var Class and instance member variables, auto variables -The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following. +The names of class and instance member variables and auto variables +(=variables used locally in methods) should look like the following. \code all_lower_case_with_underscores diff -r 765619b7cbb2 -r 81cfc04531e8 doc/groups.dox --- a/doc/groups.dox Sun Jul 13 19:51:02 2008 +0100 +++ b/doc/groups.dox Sun Jul 13 20:09:47 2008 +0100 @@ -227,7 +227,8 @@ maximum flow is the \f$f_a\f$ solution of the next optimization problem: \f[ 0 \le f_a \le c_a \f] -\f[ \sum_{v\in\delta^{-}(u)}f_{vu}=\sum_{v\in\delta^{+}(u)}f_{uv} \qquad \forall u \in V \setminus \{s,t\}\f] +\f[ \sum_{v\in\delta^{-}(u)}f_{vu}=\sum_{v\in\delta^{+}(u)}f_{uv} +\qquad \forall u \in V \setminus \{s,t\}\f] \f[ \max \sum_{v\in\delta^{+}(s)}f_{uv} - \sum_{v\in\delta^{-}(s)}f_{vu}\f] LEMON contains several algorithms for solving maximum flow problems: @@ -267,7 +268,8 @@ \f$c_a:A\rightarrow\mathbf{R}^+_0\f$ capacity function. The minimum cut is the \f$X\f$ solution of the next optimization problem: -\f[ \min_{X \subset V, X\not\in \{\emptyset, V\}}\sum_{uv\in A, u\in X, v\not\in X}c_{uv}\f] +\f[ \min_{X \subset V, X\not\in \{\emptyset, V\}} +\sum_{uv\in A, u\in X, v\not\in X}c_{uv}\f] LEMON contains several algorithms related to minimum cut problems: @@ -300,7 +302,8 @@ @ingroup algs \brief Algorithms for planarity checking, embedding and drawing -This group describes the algorithms for planarity checking, embedding and drawing. +This group describes the algorithms for planarity checking, +embedding and drawing. \image html planar.png \image latex planar.eps "Plane graph" width=\textwidth @@ -477,7 +480,8 @@ @ingroup io_group \brief Reading and writing \ref lgf-format "Lemon Graph Format". -This group describes methods for reading and writing \ref lgf-format "Lemon Graph Format". +This group describes methods for reading and writing +\ref lgf-format "Lemon Graph Format". */ /** diff -r 765619b7cbb2 -r 81cfc04531e8 lemon/arg_parser.cc --- a/lemon/arg_parser.cc Sun Jul 13 19:51:02 2008 +0100 +++ b/lemon/arg_parser.cc Sun Jul 13 20:09:47 2008 +0100 @@ -395,16 +395,16 @@ o!=i->second.opts.end();++o) if(_opts.find(*o)->second.set) ++set; if(i->second.mandatory&&!set) { - std::cerr << _command_name - << ": At least one of the following arguments is mandatory.\n"; + std::cerr << _command_name << + ": At least one of the following arguments is mandatory.\n"; ok=false; for(GroupData::Opts::iterator o=i->second.opts.begin(); o!=i->second.opts.end();++o) showHelp(_opts.find(*o)); } if(i->second.only_one&&set>1) { - std::cerr << _command_name - << ": At most one of the following arguments can be given.\n"; + std::cerr << _command_name << + ": At most one of the following arguments can be given.\n"; ok=false; for(GroupData::Opts::iterator o=i->second.opts.begin(); o!=i->second.opts.end();++o) diff -r 765619b7cbb2 -r 81cfc04531e8 lemon/assert.h --- a/lemon/assert.h Sun Jul 13 19:51:02 2008 +0100 +++ b/lemon/assert.h Sun Jul 13 20:09:47 2008 +0100 @@ -151,8 +151,9 @@ /// - \c LEMON_ASSERT_CUSTOM The user can define own assertion handler /// function. /// \code -/// void custom_assert_handler(const char* file, int line, const char* function, -/// const char* message, const char* assertion); +/// void custom_assert_handler(const char* file, int line, +/// const char* function, const char* message, +/// const char* assertion); /// \endcode /// The name of the function should be defined as the \c /// LEMON_CUSTOM_ASSERT_HANDLER macro name. @@ -185,7 +186,7 @@ /// \see LEMON_ASSERT # 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 @@ -240,7 +241,7 @@ (static_cast (!!(exp) ? 0 : ( \ LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ LEMON_FUNCTION_NAME, \ - ::lemon::_assert_bits::cstringify(msg), \ + ::lemon::_assert_bits::cstringify(msg), \ #exp), 0))) # else # define LEMON_DEBUG(exp, msg) (static_cast(0)) diff -r 765619b7cbb2 -r 81cfc04531e8 lemon/bfs.h --- a/lemon/bfs.h Sun Jul 13 19:51:02 2008 +0100 +++ b/lemon/bfs.h Sun Jul 13 20:09:47 2008 +0100 @@ -103,7 +103,8 @@ ///Instantiates a DistMap. ///This function instantiates a \ref DistMap. - ///\param G is the digraph, to which we would like to define the \ref DistMap + ///\param G is the digraph, to which we would like to define + ///the \ref DistMap static DistMap *createDistMap(const GR &G) { return new DistMap(G); @@ -825,7 +826,8 @@ ///Instantiates a DistMap. ///This function instantiates a \ref DistMap. - ///\param g is the digraph, to which we would like to define the \ref DistMap + ///\param g is the digraph, to which we would like to define + ///the \ref DistMap #ifdef DOXYGEN static DistMap *createDistMap(const GR &g) #else @@ -1199,7 +1201,8 @@ /// class. It works with callback mechanism, the BfsVisit object calls /// on every bfs event the \c Visitor class member functions. /// - /// \tparam _Digraph The digraph type the algorithm runs on. The default value is + /// \tparam _Digraph The digraph type the algorithm runs on. + /// The default value is /// \ref ListDigraph. The value of _Digraph is not used directly by Bfs, it /// is only passed to \ref BfsDefaultTraits. /// \tparam _Visitor The Visitor object for the algorithm. The diff -r 765619b7cbb2 -r 81cfc04531e8 lemon/concepts/maps.h --- a/lemon/concepts/maps.h Sun Jul 13 19:51:02 2008 +0100 +++ b/lemon/concepts/maps.h Sun Jul 13 20:09:47 2008 +0100 @@ -43,7 +43,8 @@ public: /// The key type of the map. typedef K Key; - /// The value type of the map. (The type of objects associated with the keys). + /// \brief The value type of the map. + /// (The type of objects associated with the keys). typedef T Value; /// Returns the value associated with the given key. @@ -82,7 +83,8 @@ public: /// The key type of the map. typedef K Key; - /// The value type of the map. (The type of objects associated with the keys). + /// \brief The value type of the map. + /// (The type of objects associated with the keys). typedef T Value; /// Sets the value associated with the given key. @@ -121,7 +123,8 @@ public: /// The key type of the map. typedef K Key; - /// The value type of the map. (The type of objects associated with the keys). + /// \brief The value type of the map. + /// (The type of objects associated with the keys). typedef T Value; /// Returns the value associated with the given key. @@ -154,7 +157,8 @@ typedef True ReferenceMapTag; /// The key type of the map. typedef K Key; - /// The value type of the map. (The type of objects associated with the keys). + /// \brief The value type of the map. + /// (The type of objects associated with the keys). typedef T Value; /// The reference type of the map. typedef R Reference; diff -r 765619b7cbb2 -r 81cfc04531e8 lemon/dfs.h --- a/lemon/dfs.h Sun Jul 13 19:51:02 2008 +0100 +++ b/lemon/dfs.h Sun Jul 13 20:09:47 2008 +0100 @@ -105,7 +105,8 @@ ///Instantiates a DistMap. ///This function instantiates a \ref DistMap. - ///\param G is the digraph, to which we would like to define the \ref DistMap + ///\param G is the digraph, to which we would like to define + ///the \ref DistMap static DistMap *createDistMap(const GR &G) { return new DistMap(G); @@ -808,7 +809,8 @@ ///Instantiates a DistMap. ///This function instantiates a \ref DistMap. - ///\param g is the digraph, to which we would like to define the \ref DistMap + ///\param g is the digraph, to which we would like to define + ///the \ref DistMap #ifdef DOXYGEN static DistMap *createDistMap(const GR &g) #else @@ -1193,7 +1195,8 @@ /// class. It works with callback mechanism, the DfsVisit object calls /// on every dfs event the \c Visitor class member functions. /// - /// \tparam _Digraph The digraph type the algorithm runs on. The default value is + /// \tparam _Digraph The digraph type the algorithm runs on. + /// The default value is /// \ref ListDigraph. The value of _Digraph is not used directly by Dfs, it /// is only passed to \ref DfsDefaultTraits. /// \tparam _Visitor The Visitor object for the algorithm. The diff -r 765619b7cbb2 -r 81cfc04531e8 lemon/dijkstra.h --- a/lemon/dijkstra.h Sun Jul 13 19:51:02 2008 +0100 +++ b/lemon/dijkstra.h Sun Jul 13 20:09:47 2008 +0100 @@ -173,7 +173,8 @@ ///Instantiates a DistMap. ///This function instantiates a \ref DistMap. - ///\param G is the digraph, to which we would like to define the \ref DistMap + ///\param G is the digraph, to which we would like to define + ///the \ref DistMap static DistMap *createDistMap(const GR &G) { return new DistMap(G); @@ -336,8 +337,8 @@ /// template struct DefPredMap - : public Dijkstra< Digraph, LengthMap, DefPredMapTraits > { - typedef Dijkstra< Digraph, LengthMap, DefPredMapTraits > Create; + : public Dijkstra< Digraph, LengthMap, DefPredMapTraits > { + typedef Dijkstra< Digraph, LengthMap, DefPredMapTraits > Create; }; template @@ -372,8 +373,8 @@ /// template struct DefProcessedMap - : public Dijkstra< Digraph, LengthMap, DefProcessedMapTraits > { - typedef Dijkstra< Digraph, LengthMap, DefProcessedMapTraits > Create; + : public Dijkstra< Digraph, LengthMap, DefProcessedMapTraits > { + typedef Dijkstra< Digraph, LengthMap, DefProcessedMapTraits > Create; }; struct DefDigraphProcessedMapTraits : public Traits { @@ -392,7 +393,8 @@ template struct DefProcessedMapToBeDefaultMap : public Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> { - typedef Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> Create; + typedef Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> + Create; }; template @@ -415,8 +417,8 @@ /// template > struct DefHeap - : public Dijkstra< Digraph, LengthMap, DefHeapTraits > { - typedef Dijkstra< Digraph, LengthMap, DefHeapTraits > Create; + : public Dijkstra< Digraph, LengthMap, DefHeapTraits > { + typedef Dijkstra< Digraph, LengthMap, DefHeapTraits > Create; }; template @@ -440,8 +442,8 @@ ///parameter and the heap's constructor waits for the cross reference. template > struct DefStandardHeap - : public Dijkstra< Digraph, LengthMap, DefStandardHeapTraits > { - typedef Dijkstra< Digraph, LengthMap, DefStandardHeapTraits > + : public Dijkstra< Digraph, LengthMap, DefStandardHeapTraits > { + typedef Dijkstra< Digraph, LengthMap, DefStandardHeapTraits > Create; }; @@ -976,7 +978,8 @@ ///Instantiates a DistMap. ///This function instantiates a \ref DistMap. - ///\param g is the digraph, to which we would like to define the \ref DistMap + ///\param g is the digraph, to which we would like to define + ///the \ref DistMap #ifdef DOXYGEN static DistMap *createDistMap(const GR &g) #else diff -r 765619b7cbb2 -r 81cfc04531e8 lemon/graph_to_eps.h --- a/lemon/graph_to_eps.h Sun Jul 13 19:51:02 2008 +0100 +++ b/lemon/graph_to_eps.h Sun Jul 13 20:09:47 2008 +0100 @@ -142,7 +142,8 @@ ///Constructor ///\param _g Reference to the graph to be printed. ///\param _os Reference to the output stream. - ///\param _os Reference to the output stream. By default it is std::cout. + ///\param _os Reference to the output stream. + ///By default it is std::cout. ///\param _pros If it is \c true, then the \c ostream referenced by \c _os ///will be explicitly deallocated by the destructor. DefaultGraphToEpsTraits(const G &_g,std::ostream& _os=std::cout, @@ -781,9 +782,11 @@ //x1 y1 x2 y2 x3 y3 cr cg cb w os << "/lb { setlinewidth setrgbcolor newpath moveto\n" << " 4 2 roll 1 index 1 index curveto stroke } bind def\n"; - os << "/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def\n"; + os << "/l { setlinewidth setrgbcolor newpath moveto lineto stroke }" + << " bind def\n"; //x y r - os << "/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def\n"; + os << "/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath }" + << " bind def\n"; //x y r os << "/sq { newpath 2 index 1 index add 2 index 2 index add moveto\n" << " 2 index 1 index sub 2 index 2 index add lineto\n" @@ -811,8 +814,10 @@ << " 1.5 mul mul setlinewidth\n" << " newpath 5 index 5 index moveto " << "5 index 5 index 5 index 3.01 mul sub\n" - << " lineto 5 index 4 index .7 mul sub 5 index 5 index 2.2 mul sub moveto\n" - << " 5 index 4 index .7 mul add 5 index 5 index 2.2 mul sub lineto stroke\n" + << " lineto 5 index 4 index .7 mul sub 5 index 5 index 2.2 mul sub" + << " moveto\n" + << " 5 index 4 index .7 mul add 5 index 5 index 2.2 mul sub lineto " + << "stroke\n" << " 5 index 5 index 5 index c fill\n" << " setrgbcolor " << 1+_nodeBorderQuotient << " div c fill\n" << " } bind def\n"; @@ -826,7 +831,8 @@ << " 1 index 1 index lineto\n" << " 1 index 1 index 7 index sub moveto\n" << " 1 index 1 index lineto\n" - << " exch 5 index 3 sqrt .5 mul mul sub exch 5 index .5 mul sub lineto\n" + << " exch 5 index 3 sqrt .5 mul mul sub exch 5 index .5 mul sub" + << " lineto\n" << " stroke\n" << " 5 index 5 index 5 index c fill\n" << " setrgbcolor " << 1+_nodeBorderQuotient << " div c fill\n" @@ -838,9 +844,10 @@ // l dx_norm dy_norm os << "/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def\n"; //len w dx_norm dy_norm x1 y1 cr cg cb - os << "/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def\n" + os << "/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx " + << "exch def\n" << " /w exch def /len exch def\n" - // << " 0.1 setlinewidth x1 y1 moveto dx len mul dy len mul rlineto stroke" + //<< "0.1 setlinewidth x1 y1 moveto dx len mul dy len mul rlineto stroke" << " newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto\n" << " len w sub arrl sub dx dy lrl\n" << " arrw dy dx neg lrl\n" @@ -902,7 +909,8 @@ //\todo better 'epsilon' would be nice here. dim2::Point d(dvec/std::max(l,EPSILON)); dim2::Point m; -// m=dim2::Point(mycoords[g.target(*i)]+mycoords[g.source(*i)])/2.0; +// m=dim2::Point(mycoords[g.target(*i)]+ +// mycoords[g.source(*i)])/2.0; // m=dim2::Point(mycoords[g.source(*i)])+ // dvec*(double(_nodeSizes[g.source(*i)])/ @@ -938,7 +946,8 @@ // node_shape=_nodeShapes[g.source(*e)]; // t1=0;t2=1; // for(int i=0;i diff -r 765619b7cbb2 -r 81cfc04531e8 lemon/time_measure.h --- a/lemon/time_measure.h Sun Jul 13 19:51:02 2008 +0100 +++ b/lemon/time_measure.h Sun Jul 13 20:09:47 2008 +0100 @@ -314,7 +314,8 @@ ///but it provides a bit finer control on the execution. ///The \ref Timer also counts the number of \ref start() ///executions, and is stops only after the same amount (or more) - ///\ref stop() "stop()"s. This can be useful e.g. to compute the running time + ///\ref stop() "stop()"s. This can be useful e.g. to compute + ///the running time ///of recursive functions. /// diff -r 765619b7cbb2 -r 81cfc04531e8 test/dijkstra_test.cc --- a/test/dijkstra_test.cc Sun Jul 13 19:51:02 2008 +0100 +++ b/test/dijkstra_test.cc Sun Jul 13 20:09:47 2008 +0100 @@ -110,8 +110,10 @@ for(ArcIt e(G); e!=INVALID; ++e) { Node u=G.source(e); Node v=G.target(e); - check( !dijkstra_test.reached(u) || (dijkstra_test.dist(v) - dijkstra_test.dist(u) <= length[e]), - "dist(target)-dist(source)-arc_length= " << dijkstra_test.dist(v) - dijkstra_test.dist(u) - length[e]); + check( !dijkstra_test.reached(u) || + (dijkstra_test.dist(v) - dijkstra_test.dist(u) <= length[e]), + "dist(target)-dist(source)-arc_length= " << + dijkstra_test.dist(v) - dijkstra_test.dist(u) - length[e]); } for(NodeIt v(G); v!=INVALID; ++v){ @@ -121,7 +123,8 @@ Node u=G.source(e); check(u==dijkstra_test.predNode(v),"Wrong tree."); check(dijkstra_test.dist(v) - dijkstra_test.dist(u) == length[e], - "Wrong distance! Difference: " << std::abs(dijkstra_test.dist(v) - dijkstra_test.dist(u) - length[e])); + "Wrong distance! Difference: " << + std::abs(dijkstra_test.dist(v)-dijkstra_test.dist(u)-length[e])); } } diff -r 765619b7cbb2 -r 81cfc04531e8 test/graph_utils_test.cc --- a/test/graph_utils_test.cc Sun Jul 13 19:51:02 2008 +0100 +++ b/test/graph_utils_test.cc Sun Jul 13 20:09:47 2008 +0100 @@ -92,12 +92,15 @@ Arc con2 = al2(src, trg); Arc con3 = al3(src, trg); Arc con4 = findArc(fg, src, trg); - check(con1 == con2 && con2 == con3 && con3 == con4, "Different results.") + check(con1 == con2 && con2 == con3 && con3 == con4, + "Different results.") check(con1 != INVALID, "There is no connecting arc."); check(fg.source(con1) == src, "Wrong source."); check(fg.target(con1) == trg, "Wrong target."); - check(al3(src, trg, con3) == INVALID, "There is more connecting arc."); - check(findArc(fg, src, trg, con4) == INVALID, "There is more connecting arc."); + check(al3(src, trg, con3) == INVALID, + "There is more connecting arc."); + check(findArc(fg, src, trg, con4) == INVALID, + "There is more connecting arc."); } } } @@ -123,7 +126,8 @@ for (NodeIt trg(graph); trg != INVALID; ++trg) { for (ConEdgeIt con(graph, src, trg); con != INVALID; ++con) { check( (graph.u(con) == src && graph.v(con) == trg) || - (graph.v(con) == src && graph.u(con) == trg), "Wrong end nodes."); + (graph.v(con) == src && graph.u(con) == trg), + "Wrong end nodes."); ++found[con]; check(found[con] <= 2, "The edge found more than twice."); } diff -r 765619b7cbb2 -r 81cfc04531e8 test/maps_test.cc --- a/test/maps_test.cc Sun Jul 13 19:51:02 2008 +0100 +++ b/test/maps_test.cc Sun Jul 13 20:09:47 2008 +0100 @@ -103,7 +103,8 @@ ConstMap > map7 = map6; map6 = constMap(); map7 = constMap >(); - check(map6[A()] == 10 && map7[A()] == 10, "Something is wrong with ConstMap"); + check(map6[A()] == 10 && map7[A()] == 10, + "Something is wrong with ConstMap"); } // IdentityMap @@ -114,7 +115,8 @@ map1 = identityMap(); checkConcept, IdentityMap >(); - check(identityMap()[1.0] == 1.0 && identityMap()[3.14] == 3.14, + check(identityMap()[1.0] == 1.0 && + identityMap()[3.14] == 3.14, "Something is wrong with IdentityMap"); } @@ -155,10 +157,12 @@ SparseMap map7 = sparseMap(m); SparseMap map8 = sparseMap(m,10); - check(map5[1.0] == 0 && map5[3.14] == 0 && map6[1.0] == 10 && map6[3.14] == 10, + check(map5[1.0] == 0 && map5[3.14] == 0 && + map6[1.0] == 10 && map6[3.14] == 10, "Something is wrong with SparseMap"); map5[1.0] = map6[3.14] = 100; - check(map5[1.0] == 100 && map5[3.14] == 0 && map6[1.0] == 10 && map6[3.14] == 100, + check(map5[1.0] == 100 && map5[3.14] == 0 && + map6[1.0] == 10 && map6[3.14] == 100, "Something is wrong with SparseMap"); } @@ -171,7 +175,8 @@ SparseMap m1(false); m1[3.14] = true; RangeMap m2(2); m2[0] = 3.0; m2[1] = 3.14; - check(!composeMap(m1,m2)[0] && composeMap(m1,m2)[1], "Something is wrong with ComposeMap") + check(!composeMap(m1,m2)[0] && composeMap(m1,m2)[1], + "Something is wrong with ComposeMap") } // CombineMap @@ -196,9 +201,12 @@ checkConcept, MapToFunctor > >(); MapToFunctor > map(ReadMap()); - check(functorToMap(&func)[A()] == 3, "Something is wrong with FunctorToMap"); - check(mapToFunctor(constMap(2))(A()) == 2, "Something is wrong with MapToFunctor"); - check(mapToFunctor(functorToMap(&func))(A()) == 3 && mapToFunctor(functorToMap(&func))[A()] == 3, + check(functorToMap(&func)[A()] == 3, + "Something is wrong with FunctorToMap"); + check(mapToFunctor(constMap(2))(A()) == 2, + "Something is wrong with MapToFunctor"); + check(mapToFunctor(functorToMap(&func))(A()) == 3 && + mapToFunctor(functorToMap(&func))[A()] == 3, "Something is wrong with FunctorToMap or MapToFunctor"); check(functorToMap(mapToFunctor(constMap(2)))[A()] == 2, "Something is wrong with FunctorToMap or MapToFunctor"); @@ -206,7 +214,8 @@ // ConvertMap { - checkConcept, ConvertMap, double> >(); + checkConcept, + ConvertMap, double> >(); ConvertMap, int> map1(rangeMap(1, true)); ConvertMap, int> map2 = convertMap(rangeMap(2, false)); } @@ -224,7 +233,8 @@ ForkMap map1(m1,m2); ForkMap map2 = forkMap(m2,m1); map2.set(5, 10); - check(m1[1] == -1 && m1[5] == 10 && m2[1] == -1 && m2[5] == 10 && map2[1] == -1 && map2[5] == 10, + check(m1[1] == -1 && m1[5] == 10 && m2[1] == -1 && + m2[5] == 10 && map2[1] == -1 && map2[5] == 10, "Something is wrong with ForkMap"); } @@ -241,10 +251,14 @@ ConstMap c1(1.0), c2(3.14); IdentityMap im; ConvertMap, double> id(im); - check(addMap(c1,id)[0] == 1.0 && addMap(c1,id)[10] == 11.0, "Something is wrong with AddMap"); - check(subMap(id,c1)[0] == -1.0 && subMap(id,c1)[10] == 9.0, "Something is wrong with SubMap"); - check(mulMap(id,c2)[0] == 0 && mulMap(id,c2)[2] == 6.28, "Something is wrong with MulMap"); - check(divMap(c2,id)[1] == 3.14 && divMap(c2,id)[2] == 1.57, "Something is wrong with DivMap"); + check(addMap(c1,id)[0] == 1.0 && addMap(c1,id)[10] == 11.0, + "Something is wrong with AddMap"); + check(subMap(id,c1)[0] == -1.0 && subMap(id,c1)[10] == 9.0, + "Something is wrong with SubMap"); + check(mulMap(id,c2)[0] == 0 && mulMap(id,c2)[2] == 6.28, + "Something is wrong with MulMap"); + check(divMap(c2,id)[1] == 3.14 && divMap(c2,id)[2] == 1.57, + "Something is wrong with DivMap"); checkConcept >(); checkConcept >(); @@ -256,11 +270,13 @@ check(shiftMap(id, 2.0)[1] == 3.0 && shiftMap(id, 2.0)[10] == 12.0, "Something is wrong with ShiftMap"); - check(shiftWriteMap(id, 2.0)[1] == 3.0 && shiftWriteMap(id, 2.0)[10] == 12.0, + check(shiftWriteMap(id, 2.0)[1] == 3.0 && + shiftWriteMap(id, 2.0)[10] == 12.0, "Something is wrong with ShiftWriteMap"); check(scaleMap(id, 2.0)[1] == 2.0 && scaleMap(id, 2.0)[10] == 20.0, "Something is wrong with ScaleMap"); - check(scaleWriteMap(id, 2.0)[1] == 2.0 && scaleWriteMap(id, 2.0)[10] == 20.0, + check(scaleWriteMap(id, 2.0)[1] == 2.0 && + scaleWriteMap(id, 2.0)[10] == 20.0, "Something is wrong with ScaleWriteMap"); check(negMap(id)[1] == -1.0 && negMap(id)[-10] == 10.0, "Something is wrong with NegMap"); @@ -289,12 +305,16 @@ FalseMap fm; RangeMap rm(2); rm[0] = true; rm[1] = false; - check(andMap(tm,rm)[0] && !andMap(tm,rm)[1] && !andMap(fm,rm)[0] && !andMap(fm,rm)[1], + check(andMap(tm,rm)[0] && !andMap(tm,rm)[1] && + !andMap(fm,rm)[0] && !andMap(fm,rm)[1], "Something is wrong with AndMap"); - check(orMap(tm,rm)[0] && orMap(tm,rm)[1] && orMap(fm,rm)[0] && !orMap(fm,rm)[1], + check(orMap(tm,rm)[0] && orMap(tm,rm)[1] && + orMap(fm,rm)[0] && !orMap(fm,rm)[1], "Something is wrong with OrMap"); - check(!notMap(rm)[0] && notMap(rm)[1], "Something is wrong with NotMap"); - check(!notWriteMap(rm)[0] && notWriteMap(rm)[1], "Something is wrong with NotWriteMap"); + check(!notMap(rm)[0] && notMap(rm)[1], + "Something is wrong with NotMap"); + check(!notWriteMap(rm)[0] && notWriteMap(rm)[1], + "Something is wrong with NotWriteMap"); ConstMap cm(2.0); IdentityMap im; @@ -310,7 +330,8 @@ typedef std::vector vec; vec v1; vec v2(10); - LoggerBoolMap > map1(std::back_inserter(v1)); + LoggerBoolMap > + map1(std::back_inserter(v1)); LoggerBoolMap map2(v2.begin()); map1.set(10, false); map1.set(20, true); map2.set(20, true); @@ -318,7 +339,8 @@ map1.set(50, true); map2.set(50, true); map1.set(60, true); map2.set(60, true); check(v1.size() == 3 && v2.size() == 10 && - v1[0]==20 && v1[1]==50 && v1[2]==60 && v2[0]==20 && v2[1]==50 && v2[2]==60, + v1[0]==20 && v1[1]==50 && v1[2]==60 && + v2[0]==20 && v2[1]==50 && v2[2]==60, "Something is wrong with LoggerBoolMap"); int i = 0;