![]() |
Pixie
|
Experimental 32/64-slot order with separate low nibbles and high bits. More...
#include <slot_order.h>
Public Member Functions | |
| SplitSlotOrder (std::size_t count=0) noexcept | |
| Identity order for physical [0,count); requires count <= N. | |
| std::size_t | size () const noexcept |
| Occupied count, in [0,N]. | |
| unsigned | operator[] (std::size_t i) const noexcept |
| Physical slot for a logical index strictly below size(). | |
| bool | occupied (std::size_t i) const noexcept |
| Whether physical slot i is occupied; requires i < N. | |
| bool | valid () const noexcept |
| Check mapping uniqueness and occupancy. | |
| void | rotate_left (std::size_t left, std::size_t right, std::size_t distance) noexcept |
| Rotate [left,right) by distance modulo its length; empty is a no-op. | |
| std::size_t | rotate_children (std::array< void *, N > &, std::size_t left, std::size_t right, std::size_t distance) noexcept |
| Apply rotate_left's contract without touching caller-owned pointers. | |
Experimental 32/64-slot order with separate low nibbles and high bits.
Owns only ordering metadata. Physical slots [0,count) stay occupied; rotations never move payload. No holes are introduced. Invalid indices or ranges violate assertion-checked preconditions. Every operation is noexcept and allocation-free. This initial split-bit implementation is scalar.
| N | Capacity, either 32 (5 bits/slot) or 64 (6 bits/slot). |
|
inlinenoexcept |
Apply rotate_left's contract without touching caller-owned pointers.
|
inlinenoexcept |
Rotate [left,right) by distance modulo its length; empty is a no-op.