Many of the old stuffs has been finally removed.
authoralpar
Sat, 03 Apr 2004 18:42:39 +0000
changeset 2850bc5f7f66bfa
parent 284 2d4684f76aac
child 286 d3c4d99860a9
Many of the old stuffs has been finally removed.
src/include/smart_graph.h
     1.1 --- a/src/include/smart_graph.h	Sat Apr 03 18:41:46 2004 +0000
     1.2 +++ b/src/include/smart_graph.h	Sat Apr 03 18:42:39 2004 +0000
     1.3 @@ -79,21 +79,11 @@
     1.4      class OutEdgeIt;
     1.5      class InEdgeIt;
     1.6      
     1.7 -    //     class Node { int n; };
     1.8 -    //     class NodeIt : public Node { };
     1.9 -    //     class Edge { int n; };
    1.10 -    //     class EdgeIt : public Edge {};
    1.11 -    //     class OutEdgeIt : public Edge {};
    1.12 -    //     class InEdgeIt : public Edge {};
    1.13 -    //     class SymEdge;
    1.14 -    
    1.15      template <typename T> class NodeMap;
    1.16      template <typename T> class EdgeMap;
    1.17      
    1.18    public:
    1.19  
    1.20 -    /* default constructor */
    1.21 -
    1.22      SmartGraph() : nodes(), edges() { }
    1.23      SmartGraph(const SmartGraph &_g) : nodes(_g.nodes), edges(_g.edges) { }
    1.24      
    1.25 @@ -118,15 +108,11 @@
    1.26      Node tail(Edge e) const { return edges[e.n].tail; }
    1.27      Node head(Edge e) const { return edges[e.n].head; }
    1.28  
    1.29 -    // Marci
    1.30      Node aNode(OutEdgeIt e) const { return edges[e.n].tail; }
    1.31      Node aNode(InEdgeIt e) const { return edges[e.n].head; }
    1.32 -//     //Node aNode(const SymEdge& e) const { return e.aNode(); }
    1.33  
    1.34 -    // Marci
    1.35      Node bNode(OutEdgeIt e) const { return edges[e.n].head; }
    1.36      Node bNode(InEdgeIt e) const { return edges[e.n].tail; }
    1.37 -//     //Node bNode(const SymEdge& e) const { return e.bNode(); }
    1.38  
    1.39      NodeIt& first(NodeIt& v) const { 
    1.40        v=NodeIt(*this); return v; }
    1.41 @@ -273,45 +259,6 @@
    1.42        InEdgeIt(const SmartGraph& G,Node v) :Edge(G.nodes[v.n].first_in){}
    1.43      };
    1.44  
    1.45 -    // Map types
    1.46 -
    1.47 -//     // Static Maps are not necessary.
    1.48 -//     template <typename T>
    1.49 -//     class NodeMap {
    1.50 -//       const SmartGraph& G; 
    1.51 -//       std::vector<T> container;
    1.52 -//     public:
    1.53 -//       typedef T ValueType;
    1.54 -//       typedef Node KeyType;
    1.55 -//       NodeMap(const SmartGraph& _G) : G(_G), container(G.maxNodeId()) { }
    1.56 -//       NodeMap(const SmartGraph& _G, T a) : 
    1.57 -// 	G(_G), container(G.maxNodeId(), a) { }
    1.58 -//       void set(Node n, T a) { container[n.n]=a; }
    1.59 -//       T get(Node n) const { return container[n.n]; }
    1.60 -//       T& operator[](Node n) { return container[n.n]; }
    1.61 -//       const T& operator[](Node n) const { return container[n.n]; }
    1.62 -//       void update() { container.resize(G.maxNodeId()); }
    1.63 -//       void update(T a) { container.resize(G.maxNodeId(), a); }
    1.64 -//     };
    1.65 -
    1.66 -//     template <typename T>
    1.67 -//     class EdgeMap {
    1.68 -//       const SmartGraph& G; 
    1.69 -//       std::vector<T> container;
    1.70 -//     public:
    1.71 -//       typedef T ValueType;
    1.72 -//       typedef Edge KeyType;
    1.73 -//       EdgeMap(const SmartGraph& _G) : G(_G), container(G.maxEdgeId()) { }
    1.74 -//       EdgeMap(const SmartGraph& _G, T a) : 
    1.75 -// 	G(_G), container(G.maxEdgeId(), a) { }
    1.76 -//       void set(Edge e, T a) { container[e.n]=a; }
    1.77 -//       T get(Edge e) const { return container[e.n]; }
    1.78 -//       T& operator[](Edge e) { return container[e.n]; } 
    1.79 -//       const T& operator[](Edge e) const { return container[e.n]; } 
    1.80 -//       void update() { container.resize(G.maxEdgeId()); }
    1.81 -//       void update(T a) { container.resize(G.maxEdgeId(), a); }
    1.82 -//     };
    1.83 -
    1.84      template <typename T> class NodeMap : public DynMapBase<Node>
    1.85      {
    1.86        std::vector<T> container;
    1.87 @@ -374,12 +321,10 @@
    1.88        void erase(const Node) { }
    1.89        
    1.90        void set(Node n, T a) { container[n.n]=a; }
    1.91 -      //T get(Node n) const { return container[n.n]; }
    1.92 -      //Hajjaj:
    1.93 -      //T& operator[](Node n) { return container[n.n]; }
    1.94 +      //'T& operator[](Node n)' would be wrong here
    1.95        typename std::vector<T>::reference
    1.96        operator[](Node n) { return container[n.n]; }
    1.97 -      //const T& operator[](Node n) const { return container[n.n]; }
    1.98 +      //'const T& operator[](Node n)' would be wrong here
    1.99        typename std::vector<T>::const_reference 
   1.100        operator[](Node n) const { return container[n.n]; }
   1.101  
   1.102 @@ -400,8 +345,8 @@
   1.103  	return *this;
   1.104        }
   1.105        
   1.106 -      void update() {}    //Useless for DynMaps
   1.107 -      void update(T a) {}  //Useless for DynMaps
   1.108 +      void update() {}    //Useless for Dynamic Maps
   1.109 +      void update(T a) {}  //Useless for Dynamic Maps
   1.110      };
   1.111      
   1.112      template <typename T> class EdgeMap : public DynMapBase<Edge>