Changeset 78:c46b3453455f in lemon1.0 for lemon/concepts
 Timestamp:
 02/28/08 17:06:02 (12 years ago)
 Branch:
 default
 Children:
 84:8161012eaa61, 92:5d4decd1b870
 Phase:
 public
 Location:
 lemon/concepts
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

lemon/concepts/graph.h
r61 r78 64 64 /// the EdgeMap to map values for the edges. The InArcIt and 65 65 /// OutArcIt iterates on the same edges but with opposite 66 /// direction. The Inc ArcIt iterates also on the same edges66 /// direction. The IncEdgeIt iterates also on the same edges 67 67 /// as the OutArcIt and InArcIt but it is not convertible to Arc just 68 68 /// to Edge. … … 271 271 ///\code 272 272 /// int count=0; 273 /// for(Graph::Inc ArcIt e(g, n); e!=INVALID; ++e) ++count;273 /// for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count; 274 274 ///\endcode 275 class Inc ArcIt : public Edge {276 public: 277 /// Default constructor 278 279 /// @warning The default constructor sets the iterator 280 /// to an undefined value. 281 Inc ArcIt() { }282 /// Copy constructor. 283 284 /// Copy constructor. 285 /// 286 Inc ArcIt(const IncArcIt& e) : Edge(e) { }287 /// Initialize the iterator to be invalid. 288 289 /// Initialize the iterator to be invalid. 290 /// 291 Inc ArcIt(Invalid) { }275 class IncEdgeIt : public Edge { 276 public: 277 /// Default constructor 278 279 /// @warning The default constructor sets the iterator 280 /// to an undefined value. 281 IncEdgeIt() { } 282 /// Copy constructor. 283 284 /// Copy constructor. 285 /// 286 IncEdgeIt(const IncEdgeIt& e) : Edge(e) { } 287 /// Initialize the iterator to be invalid. 288 289 /// Initialize the iterator to be invalid. 290 /// 291 IncEdgeIt(Invalid) { } 292 292 /// This constructor sets the iterator to first incident arc. 293 293 294 294 /// This constructor set the iterator to the first incident arc of 295 295 /// the node. 296 Inc ArcIt(const Graph&, const Node&) { }297 /// Edge > Inc ArcIt conversion296 IncEdgeIt(const Graph&, const Node&) { } 297 /// Edge > IncEdgeIt conversion 298 298 299 299 /// Sets the iterator to the value of the trivial iterator \c e. 300 300 /// This feature necessitates that each time we 301 301 /// iterate the arcset, the iteration order is the same. 302 Inc ArcIt(const Graph&, const Edge&) { }302 IncEdgeIt(const Graph&, const Edge&) { } 303 303 /// Next incident arc 304 304 305 305 /// Assign the iterator to the next incident arc 306 306 /// of the corresponding node. 307 Inc ArcIt& operator++() { return *this; }307 IncEdgeIt& operator++() { return *this; } 308 308 }; 309 309 … … 721 721 /// 722 722 /// Returns the base node of the iterator 723 Node baseNode(Inc ArcIt) const {723 Node baseNode(IncEdgeIt) const { 724 724 return INVALID; 725 725 } … … 728 728 /// 729 729 /// Returns the running node of the iterator 730 Node runningNode(Inc ArcIt) const {730 Node runningNode(IncEdgeIt) const { 731 731 return INVALID; 732 732 } 
lemon/concepts/graph_components.h
r57 r78 829 829 /// This iterator goes trough the incident arcs of a certain 830 830 /// node of a graph. 831 typedef GraphIncIt<Graph, Edge, Node, 'u'> Inc ArcIt;831 typedef GraphIncIt<Graph, Edge, Node, 'u'> IncEdgeIt; 832 832 /// \brief The base node of the iterator. 833 833 /// 834 834 /// Gives back the base node of the iterator. 835 Node baseNode(const Inc ArcIt&) const { return INVALID; }835 Node baseNode(const IncEdgeIt&) const { return INVALID; } 836 836 837 837 /// \brief The running node of the iterator. 838 838 /// 839 839 /// Gives back the running node of the iterator. 840 Node runningNode(const Inc ArcIt&) const { return INVALID; }840 Node runningNode(const IncEdgeIt&) const { return INVALID; } 841 841 842 842 /// @} … … 866 866 typename _Graph::EdgeIt >(); 867 867 checkConcept<GraphIncIt<_Graph, typename _Graph::Edge, 868 typename _Graph::Node, 'u'>, typename _Graph::Inc ArcIt>();868 typename _Graph::Node, 'u'>, typename _Graph::IncEdgeIt>(); 869 869 870 870 typename _Graph::Node n; 871 typename _Graph::Inc ArcIt ueit(INVALID);871 typename _Graph::IncEdgeIt ueit(INVALID); 872 872 n = graph.baseNode(ueit); 873 873 n = graph.runningNode(ueit);
Note: See TracChangeset
for help on using the changeset viewer.