ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/master/Core/include/Acts/Utilities/MultiIndex.hpp>
Public Types | |
enum | { NumLevels = sizeof...(BitsPerLevel) } |
using | Value = T |
The type of ther underlying storage value. | |
Public Member Functions | |
constexpr | MultiIndex (Value encoded) |
Construct a MultiIndex from an already encoded value. | |
MultiIndex ()=default | |
Construct a default MultiIndex with undefined values for each level. | |
MultiIndex (const MultiIndex &)=default | |
MultiIndex (MultiIndex &)=default | |
MultiIndex & | operator= (const MultiIndex &)=default |
MultiIndex & | operator= (MultiIndex &&)=default |
constexpr MultiIndex & | operator= (Value encoded) |
Allow setting the MultiIndex from an already encoded value. | |
constexpr Value | value () const |
Get the encoded value of all index levels. | |
constexpr Value | level (std::size_t lvl) const |
Get the value for the index level. | |
constexpr MultiIndex & | set (std::size_t lvl, Value val) |
Set the value of the index level. | |
constexpr MultiIndex | makeNextSibling (std::size_t lvl) const |
Create index with the selected level increased and levels below zeroed. | |
constexpr MultiIndex | makeLastDescendant (std::size_t lvl) const |
Create index with every level below the selected level maximized. | |
Static Public Member Functions | |
static constexpr MultiIndex | Zeros () |
Construct a MultiIndex with all levels set to zero. | |
template<typename... Us> | |
static constexpr MultiIndex | Encode (Us &&...us) |
Static Private Member Functions | |
static constexpr std::size_t | shift (std::size_t lvl) |
static constexpr Value | mask (std::size_t lvl) |
Private Attributes | |
Value | m_value |
Static Private Attributes | |
static constexpr std::array < std::size_t, NumLevels > | s_bits {BitsPerLevel...} |
Friends | |
constexpr bool | operator< (MultiIndex lhs, MultiIndex rhs) |
constexpr bool | operator== (MultiIndex lhs, MultiIndex rhs) |
std::ostream & | operator<< (std::ostream &os, MultiIndex idx) |
A set of (hierachical) indices bitpacked into a single value.
The underlying value is split into blocks of bits with variable size. Each block is a level within the index hierachy and can be set and retrieved separately. The encoded MultiIndex can be ordered and compared for equality. The ordering follows the hiearchy, i.e. indices are first ordered by the highest level, then within the highest level by the second level and so on.
Definition at line 29 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 29 of file MultiIndex.hpp
using Acts::MultiIndex< T, BitsPerLevel >::Value = T |
The type of ther underlying storage value.
Definition at line 39 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 39 of file MultiIndex.hpp
anonymous enum |
Definition at line 40 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 40 of file MultiIndex.hpp
|
inline |
Construct a MultiIndex from an already encoded value.
Definition at line 67 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 67 of file MultiIndex.hpp
|
default |
Construct a default MultiIndex with undefined values for each level.
Referenced by Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::Zeros().
|
default |
|
default |
|
inlinestatic |
Construct a MultiIndex from values for multiple level.
This functionality must be implemented as a static, named constructor to avoid confusion with other constructors. If it would be implemented as a regular constructor, constructing a MultiIndex from a single encoded value and encoding only the first level would have the same signature and could not be distinguished.
Definition at line 54 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 54 of file MultiIndex.hpp
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Get the value for the index level.
Definition at line 83 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 83 of file MultiIndex.hpp
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Create index with every level below the selected level maximized.
Definition at line 108 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 108 of file MultiIndex.hpp
|
inline |
Create index with the selected level increased and levels below zeroed.
Definition at line 100 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 100 of file MultiIndex.hpp
|
inlinestaticprivate |
Definition at line 127 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 127 of file MultiIndex.hpp
Referenced by Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::level(), and Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::set().
|
default |
|
default |
|
inline |
Allow setting the MultiIndex from an already encoded value.
Definition at line 75 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 75 of file MultiIndex.hpp
|
inline |
Set the value of the index level.
Definition at line 88 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 88 of file MultiIndex.hpp
Referenced by BOOST_AUTO_TEST_CASE(), and Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::Encode().
|
inlinestaticprivate |
Definition at line 119 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 119 of file MultiIndex.hpp
Referenced by Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::level(), Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::makeLastDescendant(), Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::makeNextSibling(), and Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::set().
|
inline |
Get the encoded value of all index levels.
Definition at line 81 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 81 of file MultiIndex.hpp
Referenced by BOOST_AUTO_TEST_CASE().
|
inlinestatic |
Construct a MultiIndex with all levels set to zero.
Definition at line 45 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 45 of file MultiIndex.hpp
Referenced by BOOST_AUTO_TEST_CASE().
|
friend |
Definition at line 133 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 133 of file MultiIndex.hpp
|
friend |
Definition at line 139 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 139 of file MultiIndex.hpp
|
friend |
Definition at line 136 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 136 of file MultiIndex.hpp
|
private |
Definition at line 131 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 131 of file MultiIndex.hpp
Referenced by Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::level(), Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::makeLastDescendant(), Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::makeNextSibling(), Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::operator=(), Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::set(), and Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::value().
|
staticprivate |
Definition at line 118 of file MultiIndex.hpp.
View newest version in sPHENIX GitHub at line 118 of file MultiIndex.hpp
Referenced by Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::mask(), and Acts::MultiIndex< uint64_t, 12, 12, 16, 8, 16 >::shift().