Changeset 1791:62e7d237e1fb in lemon-0.x for lemon/smart_graph.h
- Timestamp:
- 11/14/05 19:38:41 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2332
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/smart_graph.h
r1770 r1791 31 31 #include <lemon/bits/alteration_notifier.h> 32 32 #include <lemon/bits/default_map.h> 33 34 #include <lemon/bits/undir_graph_extender.h> 33 #include <lemon/bits/graph_extender.h> 35 34 36 35 #include <lemon/utility.h> … … 91 90 /// Maximum node ID. 92 91 ///\sa id(Node) 93 int max Id(Node) const { return nodes.size()-1; }92 int maxNodeId() const { return nodes.size()-1; } 94 93 /// Maximum edge ID. 95 94 96 95 /// Maximum edge ID. 97 96 ///\sa id(Edge) 98 int max Id(Edge) const { return edges.size()-1; }97 int maxEdgeId() const { return edges.size()-1; } 99 98 100 99 Node source(Edge e) const { return edges[e.n].source; } … … 104 103 105 104 /// The ID of a valid Node is a nonnegative integer not greater than 106 /// \ref max Id(Node). The range of the ID's is not surely continuous107 /// and the greatest node ID can be actually less then \ref max Id(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(). 108 107 /// 109 108 /// The ID of the \ref INVALID node is -1. … … 113 112 114 113 /// The ID of a valid Edge is a nonnegative integer not greater than 115 /// \ref max Id(Edge). The range of the ID's is not surely continuous116 /// and the greatest edge ID can be actually less then \ref max Id(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(). 117 116 /// 118 117 /// The ID of the \ref INVALID edge is -1. … … 120 119 static int id(Edge e) { return e.n; } 121 120 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);} 125 124 126 125 Node addNode() { … … 152 151 protected: 153 152 int n; 154 ///\e155 156 ///\todo It should be removed (or at least define a setToId() instead).157 ///158 153 Node(int nn) {n=nn;} 159 154 public: … … 172 167 protected: 173 168 int n; 174 ///\todo It should be removed (or at least define a setToId() instead).175 ///176 169 Edge(int nn) {n=nn;} 177 170 public: … … 231 224 MappableGraphExtender< 232 225 IterableGraphExtender< 233 AlterableGraphExtender< SmartGraphBase> > > > > ExtendedSmartGraphBase;234 235 /// \addtogroup graphs 236 /// @{226 AlterableGraphExtender< 227 GraphExtender<SmartGraphBase> > > > > > ExtendedSmartGraphBase; 228 229 /// \ingroup graphs 237 230 238 231 ///A smart graph class.
Note: See TracChangeset
for help on using the changeset viewer.