COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/vector_map.h

    r664 r314  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2008
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    3939  // \brief Graph map based on the std::vector storage.
    4040  //
    41   // The VectorMap template class is graph map structure that automatically
    42   // updates the map when a key is added to or erased from the graph.
    43   // This map type uses std::vector to store the values.
     41  // The VectorMap template class is graph map structure what
     42  // automatically updates the map when a key is added to or erased from
     43  // the map. This map type uses the std::vector to store the values.
    4444  //
    4545  // \tparam _Graph The graph this map is attached to.
     
    5757
    5858    // The graph type of the map.
    59     typedef _Graph GraphType;
     59    typedef _Graph Graph;
    6060    // The item type of the map.
    6161    typedef _Item Item;
     
    7373    // The map type.
    7474    typedef VectorMap Map;
     75    // The base class of the map.
     76    typedef typename Notifier::ObserverBase Parent;
    7577
    7678    // The reference type of the map;
     
    7981    typedef typename Container::const_reference ConstReference;
    8082
    81   private:
    82 
    83     // The base class of the map.
    84     typedef typename Notifier::ObserverBase Parent;
    85 
    86   public:
    8783
    8884    // \brief Constructor to attach the new map into the notifier.
     
    9086    // It constructs a map and attachs it into the notifier.
    9187    // It adds all the items of the graph to the map.
    92     VectorMap(const GraphType& graph) {
     88    VectorMap(const Graph& graph) {
    9389      Parent::attach(graph.notifier(Item()));
    9490      container.resize(Parent::notifier()->maxId() + 1);
     
    9995    // It constructs a map uses a given value to initialize the map.
    10096    // It adds all the items of the graph to the map.
    101     VectorMap(const GraphType& graph, const Value& value) {
     97    VectorMap(const Graph& graph, const Value& value) {
    10298      Parent::attach(graph.notifier(Item()));
    10399      container.resize(Parent::notifier()->maxId() + 1, value);
     
    129125    // \brief Template assign operator.
    130126    //
    131     // The given parameter should conform to the ReadMap
     127    // The given parameter should be conform to the ReadMap
    132128    // concecpt and could be indiced by the current item set of
    133129    // the NodeMap. In this case the value for each item
     
    174170    // \brief Adds a new key to the map.
    175171    //
    176     // It adds a new key to the map. It is called by the observer notifier
     172    // It adds a new key to the map. It called by the observer notifier
    177173    // and it overrides the add() member function of the observer base.
    178174    virtual void add(const Key& key) {
     
    185181    // \brief Adds more new keys to the map.
    186182    //
    187     // It adds more new keys to the map. It is called by the observer notifier
     183    // It adds more new keys to the map. It called by the observer notifier
    188184    // and it overrides the add() member function of the observer base.
    189185    virtual void add(const std::vector<Key>& keys) {
     
    200196    // \brief Erase a key from the map.
    201197    //
    202     // Erase a key from the map. It is called by the observer notifier
     198    // Erase a key from the map. It called by the observer notifier
    203199    // and it overrides the erase() member function of the observer base.
    204200    virtual void erase(const Key& key) {
     
    208204    // \brief Erase more keys from the map.
    209205    //
    210     // It erases more keys from the map. It is called by the observer notifier
     206    // Erase more keys from the map. It called by the observer notifier
    211207    // and it overrides the erase() member function of the observer base.
    212208    virtual void erase(const std::vector<Key>& keys) {
     
    216212    }
    217213
    218     // \brief Build the map.
    219     //
    220     // It builds the map. It is called by the observer notifier
     214    // \brief Buildes the map.
     215    //
     216    // It buildes the map. It called by the observer notifier
    221217    // and it overrides the build() member function of the observer base.
    222218    virtual void build() {
     
    228224    // \brief Clear the map.
    229225    //
    230     // It erases all items from the map. It is called by the observer notifier
     226    // It erase all items from the map. It called by the observer notifier
    231227    // and it overrides the clear() member function of the observer base.
    232228    virtual void clear() {
Note: See TracChangeset for help on using the changeset viewer.