gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Remove long lines (from all but one file)
0 14 0
default
14 files changed with 134 insertions and 75 deletions:
↑ Collapse diff ↑
Ignore white space 6 line context
... ...
@@ -91,3 +91,4 @@
91 91

	
92
The names of class and instance member variables and auto variables (=variables used locally in methods) should look like the following.
92
The names of class and instance member variables and auto variables
93
(=variables used locally in methods) should look like the following.
93 94

	
Ignore white space 6 line context
... ...
@@ -229,3 +229,4 @@
229 229
\f[ 0 \le f_a \le c_a \f]
230
\f[ \sum_{v\in\delta^{-}(u)}f_{vu}=\sum_{v\in\delta^{+}(u)}f_{uv} \qquad \forall u \in V \setminus \{s,t\}\f]
230
\f[ \sum_{v\in\delta^{-}(u)}f_{vu}=\sum_{v\in\delta^{+}(u)}f_{uv}
231
\qquad \forall u \in V \setminus \{s,t\}\f]
231 232
\f[ \max \sum_{v\in\delta^{+}(s)}f_{uv} - \sum_{v\in\delta^{-}(s)}f_{vu}\f]
... ...
@@ -269,3 +270,4 @@
269 270

	
270
\f[ \min_{X \subset V, X\not\in \{\emptyset, V\}}\sum_{uv\in A, u\in X, v\not\in X}c_{uv}\f]
271
\f[ \min_{X \subset V, X\not\in \{\emptyset, V\}}
272
\sum_{uv\in A, u\in X, v\not\in X}c_{uv}\f]
271 273

	
... ...
@@ -302,3 +304,4 @@
302 304

	
303
This group describes the algorithms for planarity checking, embedding and drawing.
305
This group describes the algorithms for planarity checking,
306
embedding and drawing.
304 307

	
... ...
@@ -479,3 +482,4 @@
479 482

	
480
This group describes methods for reading and writing \ref lgf-format "Lemon Graph Format".
483
This group describes methods for reading and writing
484
\ref lgf-format "Lemon Graph Format".
481 485
*/
Ignore white space 6 line context
... ...
@@ -397,4 +397,4 @@
397 397
          if(i->second.mandatory&&!set) {
398
            std::cerr << _command_name
399
                      << ": At least one of the following arguments is mandatory.\n";
398
            std::cerr << _command_name <<
399
              ": At least one of the following arguments is mandatory.\n";
400 400
            ok=false;
... ...
@@ -405,4 +405,4 @@
405 405
          if(i->second.only_one&&set>1) {
406
            std::cerr << _command_name
407
                      << ": At most one of the following arguments can be given.\n";
406
            std::cerr << _command_name <<
407
              ": At most one of the following arguments can be given.\n";
408 408
            ok=false;
Ignore white space 6 line context
... ...
@@ -153,4 +153,5 @@
153 153
///   \code
154
///     void custom_assert_handler(const char* file, int line, const char* function,
155
///                                const char* message, const char* assertion);
154
///     void custom_assert_handler(const char* file, int line,
155
///                                const char* function, const char* message,
156
///                                const char* assertion);
156 157
///   \endcode
... ...
@@ -187,3 +188,3 @@
187 188
  (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME,        \
188
                        ::lemon::_assert_bits::cstringify(msg),                \
189
                        ::lemon::_assert_bits::cstringify(msg),          \
189 190
                        static_cast<const char*>(0)))
... ...
@@ -242,3 +243,3 @@
242 243
                                LEMON_FUNCTION_NAME, \
243
                                ::lemon::_assert_bits::cstringify(msg),        \
244
                                ::lemon::_assert_bits::cstringify(msg),     \
244 245
                                #exp), 0)))
Ignore white space 6 line context
... ...
@@ -105,3 +105,4 @@
105 105
    ///This function instantiates a \ref DistMap.
106
    ///\param G is the digraph, to which we would like to define the \ref DistMap
106
    ///\param G is the digraph, to which we would like to define
107
    ///the \ref DistMap
107 108
    static DistMap *createDistMap(const GR &G)
... ...
@@ -827,3 +828,4 @@
827 828
    ///This function instantiates a \ref DistMap.
828
    ///\param g is the digraph, to which we would like to define the \ref DistMap
829
    ///\param g is the digraph, to which we would like to define
830
    ///the \ref DistMap
829 831
#ifdef DOXYGEN
... ...
@@ -1201,3 +1203,4 @@
1201 1203
  ///
1202
  /// \tparam _Digraph The digraph type the algorithm runs on. The default value is
1204
  /// \tparam _Digraph The digraph type the algorithm runs on.
1205
  /// The default value is
1203 1206
  /// \ref ListDigraph. The value of _Digraph is not used directly by Bfs, it
Ignore white space 6 line context
... ...
@@ -45,3 +45,4 @@
45 45
      typedef K Key;
46
      /// The value type of the map. (The type of objects associated with the keys).
46
      /// \brief The value type of the map.
47
      /// (The type of objects associated with the keys).
47 48
      typedef T Value;
... ...
@@ -84,3 +85,4 @@
84 85
      typedef K Key;
85
      /// The value type of the map. (The type of objects associated with the keys).
86
      /// \brief The value type of the map.
87
      /// (The type of objects associated with the keys).
86 88
      typedef T Value;
... ...
@@ -123,3 +125,4 @@
123 125
      typedef K Key;
124
      /// The value type of the map. (The type of objects associated with the keys).
126
      /// \brief The value type of the map.
127
      /// (The type of objects associated with the keys).
125 128
      typedef T Value;
... ...
@@ -156,3 +159,4 @@
156 159
      typedef K Key;
157
      /// The value type of the map. (The type of objects associated with the keys).
160
      /// \brief The value type of the map.
161
      /// (The type of objects associated with the keys).
158 162
      typedef T Value;
Ignore white space 6 line context
... ...
@@ -107,3 +107,4 @@
107 107
    ///This function instantiates a \ref DistMap.
108
    ///\param G is the digraph, to which we would like to define the \ref DistMap
108
    ///\param G is the digraph, to which we would like to define
109
    ///the \ref DistMap
109 110
    static DistMap *createDistMap(const GR &G)
... ...
@@ -810,3 +811,4 @@
810 811
    ///This function instantiates a \ref DistMap.
811
    ///\param g is the digraph, to which we would like to define the \ref DistMap
812
    ///\param g is the digraph, to which we would like to define
813
    ///the \ref DistMap
812 814
#ifdef DOXYGEN
... ...
@@ -1195,3 +1197,4 @@
1195 1197
  ///
1196
  /// \tparam _Digraph The digraph type the algorithm runs on. The default value is
1198
  /// \tparam _Digraph The digraph type the algorithm runs on.
1199
  /// The default value is
1197 1200
  /// \ref ListDigraph. The value of _Digraph is not used directly by Dfs, it
Show white space 6 line context
... ...
@@ -175,3 +175,4 @@
175 175
    ///This function instantiates a \ref DistMap.
176
    ///\param G is the digraph, to which we would like to define the \ref DistMap
176
    ///\param G is the digraph, to which we would like to define
177
    ///the \ref DistMap
177 178
    static DistMap *createDistMap(const GR &G)
... ...
@@ -338,4 +339,4 @@
338 339
    struct DefPredMap
339
      : public Dijkstra< Digraph,        LengthMap, DefPredMapTraits<T> > {
340
      typedef Dijkstra< Digraph,        LengthMap, DefPredMapTraits<T> > Create;
340
      : public Dijkstra< Digraph, LengthMap, DefPredMapTraits<T> > {
341
      typedef Dijkstra< Digraph, LengthMap, DefPredMapTraits<T> > Create;
341 342
    };
... ...
@@ -374,4 +375,4 @@
374 375
    struct DefProcessedMap
375
      : public Dijkstra< Digraph,        LengthMap, DefProcessedMapTraits<T> > {
376
      typedef Dijkstra< Digraph,        LengthMap, DefProcessedMapTraits<T> > Create;
376
      : public Dijkstra< Digraph, LengthMap, DefProcessedMapTraits<T> > {
377
      typedef Dijkstra< Digraph, LengthMap, DefProcessedMapTraits<T> > Create;
377 378
    };
... ...
@@ -394,3 +395,4 @@
394 395
      : public Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> {
395
      typedef Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> Create;
396
      typedef Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits>
397
      Create;
396 398
    };
... ...
@@ -417,4 +419,4 @@
417 419
    struct DefHeap
418
      : public Dijkstra< Digraph,        LengthMap, DefHeapTraits<H, CR> > {
419
      typedef Dijkstra< Digraph,        LengthMap, DefHeapTraits<H, CR> > Create;
420
      : public Dijkstra< Digraph, LengthMap, DefHeapTraits<H, CR> > {
421
      typedef Dijkstra< Digraph, LengthMap, DefHeapTraits<H, CR> > Create;
420 422
    };
... ...
@@ -442,4 +444,4 @@
442 444
    struct DefStandardHeap
443
      : public Dijkstra< Digraph,        LengthMap, DefStandardHeapTraits<H, CR> > {
444
      typedef Dijkstra< Digraph,        LengthMap, DefStandardHeapTraits<H, CR> >
445
      : public Dijkstra< Digraph, LengthMap, DefStandardHeapTraits<H, CR> > {
446
      typedef Dijkstra< Digraph, LengthMap, DefStandardHeapTraits<H, CR> >
445 447
      Create;
... ...
@@ -978,3 +980,4 @@
978 980
    ///This function instantiates a \ref DistMap.
979
    ///\param g is the digraph, to which we would like to define the \ref DistMap
981
    ///\param g is the digraph, to which we would like to define
982
    ///the \ref DistMap
980 983
#ifdef DOXYGEN
Ignore white space 6 line context
... ...
@@ -144,3 +144,4 @@
144 144
  ///\param _os Reference to the output stream.
145
  ///\param _os Reference to the output stream. By default it is <tt>std::cout</tt>.
145
  ///\param _os Reference to the output stream.
146
  ///By default it is <tt>std::cout</tt>.
146 147
  ///\param _pros If it is \c true, then the \c ostream referenced by \c _os
... ...
@@ -783,5 +784,7 @@
783 784
       << "      4 2 roll 1 index 1 index curveto stroke } bind def\n";
784
    os << "/l { setlinewidth setrgbcolor newpath moveto lineto stroke } bind def\n";
785
    os << "/l { setlinewidth setrgbcolor newpath moveto lineto stroke }"
786
       << " bind def\n";
785 787
    //x y r
786
    os << "/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath } bind def\n";
788
    os << "/c { newpath dup 3 index add 2 index moveto 0 360 arc closepath }"
789
       << " bind def\n";
787 790
    //x y r
... ...
@@ -813,4 +816,6 @@
813 816
       << "5 index 5 index 5 index 3.01 mul sub\n"
814
       << "  lineto 5 index 4 index .7 mul sub 5 index 5 index 2.2 mul sub moveto\n"
815
       << "  5 index 4 index .7 mul add 5 index 5 index 2.2 mul sub lineto stroke\n"
817
       << "  lineto 5 index 4 index .7 mul sub 5 index 5 index 2.2 mul sub"
818
       << " moveto\n"
819
       << "  5 index 4 index .7 mul add 5 index 5 index 2.2 mul sub lineto "
820
       << "stroke\n"
816 821
       << "  5 index 5 index 5 index c fill\n"
... ...
@@ -828,3 +833,4 @@
828 833
       << "  1 index 1 index lineto\n"
829
       << "  exch 5 index 3 sqrt .5 mul mul sub exch 5 index .5 mul sub lineto\n"
834
       << "  exch 5 index 3 sqrt .5 mul mul sub exch 5 index .5 mul sub"
835
       << " lineto\n"
830 836
       << "  stroke\n"
... ...
@@ -840,5 +846,6 @@
840 846
    //len w dx_norm dy_norm x1 y1 cr cg cb
841
    os << "/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx exch def\n"
847
    os << "/arr { setrgbcolor /y1 exch def /x1 exch def /dy exch def /dx "
848
       << "exch def\n"
842 849
       << "       /w exch def /len exch def\n"
843
      //         << "       0.1 setlinewidth x1 y1 moveto dx len mul dy len mul rlineto stroke"
850
      //<< "0.1 setlinewidth x1 y1 moveto dx len mul dy len mul rlineto stroke"
844 851
       << "       newpath x1 dy w 2 div mul add y1 dx w 2 div mul sub moveto\n"
... ...
@@ -904,3 +911,4 @@
904 911
           dim2::Point<double> m;
905
//           m=dim2::Point<double>(mycoords[g.target(*i)]+mycoords[g.source(*i)])/2.0;
912
//           m=dim2::Point<double>(mycoords[g.target(*i)]+
913
//                                 mycoords[g.source(*i)])/2.0;
906 914

	
... ...
@@ -940,3 +948,4 @@
940 948
//               for(int i=0;i<INTERPOL_PREC;++i)
941
//                 if(isInsideNode(bez((t1+t2)/2)-t,rn,node_shape)) t1=(t1+t2)/2;
949
//                 if(isInsideNode(bez((t1+t2)/2)-t,rn,node_shape))
950
//                   t1=(t1+t2)/2;
942 951
//                 else t2=(t1+t2)/2;
Ignore white space 6 line context
... ...
@@ -446,3 +446,4 @@
446 446
  /// useNodes() functions. Another application of multipass reading when
447
  /// paths are given as a node map or an arc map. It is impossible to read this in
447
  /// paths are given as a node map or an arc map.
448
  /// It is impossible to read this in
448 449
  /// a single pass, because the arcs are not constructed when the node
Ignore white space 6 line context
... ...
@@ -316,3 +316,4 @@
316 316
    ///executions, and is stops only after the same amount (or more)
317
    ///\ref stop() "stop()"s. This can be useful e.g. to compute the running time
317
    ///\ref stop() "stop()"s. This can be useful e.g. to compute
318
    ///the running time
318 319
    ///of recursive functions.
Ignore white space 6 line context
... ...
@@ -112,4 +112,6 @@
112 112
    Node v=G.target(e);
113
    check( !dijkstra_test.reached(u) || (dijkstra_test.dist(v) - dijkstra_test.dist(u) <= length[e]),
114
           "dist(target)-dist(source)-arc_length= " << dijkstra_test.dist(v) - dijkstra_test.dist(u) - length[e]);
113
    check( !dijkstra_test.reached(u) ||
114
           (dijkstra_test.dist(v) - dijkstra_test.dist(u) <= length[e]),
115
           "dist(target)-dist(source)-arc_length= " <<
116
           dijkstra_test.dist(v) - dijkstra_test.dist(u) - length[e]);
115 117
  }
... ...
@@ -123,3 +125,4 @@
123 125
      check(dijkstra_test.dist(v) - dijkstra_test.dist(u) == length[e],
124
            "Wrong distance! Difference: " << std::abs(dijkstra_test.dist(v) - dijkstra_test.dist(u) - length[e]));
126
            "Wrong distance! Difference: " <<
127
            std::abs(dijkstra_test.dist(v)-dijkstra_test.dist(u)-length[e]));
125 128
    }
Ignore white space 6 line context
... ...
@@ -94,3 +94,4 @@
94 94
        Arc con4 = findArc(fg, src, trg);
95
        check(con1 == con2 && con2 == con3 && con3 == con4, "Different results.")
95
        check(con1 == con2 && con2 == con3 && con3 == con4,
96
              "Different results.")
96 97
        check(con1 != INVALID, "There is no connecting arc.");
... ...
@@ -98,4 +99,6 @@
98 99
        check(fg.target(con1) == trg, "Wrong target.");
99
        check(al3(src, trg, con3) == INVALID, "There is more connecting arc.");
100
        check(findArc(fg, src, trg, con4) == INVALID, "There is more connecting arc.");
100
        check(al3(src, trg, con3) == INVALID,
101
              "There is more connecting arc.");
102
        check(findArc(fg, src, trg, con4) == INVALID,
103
              "There is more connecting arc.");
101 104
      }
... ...
@@ -125,3 +128,4 @@
125 128
        check( (graph.u(con) == src && graph.v(con) == trg) ||
126
               (graph.v(con) == src && graph.u(con) == trg), "Wrong end nodes.");
129
               (graph.v(con) == src && graph.u(con) == trg),
130
               "Wrong end nodes.");
127 131
        ++found[con];
Ignore white space 6 line context
... ...
@@ -105,3 +105,4 @@
105 105
    map7 = constMap<A,Const<int,10> >();
106
    check(map6[A()] == 10 && map7[A()] == 10, "Something is wrong with ConstMap");
106
    check(map6[A()] == 10 && map7[A()] == 10,
107
          "Something is wrong with ConstMap");
107 108
  }
... ...
@@ -116,3 +117,4 @@
116 117
    checkConcept<ReadMap<double,double>, IdentityMap<double> >();
117
    check(identityMap<double>()[1.0] == 1.0 && identityMap<double>()[3.14] == 3.14,
118
    check(identityMap<double>()[1.0] == 1.0 &&
119
          identityMap<double>()[3.14] == 3.14,
118 120
          "Something is wrong with IdentityMap");
... ...
@@ -157,6 +159,8 @@
157 159

	
158
    check(map5[1.0] == 0 && map5[3.14] == 0 && map6[1.0] == 10 && map6[3.14] == 10,
160
    check(map5[1.0] == 0 && map5[3.14] == 0 &&
161
          map6[1.0] == 10 && map6[3.14] == 10,
159 162
          "Something is wrong with SparseMap");
160 163
    map5[1.0] = map6[3.14] = 100;
161
    check(map5[1.0] == 100 && map5[3.14] == 0 && map6[1.0] == 10 && map6[3.14] == 100,
164
    check(map5[1.0] == 100 && map5[3.14] == 0 &&
165
          map6[1.0] == 10 && map6[3.14] == 100,
162 166
          "Something is wrong with SparseMap");
... ...
@@ -173,3 +177,4 @@
173 177
    RangeMap<double> m2(2); m2[0] = 3.0; m2[1] = 3.14;
174
    check(!composeMap(m1,m2)[0] && composeMap(m1,m2)[1], "Something is wrong with ComposeMap")
178
    check(!composeMap(m1,m2)[0] && composeMap(m1,m2)[1],
179
          "Something is wrong with ComposeMap")
175 180
  }
... ...
@@ -198,5 +203,8 @@
198 203

	
199
    check(functorToMap(&func)[A()] == 3, "Something is wrong with FunctorToMap");
200
    check(mapToFunctor(constMap<A,int>(2))(A()) == 2, "Something is wrong with MapToFunctor");
201
    check(mapToFunctor(functorToMap(&func))(A()) == 3 && mapToFunctor(functorToMap(&func))[A()] == 3,
204
    check(functorToMap(&func)[A()] == 3,
205
          "Something is wrong with FunctorToMap");
206
    check(mapToFunctor(constMap<A,int>(2))(A()) == 2,
207
          "Something is wrong with MapToFunctor");
208
    check(mapToFunctor(functorToMap(&func))(A()) == 3 &&
209
          mapToFunctor(functorToMap(&func))[A()] == 3,
202 210
          "Something is wrong with FunctorToMap or MapToFunctor");
... ...
@@ -208,3 +216,4 @@
208 216
  {
209
    checkConcept<ReadMap<double,double>, ConvertMap<ReadMap<double, int>, double> >();
217
    checkConcept<ReadMap<double,double>,
218
      ConvertMap<ReadMap<double, int>, double> >();
210 219
    ConvertMap<RangeMap<bool>, int> map1(rangeMap(1, true));
... ...
@@ -226,3 +235,4 @@
226 235
    map2.set(5, 10);
227
    check(m1[1] == -1 && m1[5] == 10 && m2[1] == -1 && m2[5] == 10 && map2[1] == -1 && map2[5] == 10,
236
    check(m1[1] == -1 && m1[5] == 10 && m2[1] == -1 &&
237
          m2[5] == 10 && map2[1] == -1 && map2[5] == 10,
228 238
          "Something is wrong with ForkMap");
... ...
@@ -243,6 +253,10 @@
243 253
    ConvertMap<IdentityMap<int>, double> id(im);
244
    check(addMap(c1,id)[0] == 1.0  && addMap(c1,id)[10] == 11.0, "Something is wrong with AddMap");
245
    check(subMap(id,c1)[0] == -1.0 && subMap(id,c1)[10] == 9.0,  "Something is wrong with SubMap");
246
    check(mulMap(id,c2)[0] == 0    && mulMap(id,c2)[2]  == 6.28, "Something is wrong with MulMap");
247
    check(divMap(c2,id)[1] == 3.14 && divMap(c2,id)[2]  == 1.57, "Something is wrong with DivMap");
254
    check(addMap(c1,id)[0] == 1.0  && addMap(c1,id)[10] == 11.0,
255
          "Something is wrong with AddMap");
256
    check(subMap(id,c1)[0] == -1.0 && subMap(id,c1)[10] == 9.0,
257
          "Something is wrong with SubMap");
258
    check(mulMap(id,c2)[0] == 0    && mulMap(id,c2)[2]  == 6.28,
259
          "Something is wrong with MulMap");
260
    check(divMap(c2,id)[1] == 3.14 && divMap(c2,id)[2]  == 1.57,
261
          "Something is wrong with DivMap");
248 262

	
... ...
@@ -258,3 +272,4 @@
258 272
          "Something is wrong with ShiftMap");
259
    check(shiftWriteMap(id, 2.0)[1] == 3.0 && shiftWriteMap(id, 2.0)[10] == 12.0,
273
    check(shiftWriteMap(id, 2.0)[1] == 3.0 &&
274
          shiftWriteMap(id, 2.0)[10] == 12.0,
260 275
          "Something is wrong with ShiftWriteMap");
... ...
@@ -262,3 +277,4 @@
262 277
          "Something is wrong with ScaleMap");
263
    check(scaleWriteMap(id, 2.0)[1] == 2.0 && scaleWriteMap(id, 2.0)[10] == 20.0,
278
    check(scaleWriteMap(id, 2.0)[1] == 2.0 &&
279
          scaleWriteMap(id, 2.0)[10] == 20.0,
264 280
          "Something is wrong with ScaleWriteMap");
... ...
@@ -291,8 +307,12 @@
291 307
    rm[0] = true; rm[1] = false;
292
    check(andMap(tm,rm)[0] && !andMap(tm,rm)[1] && !andMap(fm,rm)[0] && !andMap(fm,rm)[1],
308
    check(andMap(tm,rm)[0] && !andMap(tm,rm)[1] &&
309
          !andMap(fm,rm)[0] && !andMap(fm,rm)[1],
293 310
          "Something is wrong with AndMap");
294
    check(orMap(tm,rm)[0] && orMap(tm,rm)[1] && orMap(fm,rm)[0] && !orMap(fm,rm)[1],
311
    check(orMap(tm,rm)[0] && orMap(tm,rm)[1] &&
312
          orMap(fm,rm)[0] && !orMap(fm,rm)[1],
295 313
          "Something is wrong with OrMap");
296
    check(!notMap(rm)[0] && notMap(rm)[1], "Something is wrong with NotMap");
297
    check(!notWriteMap(rm)[0] && notWriteMap(rm)[1], "Something is wrong with NotWriteMap");
314
    check(!notMap(rm)[0] && notMap(rm)[1],
315
          "Something is wrong with NotMap");
316
    check(!notWriteMap(rm)[0] && notWriteMap(rm)[1],
317
          "Something is wrong with NotWriteMap");
298 318

	
... ...
@@ -312,3 +332,4 @@
312 332
    vec v2(10);
313
    LoggerBoolMap<std::back_insert_iterator<vec> > map1(std::back_inserter(v1));
333
    LoggerBoolMap<std::back_insert_iterator<vec> >
334
      map1(std::back_inserter(v1));
314 335
    LoggerBoolMap<vec::iterator> map2(v2.begin());
... ...
@@ -320,3 +341,4 @@
320 341
    check(v1.size() == 3 && v2.size() == 10 &&
321
          v1[0]==20 && v1[1]==50 && v1[2]==60 && v2[0]==20 && v2[1]==50 && v2[2]==60,
342
          v1[0]==20 && v1[1]==50 && v1[2]==60 &&
343
          v2[0]==20 && v2[1]==50 && v2[2]==60,
322 344
          "Something is wrong with LoggerBoolMap");
0 comments (0 inline)