COIN-OR::LEMON - Graph Library

Changeset 813:65144c52969c in lemon-0.x for src/hugo/smart_graph.h


Ignore:
Timestamp:
09/07/04 12:35:31 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1109
Message:
  • maxEdgeId() and maxNodeId() now works as their names suggest.
  • maxEdgeId(), maxNodeId(), nodeNum() and edgeNum() are documented.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/hugo/smart_graph.h

    r798 r813  
    8181    SmartGraph(const SmartGraph &_g) : nodes(_g.nodes), edges(_g.edges) { }
    8282   
    83     int nodeNum() const { return nodes.size(); }  //FIXME: What is this?
    84     int edgeNum() const { return edges.size(); }  //FIXME: What is this?
    85 
    86     ///\bug This function does something different than
    87     ///its name would suggests...
    88     int maxNodeId() const { return nodes.size(); }  //FIXME: What is this?
    89     ///\bug This function does something different than
    90     ///its name would suggests...
    91     int maxEdgeId() const { return edges.size(); }  //FIXME: What is this?
     83    ///Number of nodes.
     84    int nodeNum() const { return nodes.size(); }
     85    ///Number of edges.
     86    int edgeNum() const { return edges.size(); }
     87
     88    /// Maximum node ID.
     89   
     90    /// Maximum node ID.
     91    ///\sa id(Node)
     92    int maxNodeId() const { return nodes.size()-1; }
     93    /// Maximum edge ID.
     94   
     95    /// Maximum edge ID.
     96    ///\sa id(Edge)
     97    int maxEdgeId() const { return edges.size()-1; }
    9298
    9399    Node tail(Edge e) const { return edges[e.n].tail; }
     
    103109      e=InEdgeIt(*this,v); return e; }
    104110
     111    /// Node ID.
     112   
     113    /// The ID of a valid Node is a nonnegative integer not greater than
     114    /// \ref maxNodeId(). The range of the ID's is not surely continuous
     115    /// and the greatest node ID can be actually less then \ref maxNodeId().
     116    ///
     117    /// The ID of the \ref INVALID node is -1.
     118    ///\return The ID of the node \c v.
    105119    static int id(Node v) { return v.n; }
     120    /// Edge ID.
     121   
     122    /// The ID of a valid Edge is a nonnegative integer not greater than
     123    /// \ref maxEdgeId(). The range of the ID's is not surely continuous
     124    /// and the greatest edge ID can be actually less then \ref maxEdgeId().
     125    ///
     126    /// The ID of the \ref INVALID edge is -1.
     127    ///\return The ID of the edge \c e.
    106128    static int id(Edge e) { return e.n; }
    107129
Note: See TracChangeset for help on using the changeset viewer.