Changes in lemon/concepts/digraph.h [1130:0759d974de81:1093:fb1c7da561ce] in lemon-main
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/concepts/digraph.h
r1130 r1093 28 28 #include <lemon/concept_check.h> 29 29 #include <lemon/concepts/graph_components.h> 30 #include <lemon/bits/stl_iterators.h>31 30 32 31 namespace lemon { … … 149 148 }; 150 149 151 /// \brief Gets the collection of the nodes of the digraph.152 ///153 /// This function can be used for iterating on154 /// the nodes of the digraph. It returns a wrapped NodeIt, which looks155 /// like an STL container (by having begin() and end())156 /// which you can use in range-based for loops, STL algorithms, etc.157 /// For example you can write:158 ///\code159 /// ListDigraph g;160 /// for(auto v: g.nodes())161 /// doSomething(v);162 ///163 /// //Using an STL algorithm:164 /// copy(g.nodes().begin(), g.nodes().end(), vect.begin());165 ///\endcode166 LemonRangeWrapper1<NodeIt, Digraph> nodes() const {167 return LemonRangeWrapper1<NodeIt, Digraph>(*this);168 }169 170 150 171 151 /// The arc type of the digraph … … 258 238 }; 259 239 260 /// \brief Gets the collection of the outgoing arcs of a certain node261 /// of the digraph.262 ///263 /// This function can be used for iterating on the264 /// outgoing arcs of a certain node of the digraph. It returns a wrapped265 /// OutArcIt, which looks like an STL container266 /// (by having begin() and end()) which you can use in range-based267 /// for loops, STL algorithms, etc.268 /// For example if g is a Digraph and u is a node, you can write:269 ///\code270 /// for(auto a: g.outArcs(u))271 /// doSomething(a);272 ///273 /// //Using an STL algorithm:274 /// copy(g.outArcs(u).begin(), g.outArcs(u).end(), vect.begin());275 ///\endcode276 LemonRangeWrapper2<OutArcIt, Digraph, Node> outArcs(const Node& u) const {277 return LemonRangeWrapper2<OutArcIt, Digraph, Node>(*this, u);278 }279 280 281 240 /// Iterator class for the incoming arcs of a node. 282 241 … … 324 283 }; 325 284 326 /// \brief Gets the collection of the incoming arcs of a certain node327 /// of the digraph.328 ///329 /// This function can be used for iterating on the330 /// incoming arcs of a certain node of the digraph. It returns a wrapped331 /// InArcIt, which looks like an STL container332 /// (by having begin() and end()) which you can use in range-based333 /// for loops, STL algorithms, etc.334 /// For example if g is a Digraph and u is a node, you can write:335 ///\code336 /// for(auto a: g.inArcs(u))337 /// doSomething(a);338 ///339 /// //Using an STL algorithm:340 /// copy(g.inArcs(u).begin(), g.inArcs(u).end(), vect.begin());341 ///\endcode342 LemonRangeWrapper2<InArcIt, Digraph, Node> inArcs(const Node& u) const {343 return LemonRangeWrapper2<InArcIt, Digraph, Node>(*this, u);344 }345 346 347 285 /// Iterator class for the arcs. 348 286 … … 389 327 ArcIt& operator++() { return *this; } 390 328 }; 391 392 /// \brief Gets the collection of the arcs of the digraph.393 ///394 /// This function can be used for iterating on the395 /// arcs of the digraph. It returns a wrapped396 /// ArcIt, which looks like an STL container397 /// (by having begin() and end()) which you can use in range-based398 /// for loops, STL algorithms, etc.399 /// For example you can write:400 ///\code401 /// ListDigraph g;402 /// for(auto a: g.arcs())403 /// doSomething(a);404 ///405 /// //Using an STL algorithm:406 /// copy(g.arcs().begin(), g.arcs().end(), vect.begin());407 ///\endcode408 LemonRangeWrapper1<ArcIt, Digraph> arcs() const {409 return LemonRangeWrapper1<ArcIt, Digraph>(*this);410 }411 412 329 413 330 /// \brief The source node of the arc.
Note: See TracChangeset
for help on using the changeset viewer.