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  * src/lemon/concept/path.h - Part of LEMON, a generic C++ optimization library
00003  *
00004  * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
00005  * (Egervary Combinatorial Optimization Research Group, 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 
00028 namespace lemon {
00029   namespace concept {
00032 
00033 
00042     template<typename GR>
00043     class Path {
00044     public:
00045 
00047       typedef /*typename*/ GR Graph;
00049       typedef typename Graph::Edge GraphEdge;
00051      typedef typename Graph::Node GraphNode;
00052       class NodeIt;
00053       class EdgeIt;
00054 
00057       Path(const Graph &_G) {}
00058 
00060       size_t length() const {return 0;}
00062       bool empty() const { return true;}
00063 
00065       void clear() {}
00066 
00071       GraphNode/*It*/ target() const {return INVALID;}
00076       GraphNode/*It*/ source() const {return INVALID;}
00077 
00082       template<typename It>
00083       It& first(It &i) const { return i=It(*this); }
00084 
00089       NodeIt target(const EdgeIt& e) const {return INVALID;}
00090 
00095       NodeIt source(const EdgeIt& e) const {return INVALID;}
00096 
00097 
00098       /* Iterator classes */
00099 
00108       class EdgeIt {
00109       public:
00111         EdgeIt() {}
00113         EdgeIt(Invalid) {}
00115         EdgeIt(const Path &_p) {}
00116 
00117         operator GraphEdge () const {}
00118 
00120         EdgeIt& operator++() {return *this;}
00121 
00123         bool operator==(const EdgeIt& e) const {return true;}
00125         bool operator!=(const EdgeIt& e) const {return true;}
00126 //      /// Comparison operator
00127 //      /// \todo It is not clear what is the "natural" ordering.
00128 //      bool operator<(const EdgeIt& e) const {}
00129 
00130       };
00131 
00140       class NodeIt {
00141       public:
00143         NodeIt() {}
00145         NodeIt(Invalid) {}
00147         NodeIt(const Path &_p) {}
00148 
00150         operator const GraphNode& () const {}
00152         NodeIt& operator++() {return *this;}
00153 
00155         bool operator==(const NodeIt& e) const {return true;}
00157         bool operator!=(const NodeIt& e) const {return true;}
00158 //      /// Comparison operator
00159 //      /// \todo It is not clear what is the "natural" ordering.
00160 //      bool operator<(const NodeIt& e) const {}
00161 
00162       };
00163 
00164       friend class Builder;
00165 
00179       class Builder {
00180       public:
00181 
00182         Path &P;
00183 
00186 
00187         Builder(Path &_p) : P(_p) {}
00188 
00190 
00197         void setStartNode(const GraphNode &) {}
00198 
00200 
00204         void pushFront(const GraphEdge& e) {}
00205 
00207 
00211         void pushBack(const GraphEdge& e) {}
00212 
00214         void commit() {}
00215 
00217 
00221         void reserveFront(size_t r) {}
00223 
00227         void reserveBack(size_t r) {}
00228       };
00229     };
00230 
00232   }
00233 
00234 } // namespace lemon
00235 
00236 #endif // LEMON_CONCEPT_PATH_H

Generated on Sat Mar 19 10:58:40 2005 for LEMON by  doxygen 1.4.1