Rename a private type in MCF classes (#180)
authorPeter Kovacs <kpeter@inf.elte.hu>
Fri, 13 Nov 2009 00:37:55 +0100
changeset 8207ef7a5fbb85d
parent 819 d93490b861e9
child 821 072ec8120958
Rename a private type in MCF classes (#180)

The new MCF algorithms define a private map type VectorMap,
which could be misleading, since there is an other VectorMap
defined in lemon/bits/vector_map.h. Thus the new type is
is renamed to StaticVectorMap.
lemon/cost_scaling.h
lemon/cycle_canceling.h
     1.1 --- a/lemon/cost_scaling.h	Fri Nov 13 00:24:39 2009 +0100
     1.2 +++ b/lemon/cost_scaling.h	Fri Nov 13 00:37:55 2009 +0100
     1.3 @@ -205,12 +205,12 @@
     1.4    private:
     1.5    
     1.6      template <typename KT, typename VT>
     1.7 -    class VectorMap {
     1.8 +    class StaticVectorMap {
     1.9      public:
    1.10        typedef KT Key;
    1.11        typedef VT Value;
    1.12        
    1.13 -      VectorMap(std::vector<Value>& v) : _v(v) {}
    1.14 +      StaticVectorMap(std::vector<Value>& v) : _v(v) {}
    1.15        
    1.16        const Value& operator[](const Key& key) const {
    1.17          return _v[StaticDigraph::id(key)];
    1.18 @@ -228,8 +228,8 @@
    1.19        std::vector<Value>& _v;
    1.20      };
    1.21  
    1.22 -    typedef VectorMap<StaticDigraph::Node, LargeCost> LargeCostNodeMap;
    1.23 -    typedef VectorMap<StaticDigraph::Arc, LargeCost> LargeCostArcMap;
    1.24 +    typedef StaticVectorMap<StaticDigraph::Node, LargeCost> LargeCostNodeMap;
    1.25 +    typedef StaticVectorMap<StaticDigraph::Arc, LargeCost> LargeCostArcMap;
    1.26  
    1.27    private:
    1.28  
     2.1 --- a/lemon/cycle_canceling.h	Fri Nov 13 00:24:39 2009 +0100
     2.2 +++ b/lemon/cycle_canceling.h	Fri Nov 13 00:37:55 2009 +0100
     2.3 @@ -152,12 +152,12 @@
     2.4    private:
     2.5    
     2.6      template <typename KT, typename VT>
     2.7 -    class VectorMap {
     2.8 +    class StaticVectorMap {
     2.9      public:
    2.10        typedef KT Key;
    2.11        typedef VT Value;
    2.12        
    2.13 -      VectorMap(std::vector<Value>& v) : _v(v) {}
    2.14 +      StaticVectorMap(std::vector<Value>& v) : _v(v) {}
    2.15        
    2.16        const Value& operator[](const Key& key) const {
    2.17          return _v[StaticDigraph::id(key)];
    2.18 @@ -175,8 +175,8 @@
    2.19        std::vector<Value>& _v;
    2.20      };
    2.21  
    2.22 -    typedef VectorMap<StaticDigraph::Node, Cost> CostNodeMap;
    2.23 -    typedef VectorMap<StaticDigraph::Arc, Cost> CostArcMap;
    2.24 +    typedef StaticVectorMap<StaticDigraph::Node, Cost> CostNodeMap;
    2.25 +    typedef StaticVectorMap<StaticDigraph::Arc, Cost> CostArcMap;
    2.26  
    2.27    private:
    2.28  
    2.29 @@ -800,9 +800,9 @@
    2.30        const int BF_FIRST_LIMIT  = 2;
    2.31        const double BF_LIMIT_FACTOR = 1.5;
    2.32        
    2.33 -      typedef VectorMap<StaticDigraph::Arc, Value> FilterMap;
    2.34 +      typedef StaticVectorMap<StaticDigraph::Arc, Value> FilterMap;
    2.35        typedef FilterArcs<StaticDigraph, FilterMap> ResDigraph;
    2.36 -      typedef VectorMap<StaticDigraph::Node, StaticDigraph::Arc> PredMap;
    2.37 +      typedef StaticVectorMap<StaticDigraph::Node, StaticDigraph::Arc> PredMap;
    2.38        typedef typename BellmanFord<ResDigraph, CostArcMap>
    2.39          ::template SetDistMap<CostNodeMap>
    2.40          ::template SetPredMap<PredMap>::Create BF;