# HG changeset patch # User alpar # Date 1079106171 0 # Node ID 924f9555711d67f4b07693b5295c942c19578bcd # Parent f574ee5750fc0034745b520d6dd9dd49d3af6286 Marci's changes accepted. diff -r f574ee5750fc -r 924f9555711d src/work/alpar/smart_graph.h --- a/src/work/alpar/smart_graph.h Fri Mar 12 09:46:44 2004 +0000 +++ b/src/work/alpar/smart_graph.h Fri Mar 12 15:42:51 2004 +0000 @@ -12,9 +12,6 @@ class SmartGraph { -// static const int INVALID=-1; -// static const int INVALID_NODE=INT_MAX; - struct NodeT { int first_in,first_out; @@ -116,23 +113,12 @@ e=InEdgeIt(*this,v); return e; } template< typename It > - It first() const { - It e; - //Marci - /*getF*/first(e); - return e; - } + It first() const { It e; first(e); return e; } template< typename It > - It first(Node v) const { - It e; - //Marci - /*getF*/first(e, v); - return e; - } + It first(Node v) const { It e; first(e,v); return e; } bool valid(Edge e) const { return e.n!=-1; } - // bool valid(EdgeIt e) const { return e.n It getNext(It it) const { It tmp(it); return next(tmp); } - //{ It tmp; tmp.n=it.n+1; return tmp; } - //FIXME correction Marci: I changed to NodeIt from Node - //NodeIt& next(NodeIt& it) const { it.n=(it.n+2)%nodes.size()-1; return it; } NodeIt& next(NodeIt& it) const { it.n=(it.n+2)%(nodes.size()+1)-1; return it; @@ -225,7 +208,6 @@ Edge(int nn) {n=nn;} public: Edge() { } - // Marci: kiszedtem az Invalid i-bol az i-t Edge (Invalid) { n=-1; } bool operator==(const Edge i) const {return n==i.n;} bool operator!=(const Edge i) const {return n!=i.n;} @@ -330,6 +312,7 @@ { if(k.n>=container.size()) container.resize(k.n+1); } + // void erase(const Node k) // { // //FIXME: Please implement me.