Changes in lemon/concepts/digraph.h [1093:fb1c7da561ce:1130:0759d974de81] in lemon-main
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/concepts/digraph.h
r1093 r1130 28 28 #include <lemon/concept_check.h> 29 29 #include <lemon/concepts/graph_components.h> 30 #include <lemon/bits/stl_iterators.h> 30 31 31 32 namespace lemon { … … 148 149 }; 149 150 151 /// \brief Gets the collection of the nodes of the digraph. 152 /// 153 /// This function can be used for iterating on 154 /// the nodes of the digraph. It returns a wrapped NodeIt, which looks 155 /// 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 ///\code 159 /// 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 ///\endcode 166 LemonRangeWrapper1<NodeIt, Digraph> nodes() const { 167 return LemonRangeWrapper1<NodeIt, Digraph>(*this); 168 } 169 150 170 151 171 /// The arc type of the digraph … … 238 258 }; 239 259 260 /// \brief Gets the collection of the outgoing arcs of a certain node 261 /// of the digraph. 262 /// 263 /// This function can be used for iterating on the 264 /// outgoing arcs of a certain node of the digraph. It returns a wrapped 265 /// OutArcIt, which looks like an STL container 266 /// (by having begin() and end()) which you can use in range-based 267 /// for loops, STL algorithms, etc. 268 /// For example if g is a Digraph and u is a node, you can write: 269 ///\code 270 /// 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 ///\endcode 276 LemonRangeWrapper2<OutArcIt, Digraph, Node> outArcs(const Node& u) const { 277 return LemonRangeWrapper2<OutArcIt, Digraph, Node>(*this, u); 278 } 279 280 240 281 /// Iterator class for the incoming arcs of a node. 241 282 … … 283 324 }; 284 325 326 /// \brief Gets the collection of the incoming arcs of a certain node 327 /// of the digraph. 328 /// 329 /// This function can be used for iterating on the 330 /// incoming arcs of a certain node of the digraph. It returns a wrapped 331 /// InArcIt, which looks like an STL container 332 /// (by having begin() and end()) which you can use in range-based 333 /// for loops, STL algorithms, etc. 334 /// For example if g is a Digraph and u is a node, you can write: 335 ///\code 336 /// 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 ///\endcode 342 LemonRangeWrapper2<InArcIt, Digraph, Node> inArcs(const Node& u) const { 343 return LemonRangeWrapper2<InArcIt, Digraph, Node>(*this, u); 344 } 345 346 285 347 /// Iterator class for the arcs. 286 348 … … 327 389 ArcIt& operator++() { return *this; } 328 390 }; 391 392 /// \brief Gets the collection of the arcs of the digraph. 393 /// 394 /// This function can be used for iterating on the 395 /// arcs of the digraph. It returns a wrapped 396 /// ArcIt, which looks like an STL container 397 /// (by having begin() and end()) which you can use in range-based 398 /// for loops, STL algorithms, etc. 399 /// For example you can write: 400 ///\code 401 /// 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 ///\endcode 408 LemonRangeWrapper1<ArcIt, Digraph> arcs() const { 409 return LemonRangeWrapper1<ArcIt, Digraph>(*this); 410 } 411 329 412 330 413 /// \brief The source node of the arc.
Note: See TracChangeset
for help on using the changeset viewer.