COIN-OR::LEMON - Graph Library

Changeset 209:765619b7cbb2 in lemon for lemon/maps.h


Ignore:
Timestamp:
07/13/08 20:51:02 (11 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Phase:
public
Message:

Apply unify-sources.sh to the source tree

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/maps.h

    r167 r209  
    1 /* -*- C++ -*-
     1/* -*- mode: C++; indent-tabs-mode: nil; -*-
    22 *
    3  * This file is a part of LEMON, a generic C++ optimization library
     3 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    55 * Copyright (C) 2003-2008
     
    405405      typename Map::iterator it = _map.lower_bound(k);
    406406      if (it != _map.end() && !_map.key_comp()(k, it->first))
    407         return it->second;
     407        return it->second;
    408408      else
    409         return _map.insert(it, std::make_pair(k, _value))->second;
     409        return _map.insert(it, std::make_pair(k, _value))->second;
    410410    }
    411411
     
    414414      typename Map::const_iterator it = _map.find(k);
    415415      if (it != _map.end())
    416         return it->second;
     416        return it->second;
    417417      else
    418         return _value;
     418        return _value;
    419419    }
    420420
     
    423423      typename Map::iterator it = _map.lower_bound(k);
    424424      if (it != _map.end() && !_map.key_comp()(k, it->first))
    425         it->second = v;
     425        it->second = v;
    426426      else
    427         _map.insert(it, std::make_pair(k, v));
     427        _map.insert(it, std::make_pair(k, v));
    428428    }
    429429
     
    545545  /// \todo Check the requirements.
    546546  template<typename M1, typename M2, typename F,
    547            typename V = typename F::result_type>
     547           typename V = typename F::result_type>
    548548  class CombineMap : public MapBase<typename M1::Key, V> {
    549549    const M1 &_m1;
     
    616616  /// \sa MapToFunctor
    617617  template<typename F,
    618            typename K = typename F::argument_type,
    619            typename V = typename F::result_type>
     618           typename K = typename F::argument_type,
     619           typename V = typename F::result_type>
    620620  class FunctorToMap : public MapBase<K, V> {
    621621    F _f;
     
    13181318
    13191319  /// @}
    1320  
     1320
    13211321  // Logical maps and map adaptors:
    13221322
     
    17161716#else
    17171717  template <typename It,
    1718             typename Ke=typename _maps_bits::IteratorTraits<It>::Value>
     1718            typename Ke=typename _maps_bits::IteratorTraits<It>::Value>
    17191719#endif
    17201720  class LoggerBoolMap {
     
    17421742    void set(const Key& key, Value value) {
    17431743      if (value) {
    1744         *_end++ = key;
     1744        *_end++ = key;
    17451745      }
    17461746    }
     
    17501750    Iterator _end;
    17511751  };
    1752  
     1752
    17531753  /// Returns a \ref LoggerBoolMap class
    17541754
Note: See TracChangeset for help on using the changeset viewer.