Changeset 242:b255f25ad394 in lemon0.x for src/work/alpar/emptygraph.h
 Timestamp:
 03/24/04 14:06:06 (19 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@341
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/alpar/emptygraph.h
r216 r242 3 3 #define HUGO_EMPTYGRAPH_H 4 4 5 ///\file 6 ///\brief Declaration of GraphSkeleton. 7 5 8 #include <invalid.h> 6 9 … … 13 16 /// An empty graph class. 14 17 15 /// When you read this for the first time,16 /// please send an email to alpar\@cs.elte.hu.17 ///18 18 /// This class provides all the common features of a graph structure, 19 19 /// however completely without implementations and real data structures … … 103 103 }; 104 104 105 /// This iterator goes trough tthe outgoing edges of a node.106 107 /// This iterator goes trough tthe \e outgoing edges of a certain node105 /// This iterator goes trough the outgoing edges of a node. 106 107 /// This iterator goes trough the \e outgoing edges of a certain node 108 108 /// of a graph. 109 109 /// Its usage is quite simple, for example you can count the number … … 131 131 }; 132 132 133 /// This iterator goes trough tthe incoming edges of a node.134 135 /// This iterator goes trough tthe \e incoming edges of a certain node133 /// This iterator goes trough the incoming edges of a node. 134 135 /// This iterator goes trough the \e incoming edges of a certain node 136 136 /// of a graph. 137 137 /// Its usage is quite simple, for example you can count the number … … 179 179 NodeIt &first(NodeIt &i) const { return i;} 180 180 181 /// The first incoming edge. 182 InEdgeIt &first(InEdgeIt &i, Node n) const { return i;} 181 183 /// The first outgoing edge. 182 InEdgeIt &first(InEdgeIt &i, Node n) const { return i;}183 /// The first incoming edge.184 184 OutEdgeIt &first(OutEdgeIt &i, Node n) const { return i;} 185 185 // SymEdgeIt &first(SymEdgeIt &, Node) const { return i;} … … 229 229 ///Gives back the \e id of a node. 230 230 231 ///\warning Not all graph structure provide this feature.231 ///\warning Not all graph structures provide this feature. 232 232 /// 233 233 int id(const Node) const { return 0;} 234 234 ///Gives back the \e id of an edge. 235 235 236 ///\warning Not all graph structure provide this feature.236 ///\warning Not all graph structures provide this feature. 237 237 /// 238 238 int id(const Edge) const { return 0;} … … 253 253 Edge addEdge(Node tail, Node head) { return INVALID;} 254 254 255 /// Deletes a node. 256 257 ///\warning Not all graph structure provide this feature. 258 /// 259 void erase(Node n) {} 260 /// Deletes an edge. 261 262 ///\warning Not all graph structure provide this feature. 263 /// 264 void erase(Edge e) {} 265 266 /// Reset the graph. 255 /// Resets the graph. 267 256 268 257 /// This function deletes all edges and nodes of the graph. … … 272 261 int nodeNum() const { return 0;} 273 262 int edgeNum() const { return 0;} 274 263 264 /// Defalult constructor. 275 265 GraphSkeleton() {} 266 ///Copy consructor. 276 267 GraphSkeleton(const GraphSkeleton &G) {} 277 268 278 269 279 270 280 271 ///Read/write/reference map of the nodes to type \c T. … … 344 335 }; 345 336 337 /// An empty eraseable graph class. 338 339 /// This class provides all the common features of an \e eraseable graph 340 /// structure, 341 /// however completely without implementations and real data structures 342 /// behind the interface. 343 /// All graph algorithms should compile with this class, but it will not 344 /// run properly, of course. 345 /// 346 /// \todo This blabla could be replaced by a sepatate description about 347 /// Skeletons. 348 /// 349 /// It can be used for checking the interface compatibility, 350 /// or it can serve as a skeleton of a new graph structure. 351 /// 352 /// Also, you will find here the full documentation of a certain graph 353 /// feature, the documentation of a real graph imlementation 354 /// like @ref ListGraph or 355 /// @ref SmartGraph will just refer to this structure. 356 class EraseableGraphSkeleton : public GraphSkeleton 357 { 358 public: 359 /// Deletes a node. 360 void erase(Node n) {} 361 /// Deletes an edge. 362 void erase(Edge e) {} 363 364 /// Defalult constructor. 365 GraphSkeleton() {} 366 ///Copy consructor. 367 GraphSkeleton(const GraphSkeleton &G) {} 368 }; 369 370 346 371 // @} 347 372
Note: See TracChangeset
for help on using the changeset viewer.