lemon/concepts/graph.h
changeset 808 9c428bb2b105
parent 734 bd72f8d20f33
child 877 141f9c0db4a3
equal deleted inserted replaced
13:10d46bf43ec4 14:a482cd69583f
   138       };
   138       };
   139 
   139 
   140       /// Iterator class for the nodes.
   140       /// Iterator class for the nodes.
   141 
   141 
   142       /// This iterator goes through each node of the graph.
   142       /// This iterator goes through each node of the graph.
   143       /// Its usage is quite simple, for example you can count the number
   143       /// Its usage is quite simple, for example, you can count the number
   144       /// of nodes in a graph \c g of type \c %Graph like this:
   144       /// of nodes in a graph \c g of type \c %Graph like this:
   145       ///\code
   145       ///\code
   146       /// int count=0;
   146       /// int count=0;
   147       /// for (Graph::NodeIt n(g); n!=INVALID; ++n) ++count;
   147       /// for (Graph::NodeIt n(g); n!=INVALID; ++n) ++count;
   148       ///\endcode
   148       ///\endcode
   226       };
   226       };
   227 
   227 
   228       /// Iterator class for the edges.
   228       /// Iterator class for the edges.
   229 
   229 
   230       /// This iterator goes through each edge of the graph.
   230       /// This iterator goes through each edge of the graph.
   231       /// Its usage is quite simple, for example you can count the number
   231       /// Its usage is quite simple, for example, you can count the number
   232       /// of edges in a graph \c g of type \c %Graph as follows:
   232       /// of edges in a graph \c g of type \c %Graph as follows:
   233       ///\code
   233       ///\code
   234       /// int count=0;
   234       /// int count=0;
   235       /// for(Graph::EdgeIt e(g); e!=INVALID; ++e) ++count;
   235       /// for(Graph::EdgeIt e(g); e!=INVALID; ++e) ++count;
   236       ///\endcode
   236       ///\endcode
   270 
   270 
   271       /// Iterator class for the incident edges of a node.
   271       /// Iterator class for the incident edges of a node.
   272 
   272 
   273       /// This iterator goes trough the incident undirected edges
   273       /// This iterator goes trough the incident undirected edges
   274       /// of a certain node of a graph.
   274       /// of a certain node of a graph.
   275       /// Its usage is quite simple, for example you can compute the
   275       /// Its usage is quite simple, for example, you can compute the
   276       /// degree (i.e. the number of incident edges) of a node \c n
   276       /// degree (i.e. the number of incident edges) of a node \c n
   277       /// in a graph \c g of type \c %Graph as follows.
   277       /// in a graph \c g of type \c %Graph as follows.
   278       ///
   278       ///
   279       ///\code
   279       ///\code
   280       /// int count=0;
   280       /// int count=0;
   367       };
   367       };
   368 
   368 
   369       /// Iterator class for the arcs.
   369       /// Iterator class for the arcs.
   370 
   370 
   371       /// This iterator goes through each directed arc of the graph.
   371       /// This iterator goes through each directed arc of the graph.
   372       /// Its usage is quite simple, for example you can count the number
   372       /// Its usage is quite simple, for example, you can count the number
   373       /// of arcs in a graph \c g of type \c %Graph as follows:
   373       /// of arcs in a graph \c g of type \c %Graph as follows:
   374       ///\code
   374       ///\code
   375       /// int count=0;
   375       /// int count=0;
   376       /// for(Graph::ArcIt a(g); a!=INVALID; ++a) ++count;
   376       /// for(Graph::ArcIt a(g); a!=INVALID; ++a) ++count;
   377       ///\endcode
   377       ///\endcode
   411 
   411 
   412       /// Iterator class for the outgoing arcs of a node.
   412       /// Iterator class for the outgoing arcs of a node.
   413 
   413 
   414       /// This iterator goes trough the \e outgoing directed arcs of a
   414       /// This iterator goes trough the \e outgoing directed arcs of a
   415       /// certain node of a graph.
   415       /// certain node of a graph.
   416       /// Its usage is quite simple, for example you can count the number
   416       /// Its usage is quite simple, for example, you can count the number
   417       /// of outgoing arcs of a node \c n
   417       /// of outgoing arcs of a node \c n
   418       /// in a graph \c g of type \c %Graph as follows.
   418       /// in a graph \c g of type \c %Graph as follows.
   419       ///\code
   419       ///\code
   420       /// int count=0;
   420       /// int count=0;
   421       /// for (Digraph::OutArcIt a(g, n); a!=INVALID; ++a) ++count;
   421       /// for (Digraph::OutArcIt a(g, n); a!=INVALID; ++a) ++count;
   459 
   459 
   460       /// Iterator class for the incoming arcs of a node.
   460       /// Iterator class for the incoming arcs of a node.
   461 
   461 
   462       /// This iterator goes trough the \e incoming directed arcs of a
   462       /// This iterator goes trough the \e incoming directed arcs of a
   463       /// certain node of a graph.
   463       /// certain node of a graph.
   464       /// Its usage is quite simple, for example you can count the number
   464       /// Its usage is quite simple, for example, you can count the number
   465       /// of incoming arcs of a node \c n
   465       /// of incoming arcs of a node \c n
   466       /// in a graph \c g of type \c %Graph as follows.
   466       /// in a graph \c g of type \c %Graph as follows.
   467       ///\code
   467       ///\code
   468       /// int count=0;
   468       /// int count=0;
   469       /// for (Digraph::InArcIt a(g, n); a!=INVALID; ++a) ++count;
   469       /// for (Digraph::InArcIt a(g, n); a!=INVALID; ++a) ++count;
   585 
   585 
   586       /// \brief The first node of the edge.
   586       /// \brief The first node of the edge.
   587       ///
   587       ///
   588       /// Returns the first node of the given edge.
   588       /// Returns the first node of the given edge.
   589       ///
   589       ///
   590       /// Edges don't have source and target nodes, however methods
   590       /// Edges don't have source and target nodes, however, methods
   591       /// u() and v() are used to query the two end-nodes of an edge.
   591       /// u() and v() are used to query the two end-nodes of an edge.
   592       /// The orientation of an edge that arises this way is called
   592       /// The orientation of an edge that arises this way is called
   593       /// the inherent direction, it is used to define the default
   593       /// the inherent direction, it is used to define the default
   594       /// direction for the corresponding arcs.
   594       /// direction for the corresponding arcs.
   595       /// \sa v()
   595       /// \sa v()
   598 
   598 
   599       /// \brief The second node of the edge.
   599       /// \brief The second node of the edge.
   600       ///
   600       ///
   601       /// Returns the second node of the given edge.
   601       /// Returns the second node of the given edge.
   602       ///
   602       ///
   603       /// Edges don't have source and target nodes, however methods
   603       /// Edges don't have source and target nodes, however, methods
   604       /// u() and v() are used to query the two end-nodes of an edge.
   604       /// u() and v() are used to query the two end-nodes of an edge.
   605       /// The orientation of an edge that arises this way is called
   605       /// The orientation of an edge that arises this way is called
   606       /// the inherent direction, it is used to define the default
   606       /// the inherent direction, it is used to define the default
   607       /// direction for the corresponding arcs.
   607       /// direction for the corresponding arcs.
   608       /// \sa u()
   608       /// \sa u()