Changeset 145:07c32a103bbb in lemon0.x for src
 Timestamp:
 03/02/04 16:45:27 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@201
 Location:
 src/work/alpar
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

src/work/alpar/emptygraph.h
r67 r145 1 1 // *mode: c++; * 2 2 3 class Graph3 class EmptyGraph 4 4 { 5 5 public: 6 6 7 class EdgeIt {}; 7 8 … … 19 20 EachEdgeIt &getFirst(EachEdgeIt &) const {} 20 21 21 NodeIt next(NodeIt) const {}22 InEdgeIt next(InEdgeIt) const {}23 OutEdgeIt next(OutEdgeIt) const {}24 SymEdgeIt next(SymEdgeIt) const {}25 EachEdgeIt next(EachEdgeIt) const {}22 NodeIt getNext(NodeIt) const {} 23 InEdgeIt getNext(InEdgeIt) const {} 24 OutEdgeIt getNext(OutEdgeIt) const {} 25 SymEdgeIt getNext(SymEdgeIt) const {} 26 EachEdgeIt getNext(EachEdgeIt) const {} 26 27 27 NodeIt & goNext(NodeIt &) const {}28 InEdgeIt & goNext(InEdgeIt &) const {}29 OutEdgeIt & goNext(OutEdgeIt &) const {}30 SymEdgeIt & goNext(SymEdgeIt &) const {}31 EachEdgeIt & goNext(EachEdgeIt &) const {}28 NodeIt &next(NodeIt &) const {} 29 InEdgeIt &next(InEdgeIt &) const {} 30 OutEdgeIt &next(OutEdgeIt &) const {} 31 SymEdgeIt &next(SymEdgeIt &) const {} 32 EachEdgeIt &next(EachEdgeIt &) const {} 32 33 33 34 NodeIt head(EdgeIt) const {} … … 82 83 }; 83 84 }; 85 86 class EmptyBipGraph : public EmptyGraph 87 { 88 class ANodeIt {}; 89 class BNodeIt {}; 90 91 ANodeIt &next(ANodeIt &) {} 92 BNodeIt &next(BNodeIt &) {} 93 94 ANodeIt &getFirst(ANodeIt &) const {} 95 BNodeIt &getFirst(BNodeIt &) const {} 96 97 enum NodeClass { A = 0, B = 1 }; 98 NodeClass getClass(NodeIt n) {} 99 100 } 
src/work/alpar/gwrapper.h
r105 r145 118 118 119 119 template<typename G> 120 class RevGraphExt : public G 121 { 122 public: 123 // typedef G BaseGraph; 124 125 typedef typename G::EdgeIt EdgeIt; 126 127 typedef typename G::InEdgeIt OutEdgeIt; 128 typedef typename G::OutEdgeIt InEdgeIt; 129 typedef typename G::SymEdgeIt SymEdgeIt; 130 typedef typename G::EachEdgeIt EachEdgeIt; 131 132 typedef typename G::NodeIt NodeIt; 133 134 // template<typename I> I &getFirst(I &i); { return graph>getFirst(i); } 135 // template<typename I,typename P> I &getFirst(I &i,const P &p); 136 // { return graph>getFirst(i,p); } 137 // template<typename I> I next(const I i); { return graph>goNext(i); } 138 // template<typename I> I &goNext(I &i); { return graph>goNext(i); } 139 140 NodeIt head(const EdgeIt &e); 141 { return G::tail(e); } 142 NodeIt tail(const EdgeIt &e); 143 { return G::head(e); } 144 145 // template<typename I> NodeIt aNode(const I e); 146 // { return graph>aNode(e); } 147 // template<typename I> NodeIt bNode(const I e); 148 // { return graph>bNode(e); } 149 150 // template<typename I> bool valid(const I i); 151 // { return graph>valid(i); } 152 153 // template<typename I> void setInvalid(const I &i); 154 // { return graph>setInvalid(i); } 155 156 // NodeIt addNode(); { return graph>addNode(); } 157 158 EdgeIt addEdge(const NodeIt from,const NodeIt to); 159 { return G::addEdge(to,from); } 160 161 // template<I> void delete(I i); { graph>delete(i); } 162 163 // void clean(); { graph>clean(); } 164 165 // template<class T> class NodeMap : public typename G::NodeMap<T>; 166 // template<class T> class EdgeMap : public typename G::EdgeMap<T>; 167 168 // void SetG(G &g) {graph = &g;} 169 170 // RevGraphWrapper() {graph = NULL;} 171 // RevGraphWrapper(G &g) {graph = &g;} 172 }; 173 174 template<typename G> 120 175 class SymGraphWrapper 121 176 { … … 172 227 RevGraphWrapper(G &g) {graph = &g;} 173 228 }; 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 174 246 175 247
Note: See TracChangeset
for help on using the changeset viewer.