lemon/bits/vector_map.h
changeset 609 4137ef9aacc6
parent 519 9605e051942f
     1.1 --- a/lemon/bits/vector_map.h	Fri Apr 24 10:15:33 2009 +0200
     1.2 +++ b/lemon/bits/vector_map.h	Fri Apr 24 11:54:48 2009 +0200
     1.3 @@ -56,7 +56,7 @@
     1.4    public:
     1.5  
     1.6      // The graph type of the map.
     1.7 -    typedef _Graph Graph;
     1.8 +    typedef _Graph GraphType;
     1.9      // The item type of the map.
    1.10      typedef _Item Item;
    1.11      // The reference map tag.
    1.12 @@ -72,20 +72,24 @@
    1.13  
    1.14      // The map type.
    1.15      typedef VectorMap Map;
    1.16 -    // The base class of the map.
    1.17 -    typedef typename Notifier::ObserverBase Parent;
    1.18  
    1.19      // The reference type of the map;
    1.20      typedef typename Container::reference Reference;
    1.21      // The const reference type of the map;
    1.22      typedef typename Container::const_reference ConstReference;
    1.23  
    1.24 +  private:
    1.25 +
    1.26 +    // The base class of the map.
    1.27 +    typedef typename Notifier::ObserverBase Parent;
    1.28 +
    1.29 +  public:
    1.30  
    1.31      // \brief Constructor to attach the new map into the notifier.
    1.32      //
    1.33      // It constructs a map and attachs it into the notifier.
    1.34      // It adds all the items of the graph to the map.
    1.35 -    VectorMap(const Graph& graph) {
    1.36 +    VectorMap(const GraphType& graph) {
    1.37        Parent::attach(graph.notifier(Item()));
    1.38        container.resize(Parent::notifier()->maxId() + 1);
    1.39      }
    1.40 @@ -94,7 +98,7 @@
    1.41      //
    1.42      // It constructs a map uses a given value to initialize the map.
    1.43      // It adds all the items of the graph to the map.
    1.44 -    VectorMap(const Graph& graph, const Value& value) {
    1.45 +    VectorMap(const GraphType& graph, const Value& value) {
    1.46        Parent::attach(graph.notifier(Item()));
    1.47        container.resize(Parent::notifier()->maxId() + 1, value);
    1.48      }