Changeset 186:47cd1716870e in lemon-0.x for src/work/alpar/emptygraph.h
- Timestamp:
- 03/15/04 17:30:20 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@262
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/alpar/emptygraph.h
r183 r186 13 13 /// An empty graph class. 14 14 15 /// This class provides all the common features of a grap fstructure,16 /// however completely without implementations orreal data structures15 /// This class provides all the common features of a graph structure, 16 /// however completely without implementations and real data structures 17 17 /// behind the interface. 18 18 /// All graph algorithms should compile with this class, but it will not … … 32 32 /// The base type of the node iterators. 33 33 34 /// This \c Nodeis the base type of each node iterators,34 /// This is the base type of each node iterators, 35 35 /// thus each kind of node iterator will convert to this. 36 36 class Node { … … 59 59 60 60 /// This iterator goes through each node. 61 62 /// This iterator goes through each node. 63 /// Its usage is quite simple, for example you can count the number 64 /// of nodes in graph \c G of type \c Graph like this: 65 /// \code 66 ///int count=0; 67 ///for(Graph::NodeIt n(G);G.valid(n);G.next(n)) count++; 68 /// \endcode 61 69 class NodeIt : public Node { 62 70 public: … … 92 100 }; 93 101 94 /// This iterator goes trought the outgoing edges of a certain graph. 102 /// This iterator goes trought the outgoing edges of a node. 103 104 /// This iterator goes trought the \e outgoing edges of a certain node 105 /// of a graph. 106 /// Its usage is quite simple, for example you can count the number 107 /// of outgoing edges of a node \c n 108 /// in graph \c G of type \c Graph as follows. 109 /// \code 110 ///int count=0; 111 ///for(Graph::OutEdgeIt e(G,n);G.valid(e);G.next(e)) count++; 112 /// \endcode 95 113 96 114 class OutEdgeIt : public Edge { … … 110 128 }; 111 129 130 /// This iterator goes trought the incoming edges of a node. 131 132 /// This iterator goes trought the \e incoming edges of a certain node 133 /// of a graph. 134 /// Its usage is quite simple, for example you can count the number 135 /// of outgoing edges of a node \c n 136 /// in graph \c G of type \c Graph as follows. 137 /// \code 138 ///int count=0; 139 ///for(Graph::InEdgeIt e(G,n);G.valid(e);G.next(e)) count++; 140 /// \endcode 141 112 142 class InEdgeIt : public Edge { 113 143 public: … … 120 150 }; 121 151 // class SymEdgeIt : public Edge {}; 152 153 /// This iterator goes through each edge. 154 155 /// This iterator goes through each edge of a graph. 156 /// Its usage is quite simple, for example you can count the number 157 /// of edges in a graph \c G of type \c Graph as follows: 158 /// \code 159 ///int count=0; 160 ///for(Graph::EdgeIt e(G);G.valid(e);G.next(e)) count++; 161 /// \endcode 122 162 class EdgeIt : public Edge { 123 163 public: … … 174 214 175 215 /// Checks if a node iterator is valid 216 217 ///\todo Maybe, it would be better if iterator converted to 218 ///bool directly, as Jacint prefers. 176 219 bool valid(const Node) const { return true;} 177 220 /// Checks if an edge iterator is valid 221 222 ///\todo Maybe, it would be better if iterator converted to 223 ///bool directly, as Jacint prefers. 178 224 bool valid(const Edge) const { return true;} 179 225 … … 195 241 196 242 /// \return the new node. 243 /// 197 244 Node addNode() { return INVALID;} 198 245 ///Add a new edge to the graph. … … 228 275 229 276 230 ///Read/write map of the nodes to type \c T. 231 277 ///Read/write/reference map of the nodes to type \c T. 278 279 ///Read/write/reference map of the nodes to type \c T. 280 /// \sa MemoryMapSkeleton 232 281 /// \todo We may need copy constructor 233 282 /// \todo We may need conversion from other nodetype … … 263 312 }; 264 313 265 ///Read/write map of the edges to type \c T. 266 267 ///Read/write map of the edges to type \c T. 268 ///It behaves exactly the same way as \ref NodeMap. 314 ///Read/write/reference map of the edges to type \c T. 315 316 ///Read/write/reference map of the edges to type \c T. 317 ///It behaves exactly in the same way as \ref NodeMap. 318 /// \sa NodeMap 319 /// \sa MemoryMapSkeleton 320 /// \todo We may need copy constructor 321 /// \todo We may need conversion from other edgetype 322 /// \todo We may need operator= 269 323 template<class T> class EdgeMap 270 324 {
Note: See TracChangeset
for help on using the changeset viewer.