87 #ifndef Utilities_VectorMap_H
88 #define Utilities_VectorMap_H
103 template <
typename _Key,
typename _Tp,
typename _Compare = std::less<_Key> >
116 typedef typename vector_type::pointer
pointer;
148 _Compare GetCompare()
const {
return comp; }
157 {
return keyLess(__x.first, __y.first); }
160 {
return keyLess(__x.first, __y); }
163 {
return keyLess(__x, __y.first); }
167 {
return comp(__x, __y); }
266 throw std::out_of_range(
"Utilities/VectorMap::operator[]");
267 return (*__i).second;
276 throw std::out_of_range(
"Utilities/VectorMap::at");
277 return (*__i).second;
284 throw std::out_of_range(
"Utilities/VectorMap::at");
285 return (*__i).second;
307 return std::make_pair( i,
true);
311 return std::make_pair( i,
false );
320 std::pair<iterator,bool> result =
insert(entry);
325 template <
typename _InputIterator>
326 void insert(_InputIterator __first, _InputIterator __last)
328 for ( ; __first != __last; ++__first)
342 if ( i ==
end() )
return 0;
405 return find(__x) ==
end() ? 0 : 1;
476 template <
typename _K1,
typename _T1,
typename _C1>
480 template <
typename _K1,
typename _T1,
typename _C1>
481 friend bool operator< (const VectorMap<_K1, _T1, _C1>&,
493 template <
typename _Key,
typename _Tp,
typename _Compare>
500 template <
typename _Key,
typename _Tp,
typename _Compare>
501 inline bool operator<(const VectorMap<_Key, _Tp, _Compare>& __x,
504 return std::lexicographical_compare(__x.sortedVectorMap.begin(),
505 __x.sortedVectorMap.end(),
506 __y.sortedVectorMap.begin(),
507 __y.sortedVectorMap.end(),
512 template <
typename _Key,
typename _Tp,
typename _Compare>
516 return !(__x == __y);
520 template <
typename _Key,
typename _Tp,
typename _Compare>
528 template <
typename _Key,
typename _Tp,
typename _Compare>
529 inline bool operator<=(const VectorMap<_Key, _Tp, _Compare>& __x,
536 template <
typename _Key,
typename _Tp,
typename _Compare>
544 template <
typename _Key,
typename _Tp,
typename _Compare>
553 #endif // Utilities_VectorMap_H
std::pair< iterator, iterator > equal_range(const key_type &key)
const_reverse_iterator rend() const
void reserve(size_type i)
bool operator==(TensorIndices< RANK1 > const &a, TensorIndices< RANK2 > const &b)
Comparison operator with tensors of different rank.
value_compare value_comp() const
const mapped_type & operator()(const size_type &index) const
void erase(iterator __first, iterator __last)
reverse_iterator rbegin()
const_iterator upper_bound(const key_type &__x) const
const_reverse_iterator rbegin() const
value_compare valueCompare
const_iterator begin() const
mapped_type & at(const key_type &__k)
const mapped_type & Data(const size_type &index) const
void insert(_InputIterator __first, _InputIterator __last)
bool operator()(const value_type &__x, const value_type &__y) const
vector_type::iterator iterator
std::pair< iterator, bool > insert(const value_type &entry)
void erase(iterator __position)
vector_type sortedVectorMap
const mapped_type & operator[](const key_type &__k) const
std::allocator< std::pair< _Key, _Tp > > allocator_type
const mapped_type & at(const key_type &__k) const
vector_type::const_iterator const_iterator
std::reverse_iterator< const_iterator > const_reverse_iterator
bool operator()(const key_type &__x, const value_type &__y) const
iterator insert(iterator, const value_type &entry)
vector_type::const_pointer const_pointer
allocator_type get_allocator() const
Don't write this to the ROOT file.
const key_type & Key(const size_type &index) const
std::reverse_iterator< iterator > reverse_iterator
const_iterator find(const key_type &key) const
iterator find(const key_type &key)
iterator lower_bound(const key_type &__x)
void swap(VectorMap< _Key, _Tp, _Compare > &__x, VectorMap< _Key, _Tp, _Compare > &__y)
See VectorMap::swap().
vector_type::reference reference
key_compare key_comp() const
mapped_type & operator[](const key_type &key)
ptrdiff_t difference_type
size_type erase(const key_type &key)
size_type count(const key_type &__x) const
bool operator()(const value_type &__x, const key_type &__y) const
void swap(VectorMap &other)
friend bool operator==(const VectorMap< _K1, _T1, _C1 > &, const VectorMap< _K1, _T1, _C1 > &)
iterator upper_bound(const key_type &__x)
vector_type::const_reference const_reference
bool operator>(const VectorMap< _Key, _Tp, _Compare > &__x, const VectorMap< _Key, _Tp, _Compare > &__y)
Based on operator<.
std::vector< value_type > vector_type
vector_type::pointer pointer
bool operator!=(TensorIndices< RANK1 > const &a, TensorIndices< RANK2 > const &b)
Comparison operator with tensors of different rank.
std::pair< _Key, _Tp > value_type
const_iterator lower_bound(const key_type &__x) const
const_iterator end() const
bool operator>=(const VectorMap< _Key, _Tp, _Compare > &__x, const VectorMap< _Key, _Tp, _Compare > &__y)
Based on operator<.
bool keyLess(const key_type &__x, const key_type &__y) const