for igcc-3.4.0
authormarci
Mon, 26 Apr 2004 14:40:59 +0000
changeset 415679e64913c5e
parent 414 3fd2eec272e0
child 416 8ef4ad91c189
for igcc-3.4.0
src/include/smart_graph.h
src/work/marci/bfs_iterator.h
src/work/marci/edmonds_karp_demo.cc
     1.1 --- a/src/include/smart_graph.h	Mon Apr 26 14:25:51 2004 +0000
     1.2 +++ b/src/include/smart_graph.h	Mon Apr 26 14:40:59 2004 +0000
     1.3 @@ -53,8 +53,8 @@
     1.4      protected:
     1.5        const SmartGraph* G; 
     1.6      public:
     1.7 -      virtual void add(const Key k) = NULL;
     1.8 -      virtual void erase(const Key k) = NULL;
     1.9 +      virtual void add(const Key k) = 0;
    1.10 +      virtual void erase(const Key k) = 0;
    1.11        DynMapBase(const SmartGraph &_G) : G(&_G) {}
    1.12        virtual ~DynMapBase() {}
    1.13        friend class SmartGraph;
     2.1 --- a/src/work/marci/bfs_iterator.h	Mon Apr 26 14:25:51 2004 +0000
     2.2 +++ b/src/work/marci/bfs_iterator.h	Mon Apr 26 14:40:59 2004 +0000
     2.3 @@ -127,9 +127,10 @@
     2.4      }
     2.5      Bfs<Graph, ReachedMap, PredMap, DistMap> operator++() {
     2.6        Parent::operator++();
     2.7 -      if (this->graph->valid(this->actual_edge) && this->b_node_newly_reached) {
     2.8 -	pred.set(s, actual_edge);
     2.9 -	dist.set(s, dist[this->aNode()]);
    2.10 +      if (this->graph->valid(this->actual_edge) && this->b_node_newly_reached) 
    2.11 +      {
    2.12 +	pred.set(this->bNode(), this->actual_edge);
    2.13 +	dist.set(this->bNode(), dist[this->aNode()]);
    2.14        }
    2.15        return *this;
    2.16      }
     3.1 --- a/src/work/marci/edmonds_karp_demo.cc	Mon Apr 26 14:25:51 2004 +0000
     3.2 +++ b/src/work/marci/edmonds_karp_demo.cc	Mon Apr 26 14:40:59 2004 +0000
     3.3 @@ -3,7 +3,7 @@
     3.4  #include <fstream>
     3.5  
     3.6  #include <list_graph.h>
     3.7 -//#include <smart_graph.h>
     3.8 +#include <smart_graph.h>
     3.9  #include <dimacs.h>
    3.10  #include <edmonds_karp.h>
    3.11  #include <time_measure.h>
    3.12 @@ -37,8 +37,8 @@
    3.13  
    3.14    typedef ListGraph MutableGraph;
    3.15  
    3.16 -//  typedef SmartGraph Graph;
    3.17 -  typedef ListGraph Graph;
    3.18 +  typedef SmartGraph Graph;
    3.19 +  //  typedef ListGraph Graph;
    3.20    typedef Graph::Node Node;
    3.21    typedef Graph::EdgeIt EdgeIt;
    3.22