lemon/bits/vector_map.h
changeset 783 ef88c0a30f85
parent 503 9605e051942f
     1.1 --- a/lemon/bits/vector_map.h	Mon Jan 12 23:11:39 2009 +0100
     1.2 +++ b/lemon/bits/vector_map.h	Thu Nov 05 15:48:01 2009 +0100
     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      }
    1.49 @@ -124,7 +128,7 @@
    1.50  
    1.51      // \brief Template assign operator.
    1.52      //
    1.53 -    // The given parameter should be conform to the ReadMap
    1.54 +    // The given parameter should conform to the ReadMap
    1.55      // concecpt and could be indiced by the current item set of
    1.56      // the NodeMap. In this case the value for each item
    1.57      // is assigned by the value of the given ReadMap.