22 #include <boost/serialization/nvp.hpp> 23 #include <boost/serialization/map.hpp> 36 template<
typename KEY,
typename VALUE>
37 class FastMap :
public std::map<KEY, VALUE, std::less<KEY>,
38 typename internal::FastDefaultAllocator<std::pair<const KEY, VALUE> >::type> {
42 typedef std::map<KEY, VALUE, std::less<KEY>,
49 template<
typename INPUTITERATOR>
59 operator std::map<KEY,VALUE>()
const {
60 return std::map<KEY,VALUE>(this->begin(), this->
end());
67 bool exists(
const KEY&
e)
const {
return this->find(e) != this->
end(); }
71 friend class boost::serialization::access;
72 template<
class ARCHIVE>
74 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
constexpr int last(int, int result)
bool exists(const KEY &e) const
FastMap(INPUTITERATOR first, INPUTITERATOR last)
Default allocator for list, map, and set types.
std::map< KEY, VALUE, std::less< KEY >, typename internal::FastDefaultAllocator< std::pair< const KEY, VALUE > >::type > Base
constexpr int first(int i)
Implementation details for constexpr functions.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void serialize(ARCHIVE &ar, const unsigned int)
FastMap(const FastMap< KEY, VALUE > &x)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
An easy way to control which allocator is used for Fast* collections.
bool insert2(const KEY &key, const VALUE &val)