Marci's changes accepted.
authoralpar
Fri, 12 Mar 2004 15:42:51 +0000
changeset 177924f9555711d
parent 176 f574ee5750fc
child 178 cd254eed75eb
Marci's changes accepted.
src/work/alpar/smart_graph.h
     1.1 --- a/src/work/alpar/smart_graph.h	Fri Mar 12 09:46:44 2004 +0000
     1.2 +++ b/src/work/alpar/smart_graph.h	Fri Mar 12 15:42:51 2004 +0000
     1.3 @@ -12,9 +12,6 @@
     1.4  
     1.5    class SmartGraph {
     1.6  
     1.7 -//     static const int INVALID=-1;
     1.8 -//     static const int INVALID_NODE=INT_MAX;
     1.9 -
    1.10      struct NodeT 
    1.11      {
    1.12        int first_in,first_out;      
    1.13 @@ -116,23 +113,12 @@
    1.14        e=InEdgeIt(*this,v); return e; }
    1.15  
    1.16      template< typename It >
    1.17 -    It first() const { 
    1.18 -      It e;
    1.19 -      //Marci
    1.20 -      /*getF*/first(e);
    1.21 -      return e; 
    1.22 -    }
    1.23 +    It first() const { It e; first(e); return e; }
    1.24  
    1.25      template< typename It >
    1.26 -    It first(Node v) const { 
    1.27 -      It e;
    1.28 -      //Marci
    1.29 -      /*getF*/first(e, v);
    1.30 -      return e; 
    1.31 -    }
    1.32 +    It first(Node v) const { It e; first(e,v); return e; }
    1.33  
    1.34      bool valid(Edge e) const { return e.n!=-1; }
    1.35 -    //    bool valid(EdgeIt e) const { return e.n<int(edges.size()); }
    1.36      bool valid(Node n) const { return n.n!=-1; }
    1.37      
    1.38      void setInvalid(Edge &e) { e.n=-1; }
    1.39 @@ -140,10 +126,7 @@
    1.40      
    1.41      template <typename It> It getNext(It it) const
    1.42      { It tmp(it); return next(tmp); }
    1.43 -    //{ It tmp; tmp.n=it.n+1; return tmp; }
    1.44  
    1.45 -    //FIXME correction Marci: I changed to NodeIt from Node
    1.46 -    //NodeIt& next(NodeIt& it) const { it.n=(it.n+2)%nodes.size()-1; return it; }
    1.47      NodeIt& next(NodeIt& it) const { 
    1.48        it.n=(it.n+2)%(nodes.size()+1)-1; 
    1.49        return it; 
    1.50 @@ -225,7 +208,6 @@
    1.51        Edge(int nn) {n=nn;}
    1.52      public:
    1.53        Edge() { }
    1.54 -      // Marci: kiszedtem az Invalid i-bol az i-t 
    1.55        Edge (Invalid) { n=-1; }
    1.56        bool operator==(const Edge i) const {return n==i.n;}
    1.57        bool operator!=(const Edge i) const {return n!=i.n;}
    1.58 @@ -330,6 +312,7 @@
    1.59        {
    1.60  	if(k.n>=container.size()) container.resize(k.n+1);
    1.61        }
    1.62 +
    1.63  //       void erase(const Node k)
    1.64  //       {
    1.65  // 	//FIXME: Please implement me.