COIN-OR::LEMON - Graph Library

Changeset 1768:1e2e0238e7c8 in lemon-0.x for lemon/smart_graph.h


Ignore:
Timestamp:
11/04/05 16:59:21 (18 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2300
Message:

Removing findEdge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/smart_graph.h

    r1729 r1768  
    215215    }
    216216
    217     Edge _findEdge(Node u,Node v, Edge prev = INVALID)
    218     {
    219       int e = (prev.n==-1)? nodes[u.n].first_out : edges[prev.n].next_out;
    220       while(e!=-1 && edges[e].target!=v.n) e = edges[e].next_out;
    221       prev.n=e;
    222       return prev;
    223     }
    224 
    225217    Node _split(Node n, bool connect = true)
    226218    {
     
    257249  class SmartGraph : public ExtendedSmartGraphBase {
    258250  public:
    259     /// Finds an edge between two nodes.
    260    
    261     /// Finds an edge from node \c u to node \c v.
    262     ///
    263     /// If \c prev is \ref INVALID (this is the default value), then
    264     /// it finds the first edge from \c u to \c v. Otherwise it looks for
    265     /// the next edge from \c u to \c v after \c prev.
    266     /// \return The found edge or \ref INVALID if there is no such an edge.
    267     ///
    268     /// Thus you can iterate through each edge from \c u to \c v as it follows.
    269     /// \code
    270     /// for(Edge e=G.findEdge(u,v);e!=INVALID;e=G.findEdge(u,v,e)) {
    271     ///   ...
    272     /// }
    273     /// \endcode
    274     /// \todo Possibly it should be a global function.
    275     Edge findEdge(Node u,Node v, Edge prev = INVALID)
    276     {
    277       return _findEdge(u,v,prev);
    278     }
    279251   
    280252    class SnapShot;
Note: See TracChangeset for help on using the changeset viewer.