|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Forward declaration of FlatMapView. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/core/FlatMapView.hpp>

Classes | |
| class | IteratorImpl |
Public Types | |
| using | key_type = KeyType |
| using | mapped_type = ValueType |
| using | size_type = IndexType |
| using | value_type = KeyValuePair |
| using | iterator = IteratorImpl |
| using | const_iterator = IteratorImpl |
| using | FlatMapType = std::conditional_t< IsConst, const FlatMap< KeyType, ValueType, Hash >, FlatMap< KeyType, ValueType, Hash > > |
Public Member Functions | |
| FlatMapView ()=default | |
| FlatMapView (FlatMapType &other) | |
| bool | empty () const |
| Returns true if there are no entries in the FlatMap, false otherwise. More... | |
| IndexType | size () const |
| Returns the number of entries stored in the FlatMap. More... | |
| IndexType | count (const KeyType &key) const |
| Return the number of entries matching a given key. More... | |
| bool | contains (const KeyType &key) const |
| Return true if the FlatMap contains a key, false otherwise. More... | |
| AXOM_HOST_DEVICE IndexType | bucket_count () const |
| Returns the number of buckets allocated in the FlatMap. More... | |
| AXOM_HOST_DEVICE const_iterator | begin () const |
| Returns an iterator to the first valid object in the bucket array. More... | |
| AXOM_HOST_DEVICE const_iterator | cbegin () const |
| AXOM_HOST_DEVICE const_iterator | end () const |
| Returns an iterator to "one past" the last valid object in the bucket array. More... | |
| AXOM_HOST_DEVICE const_iterator | cend () const |
| AXOM_HOST_DEVICE const_iterator | find (const KeyType &key) const |
| Try to find an entry with a given key. More... | |
| AXOM_HOST_DEVICE const ValueType & | operator[] (const KeyType &key) const |
| Find an entry with a given key. More... | |
Friends | |
| class | IteratorImpl |
Forward declaration of FlatMapView.
Provides a read-only view of a key-value container.
| using axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::key_type = KeyType |
| using axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::mapped_type = ValueType |
| using axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::size_type = IndexType |
| using axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::value_type = KeyValuePair |
| using axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::iterator = IteratorImpl |
| using axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::const_iterator = IteratorImpl |
| using axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::FlatMapType = std::conditional_t<IsConst, const FlatMap<KeyType, ValueType, Hash>, FlatMap<KeyType, ValueType, Hash> > |
|
default |
|
inline |
|
inline |
Returns an iterator to the first valid object in the bucket array.
|
inline |
|
inline |
Returns an iterator to "one past" the last valid object in the bucket array.
References axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::bucket_count().
|
inline |
| AXOM_HOST_DEVICE auto axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::find | ( | const KeyType & | key | ) | const |
Try to find an entry with a given key.
| [in] | key | the key to search for |
References axom::utilities::annotations::end().
|
inline |
Find an entry with a given key.
If a corresponding value does not exist, a default value for the value type will be returned (but not inserted into the map).
| [in] | key | the key to search for |
References axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::end(), and axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::find().
|
inline |
Returns true if there are no entries in the FlatMap, false otherwise.
|
inline |
Returns the number of entries stored in the FlatMap.
|
inline |
Return the number of entries matching a given key.
This method will always return 0 or 1.
| [in] | key | the key to search for |
References axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::contains().
|
inline |
Return true if the FlatMap contains a key, false otherwise.
| [in] | key | the key to search for |
References axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::end(), and axom::FlatMapView< KeyType, ValueType, IsConst, Hash >::find().
|
inline |
Returns the number of buckets allocated in the FlatMap.
The maximum number of elements that can be stored in the FlatMap without resizing and rehashing is bucket_count() * max_load_factor().
References axom::ArrayView< T, DIM, SPACE >::size().
|
friend |