|
| | MultiIndex ()=default |
| | Construct a default MultiIndex with undefined values for each level.
|
| | MultiIndex (const MultiIndex &)=default |
| | Copy constructor.
|
| | MultiIndex (MultiIndex &)=default |
| | Non-const copy constructor.
|
| constexpr | MultiIndex (Value encoded) |
| | Construct a MultiIndex from an already encoded value.
|
| constexpr Value | level (std::size_t lvl) const |
| | Get the value for the index level.
|
| constexpr MultiIndex | makeLastDescendant (std::size_t lvl) const |
| | Create index with every level below the selected level maximized.
|
| constexpr MultiIndex | makeNextSibling (std::size_t lvl) const |
| | Create index with the selected level increased and levels below zeroed.
|
| constexpr std::size_t | maxValue (std::size_t lvl) const |
| | Return the maximum allowed value for a specific index level.
|
| MultiIndex & | operator= (const MultiIndex &)=default |
| | Copy assignment operator.
|
| MultiIndex & | operator= (MultiIndex &&) noexcept=default |
| | Move assignment operator.
|
| constexpr MultiIndex & | operator= (Value encoded) |
| | Allow setting the MultiIndex from an already encoded value.
|
| constexpr MultiIndex & | set (std::size_t lvl, Value val) |
| | Set the value of the index level.
|
| constexpr Value | value () const |
| | Get the encoded value of all index levels.
|
template<typename T, std::size_t... BitsPerLevel>
class Acts::MultiIndex< T, BitsPerLevel >
A set of (hierarchical) 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 hierarchy and can be set and retrieved separately. The encoded MultiIndex can be ordered and compared for equality. The ordering follows the hierarchy, i.e. indices are first ordered by the highest level, then within the highest level by the second level and so on.
template<typename T, std::size_t... BitsPerLevel>
template<typename... Us>
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.
- Parameters
-
| us | Values for each index level to encode |
- Returns
- MultiIndex encoded with the provided level values