COIN-OR::LEMON - Graph Library

Changeset 2384:805c5a2a36dd in lemon-0.x for lemon/bits/vector_map.h


Ignore:
Timestamp:
03/01/07 18:14:24 (13 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3215
Message:

getNotifier to notifier renaming

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/vector_map.h

    r2260 r2384  
    9191    /// It adds all the items of the graph to the map.
    9292    VectorMap(const Graph& graph) {
    93       Parent::attach(graph.getNotifier(Item()));
    94       container.resize(Parent::getNotifier()->maxId() + 1);
     93      Parent::attach(graph.notifier(Item()));
     94      container.resize(Parent::notifier()->maxId() + 1);
    9595    }
    9696
     
    100100    /// It adds all the items of the graph to the map.
    101101    VectorMap(const Graph& graph, const Value& value) {
    102       Parent::attach(graph.getNotifier(Item()));
    103       container.resize(Parent::getNotifier()->maxId() + 1, value);
     102      Parent::attach(graph.notifier(Item()));
     103      container.resize(Parent::notifier()->maxId() + 1, value);
    104104    }
    105105
     
    109109    VectorMap(const VectorMap& _copy) : Parent() {
    110110      if (_copy.attached()) {
    111         Parent::attach(*_copy.getNotifier());
     111        Parent::attach(*_copy.notifier());
    112112        container = _copy.container;
    113113      }
     
    135135    VectorMap& operator=(const CMap& cmap) {
    136136      checkConcept<concepts::ReadMap<Key, _Value>, CMap>();
    137       const typename Parent::Notifier* notifier = Parent::getNotifier();
     137      const typename Parent::Notifier* notifier = Parent::notifier();
    138138      Item it;
    139139      for (notifier->first(it); it != INVALID; notifier->next(it)) {
     
    150150    /// actual items of the graph.     
    151151    Reference operator[](const Key& key) {
    152       return container[Parent::getNotifier()->id(key)];
     152      return container[Parent::notifier()->id(key)];
    153153    }
    154154               
     
    158158    /// actual items of the graph.
    159159    ConstReference operator[](const Key& key) const {
    160       return container[Parent::getNotifier()->id(key)];
     160      return container[Parent::notifier()->id(key)];
    161161    }
    162162
     
    176176    /// and it overrides the add() member function of the observer base.     
    177177    virtual void add(const Key& key) {
    178       int id = Parent::getNotifier()->id(key);
     178      int id = Parent::notifier()->id(key);
    179179      if (id >= (int)container.size()) {
    180180        container.resize(id + 1);
     
    189189      int max = container.size() - 1;
    190190      for (int i = 0; i < (int)keys.size(); ++i) {
    191         int id = Parent::getNotifier()->id(keys[i]);
     191        int id = Parent::notifier()->id(keys[i]);
    192192        if (id >= max) {
    193193          max = id;
     
    202202    /// and it overrides the erase() member function of the observer base.     
    203203    virtual void erase(const Key& key) {
    204       container[Parent::getNotifier()->id(key)] = Value();
     204      container[Parent::notifier()->id(key)] = Value();
    205205    }
    206206
     
    211211    virtual void erase(const std::vector<Key>& keys) {
    212212      for (int i = 0; i < (int)keys.size(); ++i) {
    213         container[Parent::getNotifier()->id(keys[i])] = Value();
     213        container[Parent::notifier()->id(keys[i])] = Value();
    214214      }
    215215    }
     
    220220    /// and it overrides the build() member function of the observer base.
    221221    virtual void build() {
    222       int size = Parent::getNotifier()->maxId() + 1;
     222      int size = Parent::notifier()->maxId() + 1;
    223223      container.reserve(size);
    224224      container.resize(size);
Note: See TracChangeset for help on using the changeset viewer.