COIN-OR::LEMON - Graph Library

Changeset 987:87f7c54892df in lemon-0.x for src/work/klao


Ignore:
Timestamp:
11/13/04 18:07:10 (19 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1377
Message:

Naming changes:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/klao/iter_map.h

    r921 r987  
    2626  public:
    2727
    28     typedef typename KeyIntMap::KeyType KeyType;
    29     typedef Val ValueType;
     28    typedef typename KeyIntMap::Key Key;
     29    typedef Val Value;
    3030
    31     typedef typename std::vector<KeyType>::const_iterator iterator;
     31    typedef typename std::vector<Key>::const_iterator iterator;
    3232
    3333  protected:
    3434    KeyIntMap &base;
    35     std::vector<KeyType> data;
     35    std::vector<Key> data;
    3636    size_t bounds[N];
    3737    Val def_val;
     
    5656      if(m != n) {
    5757        size_t orig_a = a;
    58         KeyType orig_key = data[a];
     58        Key orig_key = data[a];
    5959        while(m > n) {
    6060          --m;
     
    8181    }
    8282
    83     Val operator[](const KeyType& k) const {
     83    Val operator[](const Key& k) const {
    8484      return find(base[k]);
    8585    }
    8686
    87     void set(const KeyType& k, Val n) {
     87    void set(const Key& k, Val n) {
    8888      // FIXME: range check?
    8989      size_t a = base[k];
     
    9696    }
    9797
    98     void insert(const KeyType& k, Val n) {
     98    void insert(const Key& k, Val n) {
    9999      data.push_back(k);
    100100      base.set(k, move(bounds[N-1]++, N-1, n));
     
    103103    /// This func is not very usable, but necessary to implement
    104104    /// dynamic map behaviour.
    105     void remove(const KeyType& k) {
     105    void remove(const Key& k) {
    106106      size_t a = base[k];
    107107      if(a < bounds[N-1]) {
     
    131131
    132132    /// For use as an iterator...
    133     KeyType& first(KeyType &k, Val n) {
     133    Key& first(Key &k, Val n) {
    134134      size_t i = (n ? bounds[n-1] : 0);
    135135      if( i < bounds[n] ) {
     
    143143
    144144    /// For use as an iterator...
    145     KeyType& next(KeyType &k) {
     145    Key& next(Key &k) {
    146146      size_t i = base[k];
    147147      uint8_t n = find(i);
Note: See TracChangeset for help on using the changeset viewer.