EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/sPHENIX/thirdparty/dfelibs/dfe/dfe_flat.hpp>
Classes | |
struct | KeyCompare |
struct | KeyIndex |
Public Types | |
using | key_type = Key |
using | value_type = T |
using | size_type = std::size_t |
Public Member Functions | |
value_type & | at (const Key &key) |
Writable access to an element or throw if it does not exists. | |
const value_type & | at (const Key &key) const |
Read-only access to an element or throw if it does not exists. | |
bool | empty () const |
Return true if there are no elements in the map. | |
size_type | size () const |
Return the number of elements in the container. | |
void | clear () |
Remove all elements from the container. | |
template<typename... Params> | |
void | emplace (const Key &key, Params &&...params) |
bool | contains (const Key &key) const |
Return true if an element exists for the given key. | |
Private Attributes | |
FlatSet< KeyIndex, KeyCompare > | m_keys |
std::vector< T > | m_items |
A key-value map that stores keys and values in sequential containers.
Key | Stored element key type |
T | Stored element value type |
Compare | Function satisfying the Compare name requirements for keys |
Supports access by key, clearing all elements, adding or replacing the stored value for a given key, and membership checks. Keys and values are stored in separate sequential containers to simplify allocation and benefit from greater memory locality.
Definition at line 105 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 105 of file dfe_flat.hpp
using dfe::FlatMap< Key, T, Compare >::key_type = Key |
Definition at line 107 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 107 of file dfe_flat.hpp
using dfe::FlatMap< Key, T, Compare >::size_type = std::size_t |
Definition at line 109 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 109 of file dfe_flat.hpp
using dfe::FlatMap< Key, T, Compare >::value_type = T |
Definition at line 108 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 108 of file dfe_flat.hpp
|
inline |
Writable access to an element or throw if it does not exists.
Definition at line 112 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 112 of file dfe_flat.hpp
References dfe::FlatSet< T, Compare, Container >::at(), dfe::FlatMap< Key, T, Compare >::m_items, and dfe::FlatMap< Key, T, Compare >::m_keys.
|
inline |
Read-only access to an element or throw if it does not exists.
Definition at line 114 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 114 of file dfe_flat.hpp
References dfe::FlatSet< T, Compare, Container >::at(), dfe::FlatMap< Key, T, Compare >::m_items, and dfe::FlatMap< Key, T, Compare >::m_keys.
|
inline |
Remove all elements from the container.
Definition at line 124 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 124 of file dfe_flat.hpp
References dfe::FlatSet< T, Compare, Container >::clear(), dfe::FlatMap< Key, T, Compare >::m_items, and dfe::FlatMap< Key, T, Compare >::m_keys.
|
inline |
Return true if an element exists for the given key.
Definition at line 133 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 133 of file dfe_flat.hpp
References dfe::FlatSet< T, Compare, Container >::contains(), and dfe::FlatMap< Key, T, Compare >::m_keys.
|
inline |
Add the element under the given key or replace an existing element.
New elements are constructed or assigned in-place with the parameters forwarded to a T(...)
constructor call.
Definition at line 203 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 203 of file dfe_flat.hpp
References T.
|
inline |
Return true if there are no elements in the map.
Definition at line 119 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 119 of file dfe_flat.hpp
References dfe::FlatSet< T, Compare, Container >::empty(), and dfe::FlatMap< Key, T, Compare >::m_keys.
|
inline |
Return the number of elements in the container.
Definition at line 121 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 121 of file dfe_flat.hpp
References dfe::FlatMap< Key, T, Compare >::m_keys, and dfe::FlatSet< T, Compare, Container >::size().
|
private |
Definition at line 153 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 153 of file dfe_flat.hpp
Referenced by dfe::FlatMap< Key, T, Compare >::at(), and dfe::FlatMap< Key, T, Compare >::clear().
|
private |
Definition at line 152 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 152 of file dfe_flat.hpp
Referenced by dfe::FlatMap< Key, T, Compare >::at(), dfe::FlatMap< Key, T, Compare >::clear(), dfe::FlatMap< Key, T, Compare >::contains(), dfe::FlatMap< Key, T, Compare >::empty(), and dfe::FlatMap< Key, T, Compare >::size().