Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

path.h

Go to the documentation of this file.
00001 /* -*- C++ -*-
00002  * lemon/concept/path.h - Part of LEMON, a generic C++ optimization library
00003  *
00004  * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
00005  * (Egervary Research Group on Combinatorial Optimization, EGRES).
00006  *
00007  * Permission to use, modify and distribute this software is granted
00008  * provided that this copyright notice appears in all copies. For
00009  * precise terms see the accompanying LICENSE file.
00010  *
00011  * This software is provided "AS IS" with no warranty of any kind,
00012  * express or implied, and with no claim as to its suitability for any
00013  * purpose.
00014  *
00015  */
00016 
00022 
00023 #ifndef LEMON_CONCEPT_PATH_H
00024 #define LEMON_CONCEPT_PATH_H
00025 
00026 #include <lemon/invalid.h>
00027 #include <lemon/concept_check.h>
00028 
00029 namespace lemon {
00030   namespace concept {
00033 
00034 
00043     template<typename GR>
00044     class Path {
00045     public:
00046 
00048       typedef /*typename*/ GR Graph;
00050       typedef typename Graph::Edge GraphEdge;
00052      typedef typename Graph::Node GraphNode;
00053       class NodeIt;
00054       class EdgeIt;
00055 
00058       Path(const Graph &_g) {
00059         ignore_unused_variable_warning(_g);
00060       }
00061 
00063       int length() const {return 0;}
00065       bool empty() const { return true;}
00066 
00068       void clear() {}
00069 
00074       GraphNode/*It*/ target() const {return INVALID;}
00079       GraphNode/*It*/ source() const {return INVALID;}
00080 
00085       template<typename It>
00086       It& first(It &i) const { return i=It(*this); }
00087 
00092       NodeIt target(const EdgeIt&) const {return INVALID;}
00093 
00098       NodeIt source(const EdgeIt&) const {return INVALID;}
00099 
00100 
00101       /* Iterator classes */
00102 
00111       class EdgeIt {
00112       public:
00114         EdgeIt() {}
00116         EdgeIt(Invalid) {}
00118         EdgeIt(const Path &) {}
00119 
00120         operator GraphEdge () const {}
00121 
00123         EdgeIt& operator++() {return *this;}
00124 
00126         bool operator==(const EdgeIt&) const {return true;}
00128         bool operator!=(const EdgeIt&) const {return true;}
00129 //      /// Comparison operator
00130 //      /// \todo It is not clear what is the "natural" ordering.
00131 //      bool operator<(const EdgeIt& e) const {}
00132 
00133       };
00134 
00143       class NodeIt {
00144       public:
00146         NodeIt() {}
00148         NodeIt(Invalid) {}
00150         NodeIt(const Path &) {}
00151 
00153         operator const GraphNode& () const {}
00155         NodeIt& operator++() {return *this;}
00156 
00158         bool operator==(const NodeIt&) const {return true;}
00160         bool operator!=(const NodeIt&) const {return true;}
00161 //      /// Comparison operator
00162 //      /// \todo It is not clear what is the "natural" ordering.
00163 //      bool operator<(const NodeIt& e) const {}
00164 
00165       };
00166 
00167       friend class Builder;
00168 
00182       class Builder {
00183       public:
00184 
00185         Path &P;
00186 
00189 
00190         Builder(Path &_p) : P(_p) {}
00191 
00193 
00200         void setStartNode(const GraphNode &) {}
00201 
00203 
00207         void pushFront(const GraphEdge&) {}
00208 
00210 
00214         void pushBack(const GraphEdge&) {}
00215 
00217         void commit() {}
00218 
00220 
00224         void reserveFront(size_t) {}
00226 
00230         void reserveBack(size_t) {}
00231       };
00232     };
00233 
00235   }
00236 
00237 } // namespace lemon
00238 
00239 #endif // LEMON_CONCEPT_PATH_H

Generated on Sat Aug 27 14:14:54 2005 for LEMON by  doxygen 1.4.4