Changeset 210:81cfc04531e8 in lemon for lemon
- Timestamp:
- 07/13/08 21:09:47 (16 years ago)
- Branch:
- default
- Children:
- 211:542dd614cbb4, 212:1ae84dea7d09, 214:60eecd3fe37a, 216:6d7bfcf5b48e
- Phase:
- public
- Location:
- lemon
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/arg_parser.cc
r209 r210 396 396 if(_opts.find(*o)->second.set) ++set; 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; 401 401 for(GroupData::Opts::iterator o=i->second.opts.begin(); … … 404 404 } 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; 409 409 for(GroupData::Opts::iterator o=i->second.opts.begin(); -
lemon/assert.h
r209 r210 152 152 /// function. 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 157 158 /// The name of the function should be defined as the \c … … 186 187 # define LEMON_FIXME(msg) \ 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))) 190 191 … … 241 242 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ 242 243 LEMON_FUNCTION_NAME, \ 243 ::lemon::_assert_bits::cstringify(msg), 244 ::lemon::_assert_bits::cstringify(msg), \ 244 245 #exp), 0))) 245 246 # else -
lemon/bfs.h
r209 r210 104 104 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) 108 109 { … … 826 827 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 830 832 static DistMap *createDistMap(const GR &g) … … 1200 1202 /// on every bfs event the \c Visitor class member functions. 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 1204 1207 /// is only passed to \ref BfsDefaultTraits. -
lemon/concepts/maps.h
r209 r210 44 44 /// The key type of the map. 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; 48 49 … … 83 84 /// The key type of the map. 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; 87 89 … … 122 124 /// The key type of the map. 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; 126 129 … … 155 158 /// The key type of the map. 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; 159 163 /// The reference type of the map. -
lemon/dfs.h
r209 r210 106 106 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) 110 111 { … … 809 810 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 813 815 static DistMap *createDistMap(const GR &g) … … 1194 1196 /// on every dfs event the \c Visitor class member functions. 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 1198 1201 /// is only passed to \ref DfsDefaultTraits. -
lemon/dijkstra.h
r209 r210 174 174 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) 178 179 { … … 337 338 template <class T> 338 339 struct DefPredMap 339 : public Dijkstra< Digraph, 340 typedef Dijkstra< Digraph, 340 : public Dijkstra< Digraph, LengthMap, DefPredMapTraits<T> > { 341 typedef Dijkstra< Digraph, LengthMap, DefPredMapTraits<T> > Create; 341 342 }; 342 343 … … 373 374 template <class T> 374 375 struct DefProcessedMap 375 : public Dijkstra< Digraph, 376 typedef Dijkstra< Digraph, 376 : public Dijkstra< Digraph, LengthMap, DefProcessedMapTraits<T> > { 377 typedef Dijkstra< Digraph, LengthMap, DefProcessedMapTraits<T> > Create; 377 378 }; 378 379 … … 393 394 struct DefProcessedMapToBeDefaultMap 394 395 : public Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> { 395 typedef Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> Create; 396 typedef Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> 397 Create; 396 398 }; 397 399 … … 416 418 template <class H, class CR = typename Digraph::template NodeMap<int> > 417 419 struct DefHeap 418 : public Dijkstra< Digraph, 419 typedef Dijkstra< Digraph, 420 : public Dijkstra< Digraph, LengthMap, DefHeapTraits<H, CR> > { 421 typedef Dijkstra< Digraph, LengthMap, DefHeapTraits<H, CR> > Create; 420 422 }; 421 423 … … 441 443 template <class H, class CR = typename Digraph::template NodeMap<int> > 442 444 struct DefStandardHeap 443 : public Dijkstra< Digraph, 444 typedef Dijkstra< Digraph, 445 : public Dijkstra< Digraph, LengthMap, DefStandardHeapTraits<H, CR> > { 446 typedef Dijkstra< Digraph, LengthMap, DefStandardHeapTraits<H, CR> > 445 447 Create; 446 448 }; … … 977 979 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 981 984 static DistMap *createDistMap(const GR &g) -
lemon/graph_to_eps.h
r209 r210 143 143 ///\param _g Reference to the graph to be printed. 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 147 148 ///will be explicitly deallocated by the destructor. … … 782 783 os << "/lb { setlinewidth setrgbcolor newpath moveto\n" 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 788 791 os << "/sq { newpath 2 index 1 index add 2 index 2 index add moveto\n" … … 812 815 << " newpath 5 index 5 index moveto " 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" 817 822 << " setrgbcolor " << 1+_nodeBorderQuotient << " div c fill\n" … … 827 832 << " 1 index 1 index 7 index sub moveto\n" 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" 831 837 << " 5 index 5 index 5 index c fill\n" … … 839 845 os << "/lrl { 2 index mul exch 2 index mul exch rlineto pop} bind def\n"; 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" 845 852 << " len w sub arrl sub dx dy lrl\n" … … 903 910 dim2::Point<double> d(dvec/std::max(l,EPSILON)); 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 907 915 // m=dim2::Point<double>(mycoords[g.source(*i)])+ … … 939 947 // t1=0;t2=1; 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; 943 952 // bez=bez.after((t1+t2)/2); -
lemon/lgf_reader.h
r209 r210 445 445 /// The previously read label node map should be passed to the \c 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 449 450 /// maps are read. -
lemon/time_measure.h
r209 r210 315 315 ///The \ref Timer also counts the number of \ref start() 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. 319 320 ///
Note: See TracChangeset
for help on using the changeset viewer.