| The Gaudi Framework v32r1 (f65d50dc)

VectorMap.h
Go to the documentation of this file.
1 // ============================================================================
2 #ifndef GAUDIKERNEL_VECTORMAP_H
3 #define GAUDIKERNEL_VECTORMAP_H 1
4 // ============================================================================
5 // Include files
6 // ============================================================================
7 // STD & STL
8 // ============================================================================
9 #include <algorithm>
10 #include <functional>
11 #include <initializer_list>
12 #include <ostream>
13 #include <utility>
14 #include <vector>
15 // ============================================================================
16 // GaudiKernel
17 // ============================================================================
18 #include "GaudiKernel/MapBase.h"
19
20 // For parsers
21 #include "GaudiKernel/StatusCode.h"
22 #include "GaudiKernel/StringKey.h"
23 // ============================================================================
24 namespace GaudiUtils {
25 // ==========================================================================
100 template <class KEY, class VALUE, class KEYCOMPARE = std::less<const KEY>,
101 class ALLOCATOR = std::allocator<std::pair<KEY, VALUE>>>
102 class VectorMap : public Gaudi::Utils::MapBase {
103 public:
104 // ========================================================================
106 typedef KEY key_type;
108 typedef VALUE mapped_type;
110 typedef KEYCOMPARE key_compare;
112 typedef std::pair<key_type, mapped_type> value_type;
113 // ========================================================================
114 public:
115 // ========================================================================
117 typedef ALLOCATOR allocator_type;
119 typedef typename ALLOCATOR::const_reference reference;
121 typedef typename ALLOCATOR::const_reference const_reference;
123 typedef typename ALLOCATOR::size_type size_type;
125 typedef typename ALLOCATOR::difference_type difference_type;
126 // ========================================================================
127 public:
128 // ========================================================================
130 typedef std::vector<value_type, allocator_type> _vector;
131 // ========================================================================
132 protected:
133 // ========================================================================
135 typedef typename _vector::iterator _iterator;
136 // ========================================================================
137 public:
138 // ========================================================================
140 typedef typename _vector::const_iterator iterator;
142 typedef typename _vector::const_iterator const_iterator;
144 typedef std::reverse_iterator<iterator> reverse_iterator;
146 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
148 typedef std::pair<iterator, iterator> iterators;
150 typedef std::pair<iterator, bool> result_type;
151 // ========================================================================
152 public:
153 // ========================================================================
158 struct _compare_type : public key_compare {
159 public:
160 // ======================================================================
162 _compare_type( const key_compare& cmp ) : key_compare( cmp ) {}
164 _compare_type() : key_compare() {}
166 bool operator()( const key_type& k1, const key_type& k2 ) const {
167 return this->key_compare::operator()( k1, k2 );
168 }
170 bool operator()( const value_type& v1, const value_type& v2 ) const { return operator()( v1.first, v2.first ); }
172 bool operator()( const key_type& k, const value_type& v ) const { return operator()( k, v.first ); }
174 bool operator()( const value_type& v, const key_type& k ) const { return operator()( v.first, k ); }
175 // ======================================================================
176 };
177 // ========================================================================
179 typedef _compare_type compare_type;
180 // ========================================================================
181 public:
182 // ========================================================================
183 // sequential access (only const-versions!)
184 // ========================================================================
186 iterator begin() const { return m_vct.begin(); }
188 iterator end() const { return m_vct.end(); }
190 reverse_iterator rbegin() const { return m_vct.rbegin(); }
192 reverse_iterator rend() const { return m_vct.rend(); }
193 // ========================================================================
194 // list operations : erase & insert
195 // ========================================================================
199 void erase( iterator pos ) { m_vct.erase( iter( pos ) ); }
200 // ========================================================================
217 size_type erase( const key_type& key ) {
218 iterator pos = find( key );
219 if ( end() == pos ) { return 0; }
220 erase( pos );
221 return 1;
222 }
223 // ========================================================================
229 size_type erase( iterator first, iterator last ) {
230 m_vct.erase( iter( first ), iter( last ) );
231 return last - first;
232 }
233 // ========================================================================
254 template <class TYPE>
255 size_type erase( TYPE first, TYPE last ) {
256 size_type res = 0;
257 for ( ; first != last; ++first ) { res += erase( *first ); }
258 return res;
259 }
260 // ========================================================================
302 result_type insert( const key_type& key, const mapped_type& mapped ) { return insert( value_type( key, mapped ) ); }
303 // ========================================================================
344 result_type insert( const value_type& value ) {
345 bool found = true;
346 _iterator result = lower_bound( value.first );
347 if ( end() == result || compare( value.first, result->first ) ) {
348 result = m_vct.insert( result, value );
349 found = false;
350 }
351 return result_type( iter( result ), !found );
352 }
353 // ========================================================================
362 result_type insert( iterator pos, const value_type& value ) {
363 if ( pos != end() && compare( *pos, value ) &&
364 ( pos == end() - 1 || ( !compare( value, *( pos + 1 ) ) && compare( *( pos + 1 ), value ) ) ) ) {
365 return result_type( m_vct.insert( iter( pos ), value ), true );
366 }
367 return insert( value );
368 }
369 // ========================================================================
379 result_type insert( iterator pos, const key_type& key, const mapped_type& mapped ) {
380 return insert( pos, value_type( key, mapped ) );
381 }
382 // ========================================================================
388 template <class PAIRS>
389 void insert( PAIRS first, PAIRS last ) {
390 for ( ; first != last; ++first ) { insert( *first ); }
391 }
392 // ========================================================================
400 template <class KEYS, class VALUES>
401 void insert( KEYS kf, KEYS kl, VALUES vf ) {
402 for ( ; kf != kl; ++kf, ++vf ) { insert( *kf, *vf ); }
403 }
404 // ========================================================================
405 // map operations: lookup, count, ...
406 // ========================================================================
430 iterator find( const key_type& key ) const {
431 iterator res = lower_bound( key );
432 if ( end() != res && compare( key, res->first ) ) { res = end(); }
433 return res;
434 }
435 // ========================================================================
451 size_type count( const key_type& key ) const { return end() == find( key ) ? 0 : 1; }
452 // ========================================================================
453 iterator lower_bound( const key_type& key ) const { return std::lower_bound( begin(), end(), key, compare() ); }
454 iterator upper_bound( const key_type& key ) const { return std::upper_bound( begin(), end(), key, compare() ); }
455 iterators equal_range( const key_type& key ) const { return std::equal_range( begin(), end(), key, compare() ); }
456 // ========================================================================
457 // general container operations :
458 // ========================================================================
460 bool empty() const { return m_vct.empty(); }
462 size_type size() const { return m_vct.size(); }
464 size_type max_size() const { return m_vct.max_size(); }
466 void clear() { m_vct.clear(); }
468 void reserve( size_type num ) { m_vct.reserve( num ); }
469 // ========================================================================
471 void swap( VectorMap& other ) { std::swap( m_vct, other.m_vct ); }
472 // ========================================================================
473 // The basic comparison operators for container
474 // ========================================================================
476 bool operator==( const VectorMap& other ) const { return m_vct == other.m_vct; }
478 bool operator<( const VectorMap& other ) const { return m_vct < other.m_vct; }
479 // ========================================================================
480 // The derived comparison operators for container
481 // ========================================================================
482 friend bool operator>( const VectorMap& left, const VectorMap& right ) { return right < left; }
483 friend bool operator!=( const VectorMap& left, const VectorMap& right ) { return !( left == right ); }
484 friend bool operator>=( const VectorMap& left, const VectorMap& right ) { return !( left < right ); }
485 friend bool operator<=( const VectorMap& left, const VectorMap& right ) { return !( right < left ); }
486 // ========================================================================
516 bool update( const key_type& key, const mapped_type& mapped ) {
517 _iterator result = lower_bound( key );
518 if ( end() == result || compare( key, result->first ) ) {
519 result = m_vct.insert( result, value_type( key, mapped ) );
520 return false;
521 } else {
522 result->second = mapped;
523 }
524 //
525 return true;
526 }
527 // ========================================================================
556 bool update( const value_type& val ) { return update( val.first, val.second ); }
557 // ========================================================================
589 const mapped_type& operator()( const key_type& key ) const {
590 static const mapped_type s_default = mapped_type();
591 iterator res = find( key );
592 if ( end() == res ) { return s_default; }
593 return res->second;
594 }
595 // ========================================================================
626 const mapped_type& operator[]( const key_type& key ) const { return ( *this )( key ); }
627 // ========================================================================
645 const mapped_type& at( const key_type& key ) const {
646 iterator res = find( key );
647 if ( end() == res ) { this->throw_out_of_range_exception(); }
648 return res->second;
649 }
650 // ========================================================================
651 public:
652 // ========================================================================
653 // Constructors, destructors, etc.
654 // ========================================================================
659 VectorMap( const allocator_type& alloc = allocator_type() ) : m_vct( alloc ) {}
660 // ========================================================================
667 template <class INPUT>
668 VectorMap( INPUT first, INPUT last, const allocator_type& alloc = allocator_type() ) : m_vct( first, last, alloc ) {
669 std::sort( m_vct.begin(), m_vct.end(), compare() );
670 }
671 // ========================================================================
677 VectorMap( std::initializer_list<value_type> first, const allocator_type& alloc = allocator_type() )
678 : m_vct( first, alloc ) {
679 std::sort( m_vct.begin(), m_vct.end(), compare() );
680 }
681 // ========================================================================
682 public:
683 // ========================================================================
684 // The specific public accessors
685 // ========================================================================
687 const compare_type& compare() const {
688 static const compare_type s_cmp = compare_type();
689 return s_cmp;
690 }
692 const key_compare& compare_key() const { return compare(); }
694 friend std::ostream& operator<<( std::ostream& str, const VectorMap& /* obj */ ) { return str; }
695 // ========================================================================
696 public:
697 // ========================================================================
699 inline VectorMap& merge( const VectorMap& right ) {
700 for ( const auto& i : right ) { update( i.first, i.second ); }
701 return *this;
702 }
704 template <class K1, class K2, class K3, class K4>
705 inline VectorMap& merge( const VectorMap<K1, K2, K3, K4>& right ) {
706 for ( const auto& i : right ) { update( i.first, i.second ); }
707 return *this;
708 }
709 // ========================================================================
710 public:
711 // ========================================================================
717 const key_type& key_at( const size_t index ) const {
718 if ( index >= size() ) { this->throw_out_of_range_exception(); }
719 auto it = this->begin();
720 std::advance( it, index );
721 return it->first;
722 }
728 const mapped_type& value_at( const size_t index ) const {
729 if ( index >= size() ) { this->throw_out_of_range_exception(); }
730 auto it = this->begin();
731 std::advance( it, index );
732 return it->second;
733 }
734 // ========================================================================
735 protected:
736 // ========================================================================
737 // Pure technical helper functions
738 // ========================================================================
744 template <class TYPE1, class TYPE2>
745 bool compare( const TYPE1& obj1, const TYPE2& obj2 ) const {
746 return compare()( obj1, obj2 );
747 }
748 // ========================================================================
750 _iterator lower_bound( const key_type& key ) {
751 return std::lower_bound( m_vct.begin(), m_vct.end(), key, compare() );
752 }
753 // ========================================================================
755 _iterator iter( iterator p ) {
756 auto result = m_vct.begin();
757 std::advance( result, std::distance( begin(), p ) );
758 return result;
759 }
760 // ========================================================================
762 iterator iter( _iterator p ) {
763 auto result = begin();
764 std::advance( result, std::distance( m_vct.begin(), p ) );
765 return result;
766 }
767 // ========================================================================
768 private:
769 // ========================================================================
771 _vector m_vct; // the underlying sorted vector of (key,mapped) pairs
772 // ========================================================================
773 };
774 // ==========================================================================
775 } // end of namespace GaudiUtils
776 // ============================================================================
777 namespace std {
778 // ==========================================================================
783 template <class KEY, class VALUE, class KEYCOMPARE, class ALLOCATOR>
784 inline void swap( GaudiUtils::VectorMap<KEY, VALUE, KEYCOMPARE, ALLOCATOR>& left,
785 GaudiUtils::VectorMap<KEY, VALUE, KEYCOMPARE, ALLOCATOR>& right ) {
786 left.swap( right );
787 }
788 // ===========================================================================
789 } // end of namespace std
790 // ============================================================================
791 // ============================================================================
792 namespace Gaudi {
793 // ==========================================================================
794 namespace Parsers {
795 // ========================================================================
805 GAUDI_API StatusCode parse( GaudiUtils::VectorMap<std::string, double>& result, const std::string& input );
806 // ========================================================================
817 GAUDI_API StatusCode parse( GaudiUtils::VectorMap<Gaudi::StringKey, double>& result, const std::string& input );
818 // ========================================================================
819 } // namespace Parsers
820 // ==========================================================================
821 } // end of namespace Gaudi
822
823 // ============================================================================
824 // The END
825 // ============================================================================
826 #endif // GAUDIKERNEL_MAPS_H
GaudiUtils::VectorMap::result_type
std::pair< iterator, bool > result_type
visible iterator pait
Definition: VectorMap.h:150
GaudiUtils::VectorMap::compare
const compare_type & compare() const
get the comparison criteria itself
Definition: VectorMap.h:687
GaudiUtils::VectorMap
A bit modified version of 'Loki::AssocVector' associative vector from Loki library by Andrei Alexandr...
Definition: VectorMap.h:102
std::vector::empty
T empty(T... args)
GaudiUtils::VectorMap::operator!=
friend bool operator!=(const VectorMap &left, const VectorMap &right)
Definition: VectorMap.h:483
GaudiUtils::VectorMap::_vector
std::vector< value_type, allocator_type > _vector
the actual storage container (no export)
Definition: VectorMap.h:130
std::distance
T distance(T... args)
GaudiUtils::VectorMap::count
size_type count(const key_type &key) const
count number of elements with the certain key
Definition: VectorMap.h:451
GaudiUtils::VectorMap::operator()
const mapped_type & operator()(const key_type &key) const
access to element by key (const version) there is no container increment for missing keys
Definition: VectorMap.h:589
GaudiUtils::VectorMap::iter
iterator iter(_iterator p)
the conversion from 'non-const' to 'const' iterator
Definition: VectorMap.h:762
std::vector::rend
T rend(T... args)
std::swap
T swap(T... args)
GaudiUtils::VectorMap::reserve
void reserve(size_type num)
reserve the space in the container for at least 'num' elements
Definition: VectorMap.h:468
GaudiUtils::VectorMap::rend
reverse_iterator rend() const
"rend" iterator for sequential access (const-only version!)
Definition: VectorMap.h:192
GaudiUtils::VectorMap::value_at
const mapped_type & value_at(const size_t index) const
useful method for python decoration:
Definition: VectorMap.h:728
GaudiUtils::VectorMap::_compare_type::operator()
bool operator()(const key_type &k1, const key_type &k2) const
compare keys: use key_compare
Definition: VectorMap.h:166
std::advance
T advance(T... args)
GaudiUtils::VectorMap::compare
bool compare(const TYPE1 &obj1, const TYPE2 &obj2) const
compare the objects using the comaprison criteria
Definition: VectorMap.h:745
std::upper_bound
T upper_bound(T... args)
GaudiUtils::VectorMap::_iterator
_vector::iterator _iterator
the regular iterator (no export)
Definition: VectorMap.h:135
GaudiUtils::VectorMap::end
iterator end() const
"end" iterator for sequential access (const-only version!)
Definition: VectorMap.h:188
GaudiUtils::VectorMap::upper_bound
iterator upper_bound(const key_type &key) const
Definition: VectorMap.h:454
std::left
T left(T... args)
std
STL namespace.
std::allocator
STL class.
GaudiUtils::VectorMap::iterator
_vector::const_iterator iterator
visible const_iterator (exported)
Definition: VectorMap.h:140
Gaudi::Parsers::parse
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
Definition: DODBasicMapper.cpp:11
GaudiUtils::VectorMap::erase
size_type erase(TYPE first, TYPE last)
erase the sequence of elements using the sequence of keys
Definition: VectorMap.h:255
std::vector::end
T end(T... args)
GaudiUtils::VectorMap::compare_key
const key_compare & compare_key() const
get the comparison criteria for keys
Definition: VectorMap.h:692
std::lower_bound
T lower_bound(T... args)
GaudiUtils::VectorMap::insert
result_type insert(const key_type &key, const mapped_type &mapped)
insert the (key,value) pair into the container
Definition: VectorMap.h:302
GaudiUtils::VectorMap::operator<<
friend std::ostream & operator<<(std::ostream &str, const VectorMap &)
printout to ostream - not implemented
Definition: VectorMap.h:694
GaudiUtils::VectorMap::merge
VectorMap & merge(const VectorMap< K1, K2, K3, K4 > &right)
merge two maps
Definition: VectorMap.h:705
GaudiUtils::VectorMap::value_type
std::pair< key_type, mapped_type > value_type
the actual storage item
Definition: VectorMap.h:112
GaudiUtils::VectorMap::rbegin
reverse_iterator rbegin() const
"rbegin" iterator for sequential access (const-only version!)
Definition: VectorMap.h:190
GaudiUtils::VectorMap::key_at
const key_type & key_at(const size_t index) const
useful method for python decoration:
Definition: VectorMap.h:717
GaudiUtils::VectorMap::erase
size_type erase(const key_type &key)
erase the element using the key
Definition: VectorMap.h:217
std::string
STL class.
GaudiUtils::VectorMap::_compare_type::operator()
bool operator()(const key_type &k, const value_type &v) const
compare key and pair (key,mapped): use compare by keys
Definition: VectorMap.h:172
GaudiUtils::VectorMap::_compare_type::operator()
bool operator()(const value_type &v1, const value_type &v2) const
compare pairs (key,mapped): use compare by keys
Definition: VectorMap.h:170
GaudiUtils::VectorMap::max_size
size_type max_size() const
maximal allowed size
Definition: VectorMap.h:464
GaudiUtils::VectorMap::reference
ALLOCATOR::const_reference reference
the types to conform STL
Definition: VectorMap.h:119
GaudiUtils::VectorMap::erase
size_type erase(iterator first, iterator last)
erase the sequence of elements using the iterators
Definition: VectorMap.h:229
GaudiUtils::VectorMap::m_vct
_vector m_vct
the underlying sorted vector of (key,mapped) pairs
Definition: VectorMap.h:771
GaudiUtils::VectorMap::begin
iterator begin() const
"begin" iterator for sequential access (const-only version!)
Definition: VectorMap.h:186
GaudiUtils::VectorMap::const_reverse_iterator
std::reverse_iterator< const_iterator > const_reverse_iterator
visible reverse const_iterator (exported)
Definition: VectorMap.h:146
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
GaudiUtils::VectorMap::insert
void insert(PAIRS first, PAIRS last)
insert the sequence of elements into the container
Definition: VectorMap.h:389
MapBase.h
std::vector::erase
T erase(T... args)
GaudiUtils::VectorMap::_compare_type::_compare_type
_compare_type()
default constructor
Definition: VectorMap.h:164
GaudiUtils::VectorMap::insert
void insert(KEYS kf, KEYS kl, VALUES vf)
insert into the container the elements from 2 "parallel" sequences
Definition: VectorMap.h:401
GaudiUtils::VectorMap::operator>=
friend bool operator>=(const VectorMap &left, const VectorMap &right)
Definition: VectorMap.h:484
StringKey.h
Gaudi::Utils::MapBase::throw_out_of_range_exception
void throw_out_of_range_exception() const
throw std::out_of_range exception
Definition: MapBase.cpp:28
GaudiUtils::VectorMap::reverse_iterator
std::reverse_iterator< iterator > reverse_iterator
visible reverse const_iterator (exported)
Definition: VectorMap.h:144
std::vector::clear
T clear(T... args)
GaudiUtils::VectorMap::operator>
friend bool operator>(const VectorMap &left, const VectorMap &right)
Definition: VectorMap.h:482
GaudiUtils::VectorMap::const_reference
ALLOCATOR::const_reference const_reference
the types to conform STL
Definition: VectorMap.h:121
GaudiUtils::VectorMap::_compare_type::_compare_type
_compare_type(const key_compare &cmp)
constructor from the key-comparison criteria
Definition: VectorMap.h:162
GaudiUtils::VectorMap::update
bool update(const value_type &val)
forced insertion of the key/mapped pair The method acts like "insert" but it DOES overwrite the mappe...
Definition: VectorMap.h:556
std::pair
GaudiUtils::VectorMap::insert
result_type insert(iterator pos, const key_type &key, const mapped_type &mapped)
insert the (key,value) pair into the container With the right guess the method could be more efficien...
Definition: VectorMap.h:379
GaudiUtils::VectorMap::at
const mapped_type & at(const key_type &key) const
checked access to elements by key throw std::out_of_range exception for non-existing keys
Definition: VectorMap.h:645
std::vector::insert
T insert(T... args)
GaudiUtils::VectorMap::VectorMap
VectorMap(std::initializer_list< value_type > first, const allocator_type &alloc=allocator_type())
tconstructor from initializer list
Definition: VectorMap.h:677
GaudiUtils::VectorMap::operator<=
friend bool operator<=(const VectorMap &left, const VectorMap &right)
Definition: VectorMap.h:485
GaudiUtils::VectorMap::VectorMap
VectorMap(INPUT first, INPUT last, const allocator_type &alloc=allocator_type())
templated constructor from "convertible" sequence
Definition: VectorMap.h:668
INamedInterface
IInterface compliant class extending IInterface with the name() method.
Definition: INamedInterface.h:15
std::vector::size
T size(T... args)
GaudiUtils::VectorMap::iterators
std::pair< iterator, iterator > iterators
visible iterator pait
Definition: VectorMap.h:148
GaudiUtils::VectorMap::mapped_type
VALUE mapped_type
the actual type of value
Definition: VectorMap.h:108
std::vector< value_type, allocator_type >
GaudiUtils::VectorMap::compare_type
_compare_type compare_type
the actual comparison criteria for valye_type objects
Definition: VectorMap.h:179
GaudiUtils::VectorMap::const_iterator
_vector::const_iterator const_iterator
visible const_iterator (exported)
Definition: VectorMap.h:142
std::vector::begin
T begin(T... args)
GaudiUtils::VectorMap::equal_range
iterators equal_range(const key_type &key) const
Definition: VectorMap.h:455
GaudiUtils::VectorMap::allocator_type
ALLOCATOR allocator_type
allocator (could be useful for optimizations)
Definition: VectorMap.h:117
std::vector::max_size
T max_size(T... args)
GaudiUtils
Forward declarations for the functions in SerializeSTL.h.
Definition: GaudiHistoID.h:136
GaudiUtils::VectorMap::_compare_type::operator()
bool operator()(const value_type &v, const key_type &k) const
compare pair (key,mapped) and the key: use compare by keys
Definition: VectorMap.h:174
GaudiUtils::VectorMap::empty
bool empty() const
empty container ?
Definition: VectorMap.h:460
GaudiUtils::VectorMap::iter
_iterator iter(iterator p)
the conversion from 'const' to 'non-const' iterator
Definition: VectorMap.h:755
std::reverse_iterator
GaudiUtils::VectorMap::update
bool update(const key_type &key, const mapped_type &mapped)
forced insertion of the key/mapped pair The method acts like "insert" but it DOES overwrite the exist...
Definition: VectorMap.h:516
GaudiUtils::VectorMap::key_compare
KEYCOMPARE key_compare
comparison of keys
Definition: VectorMap.h:110
GaudiUtils::VectorMap::clear
void clear()
clear the container
Definition: VectorMap.h:466
GaudiUtils::VectorMap::find
iterator find(const key_type &key) const
find the element by key
Definition: VectorMap.h:430
GaudiUtils::VectorMap::operator==
bool operator==(const VectorMap &other) const
comparison criteria for containers
Definition: VectorMap.h:476
GaudiUtils::VectorMap::key_type
KEY key_type
the actual type of key
Definition: VectorMap.h:106
std::less
std::sort
T sort(T... args)
GaudiUtils::VectorMap::swap
void swap(VectorMap &other)
swap function, which 'swaps' the content of two containers
Definition: VectorMap.h:471
GaudiUtils::VectorMap::_compare_type
The actual structure used to compare the elements Only "key" is important for comparison.
Definition: VectorMap.h:158
StatusCode.h
GaudiUtils::VectorMap::size
size_type size() const
number of elements
Definition: VectorMap.h:462
GaudiUtils::VectorMap::operator<
bool operator<(const VectorMap &other) const
comparison criteria for containers
Definition: VectorMap.h:478
GaudiUtils::VectorMap::insert
result_type insert(iterator pos, const value_type &value)
insert the element with some guess about its new position With the right guess the method could be mo...
Definition: VectorMap.h:362
GaudiUtils::VectorMap::difference_type
ALLOCATOR::difference_type difference_type
the types to conform STL
Definition: VectorMap.h:125
GaudiUtils::VectorMap::operator[]
const mapped_type & operator[](const key_type &key) const
access to element by key (const version) there is no container increment for missing keys
Definition: VectorMap.h:626
GaudiUtils::VectorMap::insert
result_type insert(const value_type &value)
insert the (key,value) pair into the container
Definition: VectorMap.h:344
GaudiUtils::VectorMap::merge
VectorMap & merge(const VectorMap &right)
merge two maps
Definition: VectorMap.h:699
Gaudi::Utils::MapBase
Helper base-class to allow the generic Python-decoration for all "map-like" classes in Gaudi.
Definition: MapBase.h:42
GaudiUtils::VectorMap::size_type
ALLOCATOR::size_type size_type
the types to conform STL
Definition: VectorMap.h:123
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71
GaudiUtils::VectorMap::erase
void erase(iterator pos)
erase the element using the iterator
Definition: VectorMap.h:199
std::ostream
STL class.
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
std::equal_range
T equal_range(T... args)
GaudiUtils::VectorMap::VectorMap
VectorMap(const allocator_type &alloc=allocator_type())
default constructor from the the allocator
Definition: VectorMap.h:659
GaudiUtils::VectorMap::lower_bound
_iterator lower_bound(const key_type &key)
'lower-bound' - non-const version
Definition: VectorMap.h:750
std::initializer_list
std::vector::reserve
T reserve(T... args)
GaudiUtils::VectorMap::lower_bound
iterator lower_bound(const key_type &key) const
Definition: VectorMap.h:453
std::vector::rbegin
T rbegin(T... args)