Changes in lemon/concepts/bpgraph.h [1092:dceba191c00d:1130:0759d974de81] in lemon-main
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/concepts/bpgraph.h
r1092 r1130 28 28 #include <lemon/concept_check.h> 29 29 #include <lemon/core.h> 30 #include <lemon/bits/stl_iterators.h> 30 31 31 32 namespace lemon { … … 222 223 }; 223 224 225 /// \brief Gets the collection of the red nodes of the graph. 226 /// 227 /// This function can be used for iterating on 228 /// the red nodes of the graph. It returns a wrapped RedNodeIt, 229 /// which looks like an STL container (by having begin() and end()) 230 /// which you can use in range-based for loops, stl algorithms, etc. 231 /// For example if g is a BpGraph, you can write: 232 ///\code 233 /// for(auto v: g.redNodes()) 234 /// doSomething(v); 235 ///\endcode 236 LemonRangeWrapper1<RedNodeIt, BpGraph> redNodes() const { 237 return LemonRangeWrapper1<RedNodeIt, BpGraph>(*this); 238 } 239 240 224 241 /// Iterator class for the blue nodes. 225 242 … … 265 282 }; 266 283 284 /// \brief Gets the collection of the blue nodes of the graph. 285 /// 286 /// This function can be used for iterating on 287 /// the blue nodes of the graph. It returns a wrapped BlueNodeIt, 288 /// which looks like an STL container (by having begin() and end()) 289 /// which you can use in range-based for loops, stl algorithms, etc. 290 /// For example if g is a BpGraph, you can write: 291 ///\code 292 /// for(auto v: g.blueNodes()) 293 /// doSomething(v); 294 ///\endcode 295 LemonRangeWrapper1<BlueNodeIt, BpGraph> blueNodes() const { 296 return LemonRangeWrapper1<BlueNodeIt, BpGraph>(*this); 297 } 298 299 267 300 /// Iterator class for the nodes. 268 301 … … 307 340 NodeIt& operator++() { return *this; } 308 341 }; 342 343 /// \brief Gets the collection of the nodes of the graph. 344 /// 345 /// This function can be used for iterating on 346 /// the nodes of the graph. It returns a wrapped NodeIt, 347 /// which looks like an STL container (by having begin() and end()) 348 /// which you can use in range-based for loops, stl algorithms, etc. 349 /// For example if g is a BpGraph, you can write: 350 ///\code 351 /// for(auto v: g.nodes()) 352 /// doSomething(v); 353 ///\endcode 354 LemonRangeWrapper1<NodeIt, BpGraph> nodes() const { 355 return LemonRangeWrapper1<NodeIt, BpGraph>(*this); 356 } 357 309 358 310 359 … … 395 444 EdgeIt& operator++() { return *this; } 396 445 }; 446 447 /// \brief Gets the collection of the edges of the graph. 448 /// 449 /// This function can be used for iterating on the 450 /// edges of the graph. It returns a wrapped 451 /// EdgeIt, which looks like an STL container 452 /// (by having begin() and end()) which you can use in range-based 453 /// for loops, stl algorithms, etc. 454 /// For example if g is a BpGraph, you can write: 455 ///\code 456 /// for(auto e: g.edges()) 457 /// doSomething(e); 458 ///\endcode 459 LemonRangeWrapper1<EdgeIt, BpGraph> edges() const { 460 return LemonRangeWrapper1<EdgeIt, BpGraph>(*this); 461 } 462 397 463 398 464 /// Iterator class for the incident edges of a node. … … 444 510 }; 445 511 512 /// \brief Gets the collection of the incident edges 513 /// of a certain node of the graph. 514 /// 515 /// This function can be used for iterating on the 516 /// incident undirected edges of a certain node of the graph. 517 /// It returns a wrapped 518 /// IncEdgeIt, which looks like an STL container 519 /// (by having begin() and end()) which you can use in range-based 520 /// for loops, stl algorithms, etc. 521 /// For example if g is a BpGraph and u is a Node, you can write: 522 ///\code 523 /// for(auto e: g.incEdges(u)) 524 /// doSomething(e); 525 ///\endcode 526 LemonRangeWrapper2<IncEdgeIt, BpGraph, Node> incEdges(const Node& u) const { 527 return LemonRangeWrapper2<IncEdgeIt, BpGraph, Node>(*this, u); 528 } 529 530 446 531 /// The arc type of the graph 447 532 … … 540 625 }; 541 626 627 /// \brief Gets the collection of the directed arcs of the graph. 628 /// 629 /// This function can be used for iterating on the 630 /// arcs of the graph. It returns a wrapped 631 /// ArcIt, which looks like an STL container 632 /// (by having begin() and end()) which you can use in range-based 633 /// for loops, stl algorithms, etc. 634 /// For example if g is a BpGraph you can write: 635 ///\code 636 /// for(auto a: g.arcs()) 637 /// doSomething(a); 638 ///\endcode 639 LemonRangeWrapper1<ArcIt, BpGraph> arcs() const { 640 return LemonRangeWrapper1<ArcIt, BpGraph>(*this); 641 } 642 643 542 644 /// Iterator class for the outgoing arcs of a node. 543 645 … … 588 690 }; 589 691 692 /// \brief Gets the collection of the outgoing directed arcs of a 693 /// certain node of the graph. 694 /// 695 /// This function can be used for iterating on the 696 /// outgoing arcs of a certain node of the graph. It returns a wrapped 697 /// OutArcIt, which looks like an STL container 698 /// (by having begin() and end()) which you can use in range-based 699 /// for loops, stl algorithms, etc. 700 /// For example if g is a BpGraph and u is a Node, you can write: 701 ///\code 702 /// for(auto a: g.outArcs(u)) 703 /// doSomething(a); 704 ///\endcode 705 LemonRangeWrapper2<OutArcIt, BpGraph, Node> outArcs(const Node& u) const { 706 return LemonRangeWrapper2<OutArcIt, BpGraph, Node>(*this, u); 707 } 708 709 590 710 /// Iterator class for the incoming arcs of a node. 591 711 … … 635 755 InArcIt& operator++() { return *this; } 636 756 }; 757 758 /// \brief Gets the collection of the incoming directed arcs of a 759 /// certain node of the graph. 760 /// 761 /// This function can be used for iterating on the 762 /// incoming arcs of a certain node of the graph. It returns a wrapped 763 /// InArcIt, which looks like an STL container 764 /// (by having begin() and end()) which you can use in range-based 765 /// for loops, stl algorithms, etc. 766 /// For example if g is a BpGraph and u is a Node, you can write: 767 ///\code 768 /// for(auto a: g.inArcs(u)) 769 /// doSomething(a); 770 ///\endcode 771 LemonRangeWrapper2<InArcIt, BpGraph, Node> inArcs(const Node& u) const { 772 return LemonRangeWrapper2<InArcIt, BpGraph, Node>(*this, u); 773 } 774 637 775 638 776 /// \brief Standard graph map type for the nodes.
Note: See TracChangeset
for help on using the changeset viewer.