Changeset 177:924f9555711d in lemon0.x for src
 Timestamp:
 03/12/04 16:42:51 (16 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@253
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/alpar/smart_graph.h
r174 r177 12 12 13 13 class SmartGraph { 14 15 // static const int INVALID=1;16 // static const int INVALID_NODE=INT_MAX;17 14 18 15 struct NodeT … … 117 114 118 115 template< typename It > 119 It first() const { 120 It e; 121 //Marci 122 /*getF*/first(e); 123 return e; 124 } 116 It first() const { It e; first(e); return e; } 125 117 126 118 template< typename It > 127 It first(Node v) const { 128 It e; 129 //Marci 130 /*getF*/first(e, v); 131 return e; 132 } 119 It first(Node v) const { It e; first(e,v); return e; } 133 120 134 121 bool valid(Edge e) const { return e.n!=1; } 135 // bool valid(EdgeIt e) const { return e.n<int(edges.size()); }136 122 bool valid(Node n) const { return n.n!=1; } 137 123 … … 141 127 template <typename It> It getNext(It it) const 142 128 { It tmp(it); return next(tmp); } 143 //{ It tmp; tmp.n=it.n+1; return tmp; } 144 145 //FIXME correction Marci: I changed to NodeIt from Node 146 //NodeIt& next(NodeIt& it) const { it.n=(it.n+2)%nodes.size()1; return it; } 129 147 130 NodeIt& next(NodeIt& it) const { 148 131 it.n=(it.n+2)%(nodes.size()+1)1; … … 226 209 public: 227 210 Edge() { } 228 // Marci: kiszedtem az Invalid ibol az it229 211 Edge (Invalid) { n=1; } 230 212 bool operator==(const Edge i) const {return n==i.n;} … … 331 313 if(k.n>=container.size()) container.resize(k.n+1); 332 314 } 315 333 316 // void erase(const Node k) 334 317 // {
Note: See TracChangeset
for help on using the changeset viewer.