COIN-OR::LEMON - Graph Library

Changeset 1791:62e7d237e1fb in lemon-0.x for lemon/smart_graph.h


Ignore:
Timestamp:
11/14/05 19:38:41 (18 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2332
Message:

Modification on the base graph concept
The extended interface does not changed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/smart_graph.h

    r1770 r1791  
    3131#include <lemon/bits/alteration_notifier.h>
    3232#include <lemon/bits/default_map.h>
    33 
    34 #include <lemon/bits/undir_graph_extender.h>
     33#include <lemon/bits/graph_extender.h>
    3534
    3635#include <lemon/utility.h>
     
    9190    /// Maximum node ID.
    9291    ///\sa id(Node)
    93     int maxId(Node) const { return nodes.size()-1; }
     92    int maxNodeId() const { return nodes.size()-1; }
    9493    /// Maximum edge ID.
    9594   
    9695    /// Maximum edge ID.
    9796    ///\sa id(Edge)
    98     int maxId(Edge) const { return edges.size()-1; }
     97    int maxEdgeId() const { return edges.size()-1; }
    9998
    10099    Node source(Edge e) const { return edges[e.n].source; }
     
    104103   
    105104    /// The ID of a valid Node is a nonnegative integer not greater than
    106     /// \ref maxId(Node). The range of the ID's is not surely continuous
    107     /// and the greatest node ID can be actually less then \ref maxId(Node).
     105    /// \ref maxNodeId(). The range of the ID's is not surely continuous
     106    /// and the greatest node ID can be actually less then \ref maxNodeId().
    108107    ///
    109108    /// The ID of the \ref INVALID node is -1.
     
    113112   
    114113    /// The ID of a valid Edge is a nonnegative integer not greater than
    115     /// \ref maxId(Edge). The range of the ID's is not surely continuous
    116     /// and the greatest edge ID can be actually less then \ref maxId(Edge).
     114    /// \ref maxEdgeId(). The range of the ID's is not surely continuous
     115    /// and the greatest edge ID can be actually less then \ref maxEdgeId().
    117116    ///
    118117    /// The ID of the \ref INVALID edge is -1.
     
    120119    static int id(Edge e) { return e.n; }
    121120
    122     static Node fromId(int id, Node) { return Node(id);}
    123 
    124     static Edge fromId(int id, Edge) { return Edge(id);}
     121    static Node nodeFromId(int id) { return Node(id);}
     122
     123    static Edge edgeFromId(int id) { return Edge(id);}
    125124
    126125    Node addNode() {
     
    152151    protected:
    153152      int n;
    154       ///\e
    155 
    156       ///\todo It should be removed (or at least define a setToId() instead).
    157       ///
    158153      Node(int nn) {n=nn;}
    159154    public:
     
    172167    protected:
    173168      int n;
    174       ///\todo It should be removed (or at least define a setToId() instead).
    175       ///
    176169      Edge(int nn) {n=nn;}
    177170    public:
     
    231224    MappableGraphExtender<
    232225    IterableGraphExtender<
    233     AlterableGraphExtender<SmartGraphBase> > > > > ExtendedSmartGraphBase;
    234 
    235   /// \addtogroup graphs
    236   /// @{
     226    AlterableGraphExtender<
     227    GraphExtender<SmartGraphBase> > > > > > ExtendedSmartGraphBase;
     228
     229  /// \ingroup graphs
    237230
    238231  ///A smart graph class.
Note: See TracChangeset for help on using the changeset viewer.