Pixie
Loading...
Searching...
No Matches
pixie::experimental::SlotOrder16 Class Reference

Experimental logical ordering of sixteen stable physical slots. More...

#include <slot_order16.h>

Public Member Functions

 SlotOrder16 (std::size_t count=0) noexcept
 Construct empty, or identity order of count slots; count <= 16.
 
std::size_t size () const noexcept
 Number of occupied slots, in [0, 16].
 
unsigned operator[] (std::size_t index) const noexcept
 Physical slot for logical index; requires index < size().
 
std::uint16_t occupied () const noexcept
 Bit s is set exactly when physical slot s is occupied.
 
bool valid () const noexcept
 Check logical mapping uniqueness against physical occupancy.
 
std::size_t rotate_children (std::array< void *, capacity > &, std::size_t left, std::size_t right, std::size_t distance) noexcept
 Rotate logical [left,right) without moving any supplied pointers.
 
void rotate_left (std::size_t left, std::size_t right, std::size_t distance) noexcept
 Rotate logical [left, right) left by distance modulo its length.
 
unsigned insert (std::size_t position) noexcept
 Insert a free slot at logical position and return its physical index.
 
unsigned erase (std::size_t position) noexcept
 Remove a logical entry and return its now-free physical slot.
 

Static Public Attributes

static constexpr std::size_t capacity = 16
 Maximum occupied child count.
 

Detailed Description

Experimental logical ordering of sixteen stable physical slots.

Owns no payload. Four-bit entries map zero-based logical positions to physical slots; a bitmap tracks occupancy independently of order. Callers own the slots and must initialize a newly inserted slot before reading it. All operations are allocation-free. Invalid inputs violate preconditions checked by assertions. This primitive does not maintain subtree lengths.

The tree experiment places this representation above leaves. The separate GroupedSlotOrder256 experiment combines sixteen groups inside one node, with boundary regrouping for arbitrary cross-group orderings.

Member Function Documentation

◆ erase()

unsigned pixie::experimental::SlotOrder16::erase ( std::size_t position)
inlinenoexcept

Remove a logical entry and return its now-free physical slot.

Requires position < size(). Does not destroy the caller's payload.

◆ insert()

unsigned pixie::experimental::SlotOrder16::insert ( std::size_t position)
inlinenoexcept

Insert a free slot at logical position and return its physical index.

Requires position <= size() < 16. Existing slot indices remain stable; the caller initializes the returned physical slot.

◆ rotate_children()

std::size_t pixie::experimental::SlotOrder16::rotate_children ( std::array< void *, capacity > & ,
std::size_t left,
std::size_t right,
std::size_t distance )
inlinenoexcept

Rotate logical [left,right) without moving any supplied pointers.

Preconditions and distance reduction match rotate_left().

Returns
Zero physical pointer writes; only ordering metadata changes.

◆ rotate_left()

void pixie::experimental::SlotOrder16::rotate_left ( std::size_t left,
std::size_t right,
std::size_t distance )
inlinenoexcept

Rotate logical [left, right) left by distance modulo its length.

Empty ranges are unchanged. Requires left <= right <= size().


The documentation for this class was generated from the following file: