path.h

Go to the documentation of this file.
00001 /* -*- C++ -*- 00002 * src/lemon/skeletons/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 00020 00021 #ifndef LEMON_SKELETON_PATH_H 00022 #define LEMON_SKELETON_PATH_H 00023 00024 #include <lemon/invalid.h> 00025 00026 namespace lemon { 00027 namespace skeleton { 00030 00031 00040 template<typename GR> 00041 class Path { 00042 public: 00043 00045 typedef /*typename*/ GR Graph; 00047 typedef typename Graph::Edge GraphEdge; 00049 typedef typename Graph::Node GraphNode; 00050 class NodeIt; 00051 class EdgeIt; 00052 00055 Path(const Graph &_G) {} 00056 00058 size_t length() const {return 0;} 00060 bool empty() const { return true;} 00061 00063 void clear() {} 00064 00069 GraphNode/*It*/ head() const {return INVALID;} 00074 GraphNode/*It*/ tail() const {return INVALID;} 00075 00080 template<typename It> 00081 It& first(It &i) const { return i=It(*this); } 00082 00087 NodeIt head(const EdgeIt& e) const {return INVALID;} 00088 00093 NodeIt tail(const EdgeIt& e) const {return INVALID;} 00094 00095 00096 /* Iterator classes */ 00097 00107 class EdgeIt { 00108 public: 00110 EdgeIt() {} 00112 EdgeIt(Invalid) {} 00114 EdgeIt(const Path &_p) {} 00115 00116 operator GraphEdge () const {} 00117 00119 EdgeIt& operator++() {return *this;} 00120 00122 bool operator==(const EdgeIt& e) const {return true;} 00124 bool operator!=(const EdgeIt& e) const {return true;} 00125 // /// Comparison operator 00126 // /// \todo It is not clear what is the "natural" ordering. 00127 // bool operator<(const EdgeIt& e) const {} 00128 00129 }; 00130 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 00180 class Builder { 00181 public: 00182 00183 Path &P; 00184 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_SKELETON_PATH_H

Generated on Thu Sep 30 12:18:33 2004 for LEMON by doxygen 1.3.8