|
|
| index_table () noexcept |
| | Construct an empty table of rank zero.
|
| | index_table (std::size_t rank) |
| | Construct an empty table of a given rank.
|
|
| index_table (const index_table &other) |
|
| index_table (index_table &&other) noexcept |
|
index_table & | operator= (const index_table &other) |
|
index_table & | operator= (index_table &&other) noexcept |
| void | add (span< const std::size_t > index) |
| | Append one index.
|
|
void | clear () noexcept |
| | Drop the indices held, keeping the rank and the capacity.
|
| void | reserve (std::size_t count) |
| | Make room for a number of indices without allocating later.
|
| std::size_t | get_rank () const noexcept |
| | Get the number of coordinates each index carries.
|
| std::size_t | get_index_count () const noexcept |
| | Get how many indices are held.
|
| span< const std::size_t > | get (std::size_t position) const noexcept |
| | Get one index.
|
A sequence of indices of one and the same rank.
Each index is a tuple of one coordinate per axis. The indices are held in one flat vector of get_index_count by get_rank values rather than one vector each, so a table of any length costs a bounded number of allocations, and clear keeps the capacity: a table refilled after clearing allocates nothing until it outgrows what it held before.
The rank is stated when a table is constructed and never changes, so every index it holds carries it. A table of rank zero holds indices of no coordinates, each addressing the single position a space of rank zero has.