Rosetta
|
Keyed-access map with key subset map. More...
#include <SmallKeyMap.hh>
Public Member Functions | |
SmallKeyMap () | |
Default constructor. More... | |
SmallKeyMap (SmallKeyMap const &a) | |
Copy constructor. More... | |
template<typename InputIterator > | |
SmallKeyMap (InputIterator const beg, InputIterator const end) | |
Iterator range constructor. More... | |
~SmallKeyMap () | |
Destructor. More... | |
SmallKeyMap & | operator= (SmallKeyMap const &a) |
Copy assignment. More... | |
SmallKeyMap & | operator= (Mapped const &mapped) |
Uniform mapped value assignment to current elements. More... | |
SmallKeyMap & | assign (Key const &key, Mapped const &mapped) |
Assign a mapped value to an element with a key. More... | |
SmallKeyMap & | assign (Value const &value) |
Assign a value to an element. More... | |
template<typename InputIterator > | |
void | assign (InputIterator const beg, InputIterator const end) |
Iterator assignment. More... | |
SmallKeyMap & | add (Key const &key) |
Add an element with a key if not present: Activate key if inactive. More... | |
SmallKeyMap & | insert (Value const &value) |
Insert an element. More... | |
template<typename InputIterator > | |
void | insert (InputIterator const beg, InputIterator const end) |
Insert elements from iterator range [beg,end) More... | |
void | reserve (Size const num) |
Reserve space for a given number of elements. More... | |
void | shrink () |
Shrink the vectors to remove unused capacity. More... | |
void | swap (SmallKeyMap &a) |
swap( SmallKeyMap ) More... | |
void | clear () |
Clear the vector. More... | |
Size | size () const |
Size. More... | |
bool | empty () const |
Empty? More... | |
Size | max_size () const |
Max size. More... | |
Size | capacity () const |
Capacity. More... | |
bool | has (Key const &key) const |
Is an element with a key present? More... | |
bool | active (Key const &key) const |
Is a key active? More... | |
bool | inactive (Key const &key) const |
Is a key inactive? More... | |
Index const & | index (Key const &key) |
Index of a key. More... | |
ConstIterator | find (Key const &key) const |
Iterator to element with a key. More... | |
Iterator | find (Key const &key) |
Iterator to element with a key. More... | |
MappedReference | operator() (Key const &key) |
SmallKeyMap( key ) More... | |
MappedConstReference | operator[] (Key const &key) const |
SmallKeyMap[ key ] const. More... | |
MappedReference | operator[] (Key const &key) |
SmallKeyMap[ key ]. More... | |
MappedConstReference | operator[] (Index const &i) const |
SmallKeyMap[ index ] const. More... | |
MappedReference | operator[] (Index const &i) |
SmallKeyMap[ index ]. More... | |
ConstReference | operator() (Index const &i) const |
SmallKeyMap( index ) const. More... | |
Reference | operator() (Index const &i) |
SmallKeyMap( index ) More... | |
ConstIterator | begin () const |
Begin iterator. More... | |
Iterator | begin () |
Begin iterator. More... | |
ConstIterator | end () const |
End iterator. More... | |
Iterator | end () |
End iterator. More... | |
ConstReverseIterator | rbegin () const |
Begin reverse iterator. More... | |
ReverseIterator | rbegin () |
Begin reverse iterator. More... | |
ConstReverseIterator | rend () const |
End reverse iterator. More... | |
ReverseIterator | rend () |
End reverse iterator. More... | |
Private Types | |
typedef vector1< std::pair< K, T > > | Vector |
typedef vector1< typename Vector::Index > | IndexMap |
typedef IndexMap::Size | IndexMapSize |
typedef IndexMap::Index | IndexMapIndex |
Private Member Functions | |
Index const & | add_key (Key const &key) |
Add an element with a key if not present and return its index: Activate key if inactive. More... | |
Private Attributes | |
Vector | v_ |
Vector of values indexed by a subset of the possible keys. More... | |
IndexMap | m_ |
Index map from keys into v_: Zero => inactive key. More... | |
Index | u_ |
Upper active index of active keys. More... | |
Friends | |
void | swap (SmallKeyMap &a, SmallKeyMap &b) |
swap( SmallKeyMap, SmallKeyMap ) More... | |
bool | operator== (SmallKeyMap const &a, SmallKeyMap const &b) |
SmallKeyMap == SmallKeyMap. More... | |
bool | operator!= (SmallKeyMap const &a, SmallKeyMap const &b) |
SmallKeyMap != SmallKeyMap. More... | |
Keyed-access map with key subset map.
typedef Vector::Allocator utility::keys::SmallKeyMap< K, T >::Allocator |
typedef Vector::allocator_type utility::keys::SmallKeyMap< K, T >::allocator_type |
typedef Vector::const_iterator utility::keys::SmallKeyMap< K, T >::const_iterator |
typedef Vector::const_pointer utility::keys::SmallKeyMap< K, T >::const_pointer |
typedef Vector::const_reference utility::keys::SmallKeyMap< K, T >::const_reference |
typedef Vector::const_reverse_iterator utility::keys::SmallKeyMap< K, T >::const_reverse_iterator |
typedef Vector::ConstIterator utility::keys::SmallKeyMap< K, T >::ConstIterator |
typedef Vector::ConstPointer utility::keys::SmallKeyMap< K, T >::ConstPointer |
typedef Vector::ConstReference utility::keys::SmallKeyMap< K, T >::ConstReference |
typedef Vector::ConstReverseIterator utility::keys::SmallKeyMap< K, T >::ConstReverseIterator |
typedef Vector::Difference utility::keys::SmallKeyMap< K, T >::Difference |
typedef Vector::difference_type utility::keys::SmallKeyMap< K, T >::difference_type |
typedef Vector::Index utility::keys::SmallKeyMap< K, T >::Index |
typedef Vector::index_type utility::keys::SmallKeyMap< K, T >::index_type |
|
private |
|
private |
|
private |
typedef Vector::iterator utility::keys::SmallKeyMap< K, T >::iterator |
typedef Vector::Iterator utility::keys::SmallKeyMap< K, T >::Iterator |
typedef K utility::keys::SmallKeyMap< K, T >::Key |
typedef K utility::keys::SmallKeyMap< K, T >::key_type |
typedef T utility::keys::SmallKeyMap< K, T >::Mapped |
typedef T const* utility::keys::SmallKeyMap< K, T >::mapped_const_pointer |
typedef T const& utility::keys::SmallKeyMap< K, T >::mapped_const_reference |
typedef T* utility::keys::SmallKeyMap< K, T >::mapped_pointer |
typedef T& utility::keys::SmallKeyMap< K, T >::mapped_reference |
typedef T utility::keys::SmallKeyMap< K, T >::mapped_type |
typedef T const* utility::keys::SmallKeyMap< K, T >::MappedConstPointer |
typedef T const& utility::keys::SmallKeyMap< K, T >::MappedConstReference |
typedef T* utility::keys::SmallKeyMap< K, T >::MappedPointer |
typedef T& utility::keys::SmallKeyMap< K, T >::MappedReference |
typedef Vector::pointer utility::keys::SmallKeyMap< K, T >::pointer |
typedef Vector::Pointer utility::keys::SmallKeyMap< K, T >::Pointer |
typedef Vector::reference utility::keys::SmallKeyMap< K, T >::reference |
typedef Vector::Reference utility::keys::SmallKeyMap< K, T >::Reference |
typedef Vector::reverse_iterator utility::keys::SmallKeyMap< K, T >::reverse_iterator |
typedef Vector::ReverseIterator utility::keys::SmallKeyMap< K, T >::ReverseIterator |
typedef Vector::Size utility::keys::SmallKeyMap< K, T >::Size |
typedef Vector::size_type utility::keys::SmallKeyMap< K, T >::size_type |
typedef Vector::Value utility::keys::SmallKeyMap< K, T >::Value |
typedef Vector::value_type utility::keys::SmallKeyMap< K, T >::value_type |
|
private |
|
inline |
Default constructor.
|
inline |
Copy constructor.
|
inline |
Iterator range constructor.
References utility::keys::SmallKeyMap< K, T >::add_key(), test.T009_Exceptions::e, create_a3b_hbs::first, create_a3b_hbs::i, and utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Destructor.
|
inline |
Is a key active?
References utility::vectorL< L, T, A >::has(), subloop_histogram::key, and utility::keys::SmallKeyMap< K, T >::m_.
Referenced by utility::keys::SmallKeyMap< K, T >::find(), utility::keys::SmallKeyMap< K, T >::has(), utility::keys::SmallKeyMap< K, T >::index(), and utility::keys::SmallKeyMap< K, T >::operator[]().
|
inline |
Add an element with a key if not present: Activate key if inactive.
References utility::keys::SmallKeyMap< K, T >::add_key(), and subloop_histogram::key.
Referenced by job_manager.MoveStatsWindow::__init__(), and pyrosetta.bindings.pose.ResidueLabelAccessor::discard().
|
inlineprivate |
Add an element with a key if not present and return its index: Activate key if inactive.
References debug_assert, utility::vectorL< L, T, A >::has(), create_a3b_hbs::i, subloop_histogram::key, utility::keys::SmallKeyMap< K, T >::m_, utility::keys::SmallKeyMap< K, T >::u_, and utility::keys::SmallKeyMap< K, T >::v_.
Referenced by utility::keys::SmallKeyMap< K, T >::add(), utility::keys::SmallKeyMap< K, T >::assign(), utility::keys::SmallKeyMap< K, T >::insert(), utility::keys::SmallKeyMap< K, T >::operator()(), and utility::keys::SmallKeyMap< K, T >::SmallKeyMap().
|
inline |
|
inline |
Assign a mapped value to an element with a key.
References utility::keys::SmallKeyMap< K, T >::add_key(), subloop_histogram::key, and utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Assign a value to an element.
References utility::keys::SmallKeyMap< K, T >::add_key(), utility::keys::SmallKeyMap< K, T >::v_, and value.
|
inline |
Begin iterator.
References utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Begin iterator.
References utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Capacity.
References utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Clear the vector.
References utility::keys::SmallKeyMap< K, T >::m_, utility::keys::SmallKeyMap< K, T >::u_, and utility::keys::SmallKeyMap< K, T >::v_.
Referenced by utility::keys::SmallKeyMap< K, T >::assign(), and pyrosetta.bindings.pose.ResidueLabelAccessor::discard().
|
inline |
Empty?
References utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
End iterator.
References utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
End iterator.
References utility::keys::SmallKeyMap< K, T >::v_.
Referenced by utility::keys::SmallKeyMap< K, T >::assign(), and utility::keys::SmallKeyMap< K, T >::insert().
|
inline |
Iterator to element with a key.
References utility::keys::SmallKeyMap< K, T >::active(), subloop_histogram::key, utility::keys::SmallKeyMap< K, T >::m_, and utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Iterator to element with a key.
References utility::keys::SmallKeyMap< K, T >::active(), subloop_histogram::key, utility::keys::SmallKeyMap< K, T >::m_, and utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Is an element with a key present?
References utility::keys::SmallKeyMap< K, T >::active(), and subloop_histogram::key.
|
inline |
Is a key inactive?
References utility::vectorL< L, T, A >::has(), subloop_histogram::key, and utility::keys::SmallKeyMap< K, T >::m_.
|
inline |
Index of a key.
References utility::keys::SmallKeyMap< K, T >::active(), debug_assert, subloop_histogram::key, and utility::keys::SmallKeyMap< K, T >::m_.
|
inline |
Insert elements from iterator range [beg,end)
References utility::keys::SmallKeyMap< K, T >::end(), create_a3b_hbs::i, and utility::keys::SmallKeyMap< K, T >::insert().
|
inline |
Insert an element.
References utility::keys::SmallKeyMap< K, T >::add_key(), utility::keys::SmallKeyMap< K, T >::v_, and value.
Referenced by utility::keys::SmallKeyMap< K, T >::insert().
|
inline |
Max size.
References utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
SmallKeyMap( index )
References create_a3b_hbs::i, and utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
SmallKeyMap( index ) const.
References create_a3b_hbs::i, and utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
SmallKeyMap( key )
References utility::keys::SmallKeyMap< K, T >::add_key(), subloop_histogram::key, and utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Uniform mapped value assignment to current elements.
References test.T009_Exceptions::e, create_a3b_hbs::i, and utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Copy assignment.
References a, utility::keys::SmallKeyMap< K, T >::m_, utility::keys::SmallKeyMap< K, T >::u_, and utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
SmallKeyMap[ index ].
References create_a3b_hbs::i, and utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
SmallKeyMap[ index ] const.
References create_a3b_hbs::i, and utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
|
inline |
|
inline |
Begin reverse iterator.
References utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Begin reverse iterator.
References utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
End reverse iterator.
References utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
End reverse iterator.
References utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Reserve space for a given number of elements.
References utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Shrink the vectors to remove unused capacity.
References utility::keys::SmallKeyMap< K, T >::m_, utility::vectorL< L, T, A >::shrink(), and utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
Size.
References utility::keys::SmallKeyMap< K, T >::v_.
|
inline |
swap( SmallKeyMap )
References a, utility::keys::SmallKeyMap< K, T >::m_, utility::vectorL< L, T, A >::swap(), utility::keys::SmallKeyMap< K, T >::u_, and utility::keys::SmallKeyMap< K, T >::v_.
|
friend |
|
friend |
|
friend |
swap( SmallKeyMap, SmallKeyMap )
|
private |
Index map from keys into v_: Zero => inactive key.
Referenced by utility::keys::SmallKeyMap< K, T >::active(), utility::keys::SmallKeyMap< K, T >::add_key(), utility::keys::SmallKeyMap< K, T >::clear(), utility::keys::SmallKeyMap< K, T >::find(), utility::keys::SmallKeyMap< K, T >::inactive(), utility::keys::SmallKeyMap< K, T >::index(), utility::keys::SmallKeyMap< K, T >::operator=(), utility::keys::SmallKeyMap< K, T >::operator[](), utility::keys::SmallKeyMap< K, T >::shrink(), and utility::keys::SmallKeyMap< K, T >::swap().
|
private |
Upper active index of active keys.
Referenced by utility::keys::SmallKeyMap< K, T >::add_key(), utility::keys::SmallKeyMap< K, T >::clear(), utility::keys::SmallKeyMap< K, T >::operator=(), and utility::keys::SmallKeyMap< K, T >::swap().
|
private |
Vector of values indexed by a subset of the possible keys.
Referenced by utility::keys::SmallKeyMap< K, T >::add_key(), utility::keys::SmallKeyMap< K, T >::assign(), utility::keys::SmallKeyMap< K, T >::begin(), utility::keys::SmallKeyMap< K, T >::capacity(), utility::keys::SmallKeyMap< K, T >::clear(), utility::keys::SmallKeyMap< K, T >::empty(), utility::keys::SmallKeyMap< K, T >::end(), utility::keys::SmallKeyMap< K, T >::find(), utility::keys::SmallKeyMap< K, T >::insert(), utility::keys::SmallKeyMap< K, T >::max_size(), utility::keys::SmallKeyMap< K, T >::operator()(), utility::keys::SmallKeyMap< K, T >::operator=(), utility::keys::SmallKeyMap< K, T >::operator[](), utility::keys::SmallKeyMap< K, T >::rbegin(), utility::keys::SmallKeyMap< K, T >::rend(), utility::keys::SmallKeyMap< K, T >::reserve(), utility::keys::SmallKeyMap< K, T >::shrink(), utility::keys::SmallKeyMap< K, T >::size(), utility::keys::SmallKeyMap< K, T >::SmallKeyMap(), and utility::keys::SmallKeyMap< K, T >::swap().