pub struct Arena<'a, E: FloatElement, const N: usize, K: SymbolCode = u16> { /* private fields */ }Expand description
A codebook of one artifact’s distinct bit patterns.
Mechanically the arena is a one-element block grid, and its decode is the
same table read. What makes it a tier rather than a Grid is the
construction discipline the token carries into the kappa manifest: the
table is the source stream’s distinct symbols in canonical order, built by
canonicalize, so two artifacts holding the same values share a
codebook — and an address — whatever order their streams stored them
in (§6.4, CK-10).
The element type is a float: the symbols are bit patterns, and the bound is
Whole because membership is discharged by the table’s construction and
no magnitude question applies to a float (§5.2b).
The code width is a parameter, u16 by default and u8 where the
artifact’s distinct patterns fit a byte (CK-14): one type at two
residencies, not two tiers. At a power-of-two code space the stored code
masked is the index at either width, so both spellings answer their own
stream to the tabulated gather — IndexStream::U16 and
IndexStream::U8 — and the traversal builds nothing.
Implementations§
Source§impl<'a, E: FloatElement, const N: usize, K: SymbolCode> Arena<'a, E, N, K>
impl<'a, E: FloatElement, const N: usize, K: SymbolCode> Arena<'a, E, N, K>
Trait Implementations§
Source§impl<'a, E: Clone + FloatElement, const N: usize, K: Clone + SymbolCode> Clone for Arena<'a, E, N, K>
impl<'a, E: Clone + FloatElement, const N: usize, K: Clone + SymbolCode> Clone for Arena<'a, E, N, K>
Source§impl<E: FloatElement, const N: usize, K: SymbolCode> Codec<E, Whole<E>> for Arena<'_, E, N, K>
impl<E: FloatElement, const N: usize, K: SymbolCode> Codec<E, Whole<E>> for Arena<'_, E, N, K>
Source§const TIER: TierId = TierId::Arena
const TIER: TierId = TierId::Arena
Source§const IS_FIXED_WIDTH: bool = true
const IS_FIXED_WIDTH: bool = true
Source§fn decode_len(&self, _code: Self::Code) -> usize
fn decode_len(&self, _code: Self::Code) -> usize
code actually produces. Read moreimpl<'a, E: Copy + FloatElement, const N: usize, K: Copy + SymbolCode> Copy for Arena<'a, E, N, K>
Source§impl<'a, E: Debug + FloatElement, const N: usize, K: Debug + SymbolCode> Debug for Arena<'a, E, N, K>
impl<'a, E: Debug + FloatElement, const N: usize, K: Debug + SymbolCode> Debug for Arena<'a, E, N, K>
Source§impl<E: FloatElement, const N: usize, K: SymbolCode> Enumerable<E, Whole<E>> for Arena<'_, E, N, K>
impl<E: FloatElement, const N: usize, K: SymbolCode> Enumerable<E, Whole<E>> for Arena<'_, E, N, K>
Source§const CODE_SPACE: usize
const CODE_SPACE: usize
Source§fn as_index_stream(codes: &[K]) -> Option<IndexStream<'_>>
fn as_index_stream(codes: &[K]) -> Option<IndexStream<'_>>
Source§const SIGN_BIT_BOOK: bool = false
const SIGN_BIT_BOOK: bool = false
CODE_SPACE is a power of two and book[c][t] == 2 * bit(c, t) - 1
for every code c and every t below its log. Read more