Changes in / [216:6d7bfcf5b48e:217:b67149f0e675] in lemon-main
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/graph_to_eps_demo.cc
r209 r211 21 21 /// \brief Demo of the graph drawing function \ref graphToEps() 22 22 /// 23 /// This demo program shows examples how to 24 /// graphToEps(). It takes no input but simply creates six23 /// This demo program shows examples how to use the function \ref 24 /// graphToEps(). It takes no input but simply creates seven 25 25 /// <tt>.eps</tt> files demonstrating the capability of \ref 26 26 /// graphToEps(), and showing how to draw directed graphs, … … 82 82 IdMap<ListDigraph,Node> id(g); 83 83 84 // Create five.eps files showing the digraph with different options84 // Create .eps files showing the digraph with different options 85 85 cout << "Create 'graph_to_eps_demo_out_1_pure.eps'" << endl; 86 86 graphToEps(g,"graph_to_eps_demo_out_1_pure.eps"). … … 119 119 run(); 120 120 121 // Add more arcs to the digraph 121 122 a=g.addArc(n1,n4); acolors[a]=2; widths[a]=1; 122 123 a=g.addArc(n4,n1); acolors[a]=1; widths[a]=2; … … 130 131 a=g.addArc(n1,n2); acolors[a]=7; widths[a]=1; 131 132 132 cout << "Create 'graph_to_eps_demo_out_par.eps'" << endl; 133 graphToEps(g,"graph_to_eps_demo_out_par.eps"). 134 //scale(10). 133 cout << "Create 'graph_to_eps_demo_out_4_par.eps'" << endl; 134 graphToEps(g,"graph_to_eps_demo_out_4_par.eps"). 135 135 title("Sample .eps figure (parallel arcs)"). 136 136 copyright("(C) 2003-2008 LEMON Project"). … … 146 146 run(); 147 147 148 cout << "Create 'graph_to_eps_demo_out_ 4_par_arr.eps'" << endl;149 graphToEps(g,"graph_to_eps_demo_out_ 4_par_arr.eps").148 cout << "Create 'graph_to_eps_demo_out_5_par_arr.eps'" << endl; 149 graphToEps(g,"graph_to_eps_demo_out_5_par_arr.eps"). 150 150 title("Sample .eps figure (parallel arcs and arrowheads)"). 151 151 copyright("(C) 2003-2008 LEMON Project"). … … 162 162 run(); 163 163 164 cout << "Create 'graph_to_eps_demo_out_ 5_par_arr_a4.eps'" << endl;165 graphToEps(g,"graph_to_eps_demo_out_ 5_par_arr_a4.eps").164 cout << "Create 'graph_to_eps_demo_out_6_par_arr_a4.eps'" << endl; 165 graphToEps(g,"graph_to_eps_demo_out_6_par_arr_a4.eps"). 166 166 title("Sample .eps figure (fits to A4)"). 167 167 copyright("(C) 2003-2008 LEMON Project"). … … 191 191 } 192 192 193 cout << "Create 'graph_to_eps_demo_out_ 6_colors.eps'" << endl;194 graphToEps(h,"graph_to_eps_demo_out_ 6_colors.eps").193 cout << "Create 'graph_to_eps_demo_out_7_colors.eps'" << endl; 194 graphToEps(h,"graph_to_eps_demo_out_7_colors.eps"). 195 195 scale(60). 196 196 title("Sample .eps figure (Palette demo)"). -
doc/Doxyfile.in
r153 r212 103 103 EXAMPLE_RECURSIVE = NO 104 104 IMAGE_PATH = @abs_top_srcdir@/doc/images \ 105 105 @abs_top_builddir@/doc/gen-images 106 106 INPUT_FILTER = 107 107 FILTER_PATTERNS = -
doc/lgf.dox
r209 r212 58 58 \code 59 59 @nodes 60 label coordinatessize title61 1 (10,20)10 "First node"62 2 (80,80)8 "Second node"63 3 (40,10)10 "Third node"60 label coordinates size title 61 1 (10,20) 10 "First node" 62 2 (80,80) 8 "Second node" 63 3 (40,10) 10 "Third node" 64 64 \endcode 65 65 … … 73 73 \code 74 74 @arcs 75 75 capacity 76 76 1 2 16 77 77 1 3 12 -
lemon/arg_parser.cc
r210 r214 240 240 } 241 241 242 void ArgParser::show(std::ostream &os,Opts:: iterator i)242 void ArgParser::show(std::ostream &os,Opts::const_iterator i) const 243 243 { 244 244 os << "-" << i->first; 245 245 if(i->second.has_syn) 246 for(Opts:: iterator j=_opts.begin();j!=_opts.end();++j)246 for(Opts::const_iterator j=_opts.begin();j!=_opts.end();++j) 247 247 if(j->second.syn&&j->second.help==i->first) 248 248 os << "|-" << j->first; … … 262 262 } 263 263 264 void ArgParser::show(std::ostream &os,Groups:: iterator i)265 { 266 GroupData::Opts:: iterator o=i->second.opts.begin();264 void ArgParser::show(std::ostream &os,Groups::const_iterator i) const 265 { 266 GroupData::Opts::const_iterator o=i->second.opts.begin(); 267 267 while(o!=i->second.opts.end()) { 268 268 show(os,_opts.find(*o)); … … 272 272 } 273 273 274 void ArgParser::showHelp(Opts:: iterator i)274 void ArgParser::showHelp(Opts::const_iterator i) const 275 275 { 276 276 if(i->second.help.size()==0||i->second.syn) return; … … 280 280 std::cerr << " " << i->second.help << std::endl; 281 281 } 282 void ArgParser::showHelp(std::vector<ArgParser::OtherArg>::iterator i) 282 void ArgParser::showHelp(std::vector<ArgParser::OtherArg>::const_iterator i) 283 const 283 284 { 284 285 if(i->help.size()==0) return; … … 287 288 } 288 289 289 void ArgParser::shortHelp() 290 void ArgParser::shortHelp() const 290 291 { 291 292 const unsigned int LINE_LEN=77; … … 293 294 std::cerr << "Usage:\n " << _command_name; 294 295 int pos=_command_name.size()+2; 295 for(Groups:: iterator g=_groups.begin();g!=_groups.end();++g) {296 for(Groups::const_iterator g=_groups.begin();g!=_groups.end();++g) { 296 297 std::ostringstream cstr; 297 298 cstr << ' '; … … 306 307 pos+=cstr.str().size(); 307 308 } 308 for(Opts:: iterator i=_opts.begin();i!=_opts.end();++i)309 for(Opts::const_iterator i=_opts.begin();i!=_opts.end();++i) 309 310 if(!i->second.ingroup&&!i->second.syn) { 310 311 std::ostringstream cstr; … … 320 321 pos+=cstr.str().size(); 321 322 } 322 for(std::vector<OtherArg>:: iterator i=_others_help.begin();323 for(std::vector<OtherArg>::const_iterator i=_others_help.begin(); 323 324 i!=_others_help.end();++i) 324 325 { … … 336 337 } 337 338 338 void ArgParser::showHelp() 339 void ArgParser::showHelp() const 339 340 { 340 341 shortHelp(); 341 342 std::cerr << "Where:\n"; 342 for(std::vector<OtherArg>:: iterator i=_others_help.begin();343 for(std::vector<OtherArg>::const_iterator i=_others_help.begin(); 343 344 i!=_others_help.end();++i) showHelp(i); 344 for(Opts:: iterator i=_opts.begin();i!=_opts.end();++i) showHelp(i);345 for(Opts::const_iterator i=_opts.begin();i!=_opts.end();++i) showHelp(i); 345 346 exit(1); 346 347 } 347 348 348 349 349 void ArgParser::unknownOpt(std::string arg) 350 void ArgParser::unknownOpt(std::string arg) const 350 351 { 351 352 std::cerr << "\nUnknown option: " << arg << "\n"; … … 355 356 } 356 357 357 void ArgParser::requiresValue(std::string arg, OptType t) 358 void ArgParser::requiresValue(std::string arg, OptType t) const 358 359 { 359 360 std::cerr << "Argument '" << arg << "' requires a"; … … 376 377 377 378 378 void ArgParser::checkMandatories() 379 void ArgParser::checkMandatories() const 379 380 { 380 381 bool ok=true; 381 for(Opts:: iterator i=_opts.begin();i!=_opts.end();++i)382 for(Opts::const_iterator i=_opts.begin();i!=_opts.end();++i) 382 383 if(i->second.mandatory&&!i->second.set) 383 384 { … … 388 389 showHelp(i); 389 390 } 390 for(Groups:: iterator i=_groups.begin();i!=_groups.end();++i)391 for(Groups::const_iterator i=_groups.begin();i!=_groups.end();++i) 391 392 if(i->second.mandatory||i->second.only_one) 392 393 { 393 394 int set=0; 394 for(GroupData::Opts:: iterator o=i->second.opts.begin();395 for(GroupData::Opts::const_iterator o=i->second.opts.begin(); 395 396 o!=i->second.opts.end();++o) 396 397 if(_opts.find(*o)->second.set) ++set; … … 399 400 ": At least one of the following arguments is mandatory.\n"; 400 401 ok=false; 401 for(GroupData::Opts:: iterator o=i->second.opts.begin();402 for(GroupData::Opts::const_iterator o=i->second.opts.begin(); 402 403 o!=i->second.opts.end();++o) 403 404 showHelp(_opts.find(*o)); … … 407 408 ": At most one of the following arguments can be given.\n"; 408 409 ok=false; 409 for(GroupData::Opts:: iterator o=i->second.opts.begin();410 for(GroupData::Opts::const_iterator o=i->second.opts.begin(); 410 411 o!=i->second.opts.end();++o) 411 412 showHelp(_opts.find(*o)); -
lemon/arg_parser.h
r209 r214 272 272 ///@} 273 273 274 void show(std::ostream &os,Opts::iterator i); 275 void show(std::ostream &os,Groups::iterator i); 276 void showHelp(Opts::iterator i); 277 void showHelp(std::vector<OtherArg>::iterator i); 278 void shortHelp(); 279 void showHelp(); 280 281 void unknownOpt(std::string arg); 282 283 void requiresValue(std::string arg, OptType t); 284 void checkMandatories(); 274 private: 275 void show(std::ostream &os,Opts::const_iterator i) const; 276 void show(std::ostream &os,Groups::const_iterator i) const; 277 void showHelp(Opts::const_iterator i) const; 278 void showHelp(std::vector<OtherArg>::const_iterator i) const; 279 280 void unknownOpt(std::string arg) const; 281 282 void requiresValue(std::string arg, OptType t) const; 283 void checkMandatories() const; 284 285 void shortHelp() const; 286 void showHelp() const; 287 public: 285 288 286 289 ///Start the parsing process … … 294 297 295 298 ///Give back the command name (the 0th argument) 296 const std::string &commandName() { return _command_name; }299 const std::string &commandName() const { return _command_name; } 297 300 298 301 ///Check if an opion has been given to the command. 299 bool given(std::string op) 300 { 301 Opts:: iterator i = _opts.find(op);302 bool given(std::string op) const 303 { 304 Opts::const_iterator i = _opts.find(op); 302 305 return i!=_opts.end()?i->second.set:false; 303 306 } … … 312 315 class RefType 313 316 { 314 ArgParser &_parser;317 const ArgParser &_parser; 315 318 std::string _name; 316 319 public: 317 320 ///\e 318 RefType( ArgParser &p,const std::string &n) :_parser(p),_name(n) {}321 RefType(const ArgParser &p,const std::string &n) :_parser(p),_name(n) {} 319 322 ///\e 320 323 operator bool() 321 324 { 322 Opts:: iterator i = _parser._opts.find(_name);325 Opts::const_iterator i = _parser._opts.find(_name); 323 326 LEMON_ASSERT(i!=_parser._opts.end(), 324 327 std::string()+"Unkown option: '"+_name+"'"); … … 330 333 operator std::string() 331 334 { 332 Opts:: iterator i = _parser._opts.find(_name);335 Opts::const_iterator i = _parser._opts.find(_name); 333 336 LEMON_ASSERT(i!=_parser._opts.end(), 334 337 std::string()+"Unkown option: '"+_name+"'"); … … 340 343 operator double() 341 344 { 342 Opts:: iterator i = _parser._opts.find(_name);345 Opts::const_iterator i = _parser._opts.find(_name); 343 346 LEMON_ASSERT(i!=_parser._opts.end(), 344 347 std::string()+"Unkown option: '"+_name+"'"); … … 352 355 operator int() 353 356 { 354 Opts:: iterator i = _parser._opts.find(_name);357 Opts::const_iterator i = _parser._opts.find(_name); 355 358 LEMON_ASSERT(i!=_parser._opts.end(), 356 359 std::string()+"Unkown option: '"+_name+"'"); … … 366 369 ///Give back the value of an option. 367 370 ///\sa RefType 368 RefType operator[](const std::string &n) 371 RefType operator[](const std::string &n) const 369 372 { 370 373 return RefType(*this, n); … … 375 378 ///Give back a reference to a vector consisting of the program arguments 376 379 ///not starting with a '-' character. 377 std::vector<std::string> &files(){ return _file_args; }380 const std::vector<std::string> &files() const { return _file_args; } 378 381 379 382 }; -
lemon/assert.h
r210 r212 67 67 #undef LEMON_DEBUG 68 68 69 #if (defined(LEMON_ASSERT_LOG) ? 1 : 0) + 70 (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + 69 #if (defined(LEMON_ASSERT_LOG) ? 1 : 0) + \ 70 (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ 71 71 (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) > 1 72 72 #error "LEMON assertion system is not set properly" 73 73 #endif 74 74 75 #if ((defined(LEMON_ASSERT_LOG) ? 1 : 0) + 76 (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + 77 (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) == 1 || 78 defined(LEMON_ENABLE_ASSERTS)) && 79 (defined(LEMON_DISABLE_ASSERTS) || 75 #if ((defined(LEMON_ASSERT_LOG) ? 1 : 0) + \ 76 (defined(LEMON_ASSERT_ABORT) ? 1 : 0) + \ 77 (defined(LEMON_ASSERT_CUSTOM) ? 1 : 0) == 1 || \ 78 defined(LEMON_ENABLE_ASSERTS)) && \ 79 (defined(LEMON_DISABLE_ASSERTS) || \ 80 80 defined(NDEBUG)) 81 81 #error "LEMON assertion system is not set properly" … … 169 169 /// behaviour is changed appropiately to the new settings. 170 170 # define LEMON_ASSERT(exp, msg) \ 171 (static_cast<void> (!!(exp) ? 0 : ( 172 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, 173 LEMON_FUNCTION_NAME, 171 (static_cast<void> (!!(exp) ? 0 : ( \ 172 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ 173 LEMON_FUNCTION_NAME, \ 174 174 ::lemon::_assert_bits::cstringify(msg), #exp), 0))) 175 175 … … 185 185 /// 186 186 /// \see LEMON_ASSERT 187 # define LEMON_FIXME(msg) 187 # define LEMON_FIXME(msg) \ 188 188 (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, \ 189 ::lemon::_assert_bits::cstringify(msg), 189 ::lemon::_assert_bits::cstringify(msg), \ 190 190 static_cast<const char*>(0))) 191 191 … … 213 213 /// 214 214 /// \see LEMON_ASSERT 215 # define LEMON_DEBUG(exp, msg) 216 (static_cast<void> (!!(exp) ? 0 : ( 215 # define LEMON_DEBUG(exp, msg) \ 216 (static_cast<void> (!!(exp) ? 0 : ( \ 217 217 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ 218 LEMON_FUNCTION_NAME, 218 LEMON_FUNCTION_NAME, \ 219 219 ::lemon::_assert_bits::cstringify(msg), #exp), 0))) 220 220 … … 226 226 # define LEMON_DEBUG(exp, msg) (static_cast<void>(0)) 227 227 # else 228 # define LEMON_ASSERT(exp, msg) 229 (static_cast<void> (!!(exp) ? 0 : ( 228 # define LEMON_ASSERT(exp, msg) \ 229 (static_cast<void> (!!(exp) ? 0 : ( \ 230 230 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ 231 LEMON_FUNCTION_NAME, 232 ::lemon::_assert_bits::cstringify(msg), 231 LEMON_FUNCTION_NAME, \ 232 ::lemon::_assert_bits::cstringify(msg), \ 233 233 #exp), 0))) 234 # define LEMON_FIXME(msg) 235 (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, 236 ::lemon::_assert_bits::cstringify(msg), 234 # define LEMON_FIXME(msg) \ 235 (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, LEMON_FUNCTION_NAME, \ 236 ::lemon::_assert_bits::cstringify(msg), \ 237 237 static_cast<const char*>(0))) 238 238 239 239 # if LEMON_ENABLE_DEBUG 240 240 # define LEMON_DEBUG(exp, msg) 241 (static_cast<void> (!!(exp) ? 0 : ( \242 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \243 LEMON_FUNCTION_NAME, \244 ::lemon::_assert_bits::cstringify(msg), 241 (static_cast<void> (!!(exp) ? 0 : ( \ 242 LEMON_ASSERT_HANDLER(__FILE__, __LINE__, \ 243 LEMON_FUNCTION_NAME, \ 244 ::lemon::_assert_bits::cstringify(msg), \ 245 245 #exp), 0))) 246 246 # else … … 250 250 251 251 #endif 252 253 #ifdef DOXYGEN254 255 256 #else257 258 259 #endif260 261 -
lemon/concepts/path.h
r209 r212 101 101 /// Comparison operator 102 102 bool operator!=(const ArcIt&) const {return true;} 103 104 103 /// Comparison operator 104 bool operator<(const ArcIt&) const {return false;} 105 105 106 106 }; … … 256 256 /// Comparison operator 257 257 bool operator!=(const ArcIt&) const {return true;} 258 259 258 /// Comparison operator 259 bool operator<(const ArcIt&) const {return false;} 260 260 261 261 }; … … 284 284 /// Comparison operator 285 285 bool operator!=(const RevArcIt&) const {return true;} 286 287 286 /// Comparison operator 287 bool operator<(const RevArcIt&) const {return false;} 288 288 289 289 }; -
lemon/error.h
r209 r212 71 71 try { 72 72 if (!copy.valid()) return; 73 73 *ptr = copy.get(); 74 74 } catch (...) {} 75 75 } -
lemon/graph_to_eps.h
r210 r212 909 909 //\todo better 'epsilon' would be nice here. 910 910 dim2::Point<double> d(dvec/std::max(l,EPSILON)); 911 911 dim2::Point<double> m; 912 912 // m=dim2::Point<double>(mycoords[g.target(*i)]+ 913 913 // mycoords[g.source(*i)])/2.0; … … 917 917 // (_nodeSizes[g.source(*i)]+_nodeSizes[g.target(*i)])); 918 918 919 919 m=dim2::Point<double>(mycoords[g.source(*i)])+ 920 920 d*(l+_nodeSizes[g.source(*i)]-_nodeSizes[g.target(*i)])/2.0; 921 921 -
lemon/graph_utils.h
r209 r212 53 53 ///on a template parameter, then use \c TEMPLATE_DIGRAPH_TYPEDEFS() 54 54 ///macro. 55 #define DIGRAPH_TYPEDEFS(Digraph) 56 typedef Digraph::Node Node; 57 typedef Digraph::NodeIt NodeIt; 58 typedef Digraph::Arc Arc; 59 typedef Digraph::ArcIt ArcIt; 60 typedef Digraph::InArcIt InArcIt; 61 typedef Digraph::OutArcIt OutArcIt; 62 typedef Digraph::NodeMap<bool> BoolNodeMap; 63 typedef Digraph::NodeMap<int> IntNodeMap; 64 typedef Digraph::NodeMap<double> DoubleNodeMap; 65 typedef Digraph::ArcMap<bool> BoolArcMap; 66 typedef Digraph::ArcMap<int> IntArcMap; 55 #define DIGRAPH_TYPEDEFS(Digraph) \ 56 typedef Digraph::Node Node; \ 57 typedef Digraph::NodeIt NodeIt; \ 58 typedef Digraph::Arc Arc; \ 59 typedef Digraph::ArcIt ArcIt; \ 60 typedef Digraph::InArcIt InArcIt; \ 61 typedef Digraph::OutArcIt OutArcIt; \ 62 typedef Digraph::NodeMap<bool> BoolNodeMap; \ 63 typedef Digraph::NodeMap<int> IntNodeMap; \ 64 typedef Digraph::NodeMap<double> DoubleNodeMap; \ 65 typedef Digraph::ArcMap<bool> BoolArcMap; \ 66 typedef Digraph::ArcMap<int> IntArcMap; \ 67 67 typedef Digraph::ArcMap<double> DoubleArcMap 68 68 … … 73 73 ///\note Use this macro, if the graph type is a dependent type, 74 74 ///ie. the graph type depend on a template parameter. 75 #define TEMPLATE_DIGRAPH_TYPEDEFS(Digraph) 76 typedef typename Digraph::Node Node; 77 typedef typename Digraph::NodeIt NodeIt; 78 typedef typename Digraph::Arc Arc; 75 #define TEMPLATE_DIGRAPH_TYPEDEFS(Digraph) \ 76 typedef typename Digraph::Node Node; \ 77 typedef typename Digraph::NodeIt NodeIt; \ 78 typedef typename Digraph::Arc Arc; \ 79 79 typedef typename Digraph::ArcIt ArcIt; \ 80 typedef typename Digraph::InArcIt InArcIt; 81 typedef typename Digraph::OutArcIt OutArcIt; 82 typedef typename Digraph::template NodeMap<bool> BoolNodeMap; 83 typedef typename Digraph::template NodeMap<int> IntNodeMap; 84 typedef typename Digraph::template NodeMap<double> DoubleNodeMap; 85 typedef typename Digraph::template ArcMap<bool> BoolArcMap; 86 typedef typename Digraph::template ArcMap<int> IntArcMap; 80 typedef typename Digraph::InArcIt InArcIt; \ 81 typedef typename Digraph::OutArcIt OutArcIt; \ 82 typedef typename Digraph::template NodeMap<bool> BoolNodeMap; \ 83 typedef typename Digraph::template NodeMap<int> IntNodeMap; \ 84 typedef typename Digraph::template NodeMap<double> DoubleNodeMap; \ 85 typedef typename Digraph::template ArcMap<bool> BoolArcMap; \ 86 typedef typename Digraph::template ArcMap<int> IntArcMap; \ 87 87 typedef typename Digraph::template ArcMap<double> DoubleArcMap 88 88 … … 97 97 ///on a template parameter, then use \c TEMPLATE_DIGRAPH_TYPEDEFS() 98 98 ///macro. 99 #define GRAPH_TYPEDEFS(Graph) 100 DIGRAPH_TYPEDEFS(Graph); 101 typedef Graph::Edge Edge; 102 typedef Graph::EdgeIt EdgeIt; 103 typedef Graph::IncEdgeIt IncEdgeIt; 104 typedef Graph::EdgeMap<bool> BoolEdgeMap; 105 typedef Graph::EdgeMap<int> IntEdgeMap; 99 #define GRAPH_TYPEDEFS(Graph) \ 100 DIGRAPH_TYPEDEFS(Graph); \ 101 typedef Graph::Edge Edge; \ 102 typedef Graph::EdgeIt EdgeIt; \ 103 typedef Graph::IncEdgeIt IncEdgeIt; \ 104 typedef Graph::EdgeMap<bool> BoolEdgeMap; \ 105 typedef Graph::EdgeMap<int> IntEdgeMap; \ 106 106 typedef Graph::EdgeMap<double> DoubleEdgeMap 107 107 … … 112 112 ///\note Use this macro, if the graph type is a dependent type, 113 113 ///ie. the graph type depend on a template parameter. 114 #define TEMPLATE_GRAPH_TYPEDEFS(Graph) 115 TEMPLATE_DIGRAPH_TYPEDEFS(Graph); 116 typedef typename Graph::Edge Edge; 114 #define TEMPLATE_GRAPH_TYPEDEFS(Graph) \ 115 TEMPLATE_DIGRAPH_TYPEDEFS(Graph); \ 116 typedef typename Graph::Edge Edge; \ 117 117 typedef typename Graph::EdgeIt EdgeIt; \ 118 typedef typename Graph::IncEdgeIt IncEdgeIt; 119 typedef typename Graph::template EdgeMap<bool> BoolEdgeMap; 120 typedef typename Graph::template EdgeMap<int> IntEdgeMap; 118 typedef typename Graph::IncEdgeIt IncEdgeIt; \ 119 typedef typename Graph::template EdgeMap<bool> BoolEdgeMap; \ 120 typedef typename Graph::template EdgeMap<int> IntEdgeMap; \ 121 121 typedef typename Graph::template EdgeMap<double> DoubleEdgeMap 122 122 -
lemon/lgf_reader.h
r210 r212 147 147 public: 148 148 ValueStorage(Value& value, const Converter& converter = Converter()) 149 149 : _value(value), _converter(converter) {} 150 150 151 151 virtual void set(const std::string& value) { … … 511 511 DigraphReader(const std::string& fn, Digraph& digraph) 512 512 : _is(new std::ifstream(fn.c_str())), local_is(true), _digraph(digraph), 513 513 _use_nodes(false), _use_arcs(false), 514 514 _skip_nodes(false), _skip_arcs(false) {} 515 515 … … 520 520 DigraphReader(const char* fn, Digraph& digraph) 521 521 : _is(new std::ifstream(fn)), local_is(true), _digraph(digraph), 522 522 _use_nodes(false), _use_arcs(false), 523 523 _skip_nodes(false), _skip_arcs(false) {} 524 524 … … 1295 1295 GraphReader(const std::string& fn, Graph& graph) 1296 1296 : _is(new std::ifstream(fn.c_str())), local_is(true), _graph(graph), 1297 1297 _use_nodes(false), _use_edges(false), 1298 1298 _skip_nodes(false), _skip_edges(false) {} 1299 1299 … … 1304 1304 GraphReader(const char* fn, Graph& graph) 1305 1305 : _is(new std::ifstream(fn)), local_is(true), _graph(graph), 1306 1306 _use_nodes(false), _use_edges(false), 1307 1307 _skip_nodes(false), _skip_edges(false) {} 1308 1308 -
lemon/lgf_writer.h
r209 r212 182 182 public: 183 183 ValueStorage(const Value& value, const Converter& converter = Converter()) 184 184 : _value(value), _converter(converter) {} 185 185 186 186 virtual std::string get() { -
lemon/list_graph.h
r209 r212 495 495 Node b = addNode(); 496 496 for(OutArcIt e(*this,n);e!=INVALID;) { 497 497 OutArcIt f=e; 498 498 ++f; 499 499 changeSource(e,b); -
test/heap_test.cc
r209 r212 55 55 "9\n" 56 56 "@arcs\n" 57 " label 58 "0 5 094\n"59 "3 9 111\n"60 "8 7 283\n"61 "1 2 394\n"62 "5 7 435\n"63 "7 4 584\n"64 "9 5 638\n"65 "0 4 796\n"66 "6 7 86\n"67 "3 1 927\n"68 "5 2 1077\n"69 "5 6 1169\n"70 "6 5 1241\n"71 "4 6 1370\n"72 "3 2 1445\n"73 "7 9 1593\n"74 "5 9 1650\n"75 "9 0 1794\n"76 "9 6 1867\n"77 "0 9 1986\n"57 " label capacity\n" 58 "0 5 0 94\n" 59 "3 9 1 11\n" 60 "8 7 2 83\n" 61 "1 2 3 94\n" 62 "5 7 4 35\n" 63 "7 4 5 84\n" 64 "9 5 6 38\n" 65 "0 4 7 96\n" 66 "6 7 8 6\n" 67 "3 1 9 27\n" 68 "5 2 10 77\n" 69 "5 6 11 69\n" 70 "6 5 12 41\n" 71 "4 6 13 70\n" 72 "3 2 14 45\n" 73 "7 9 15 93\n" 74 "5 9 16 50\n" 75 "9 0 17 94\n" 76 "9 6 18 67\n" 77 "0 9 19 86\n" 78 78 "@attributes\n" 79 79 "source 3\n"; … … 142 142 if (dijkstra.reached(s)) { 143 143 check( dijkstra.dist(t) - dijkstra.dist(s) <= length[a], 144 144 "Error in a shortest path tree!"); 145 145 } 146 146 }
Note: See TracChangeset
for help on using the changeset viewer.