ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/master/thirdparty/dfelibs/dfe/dfe_flat.hpp>
Public Types | |
using | value_type = T |
using | size_type = typename Container::size_type |
using | const_iterator = typename Container::const_iterator |
Public Member Functions | |
template<typename U > | |
const value_type & | at (U &&u) const |
Access the equivalent element or throw if it does not exists. | |
const_iterator | begin () const |
const_iterator | end () const |
bool | empty () const |
Return true if there are no elements in the set. | |
size_type | size () const |
Return the number of elements in the set. | |
void | clear () |
Remove all elements from the container. | |
void | insert_or_assign (const T &t) |
template<typename U > | |
const_iterator | find (U &&u) const |
Return an interator to the equivalent element or .end() if not found. | |
template<typename U > | |
bool | contains (U &&u) const |
Return true if the equivalent element is in the set. | |
Private Attributes | |
Container | m_items |
An container adaptor to store a set of elements in a sequential container.
T | Stored element type |
Compare | Function satisfying the Compare named requirement |
Container | Sequential container |
Supports access by equivalence, iteration over all elements, removing all elements, adding elements while maintaining uniqueness, and membership checks. By using a sequential container, memory allocation is greatly simplified and lookups benefit from higher memory locality at the expense of slower insertion of elements. Should work best for smaller sets with frequent lookups.
The set elements can not be modified on purpose. With a non-standard Compare
function modifying a contained object might change its identity and thus its position in the set. This would break the internal sorting.
Definition at line 55 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 55 of file dfe_flat.hpp
using dfe::FlatSet< T, Compare, Container >::const_iterator = typename Container::const_iterator |
Definition at line 59 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 59 of file dfe_flat.hpp
using dfe::FlatSet< T, Compare, Container >::size_type = typename Container::size_type |
Definition at line 58 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 58 of file dfe_flat.hpp
using dfe::FlatSet< T, Compare, Container >::value_type = T |
Definition at line 57 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 57 of file dfe_flat.hpp
|
inline |
Access the equivalent element or throw if it does not exists.
Definition at line 161 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 161 of file dfe_flat.hpp
References pos(), and Acts::UnitConstants::u.
Referenced by dfe::FlatMap< Key, T, Compare >::at().
|
inline |
Definition at line 65 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 65 of file dfe_flat.hpp
|
inline |
Remove all elements from the container.
Definition at line 74 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 74 of file dfe_flat.hpp
Referenced by dfe::FlatMap< Key, T, Compare >::clear().
|
inline |
Return true if the equivalent element is in the set.
Definition at line 193 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 193 of file dfe_flat.hpp
References Acts::UnitConstants::u.
Referenced by dfe::FlatMap< Key, T, Compare >::contains().
|
inline |
Return true if there are no elements in the set.
Definition at line 69 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 69 of file dfe_flat.hpp
Referenced by dfe::FlatMap< Key, T, Compare >::empty().
|
inline |
Definition at line 66 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 66 of file dfe_flat.hpp
|
inline |
Return an interator to the equivalent element or .end()
if not found.
Definition at line 183 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 183 of file dfe_flat.hpp
References pos(), and Acts::UnitConstants::u.
|
inline |
Add the element to the set or replace the existing equivalent element.
Depending on the Compare
function we might have elements with different values but the same identity with respect to the chosen Compare
function. Only one can be kept and this function replaces the existing element with the new one in such a case.
Definition at line 171 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 171 of file dfe_flat.hpp
|
inline |
Return the number of elements in the set.
Definition at line 71 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 71 of file dfe_flat.hpp
Referenced by dfe::FlatMap< Key, T, Compare >::size().
|
private |
Definition at line 91 of file dfe_flat.hpp.
View newest version in sPHENIX GitHub at line 91 of file dfe_flat.hpp
Referenced by dfe::FlatSet< KeyIndex, KeyCompare >::begin(), dfe::FlatSet< KeyIndex, KeyCompare >::clear(), dfe::FlatSet< KeyIndex, KeyCompare >::empty(), dfe::FlatSet< KeyIndex, KeyCompare >::end(), and dfe::FlatSet< KeyIndex, KeyCompare >::size().