UIntPermutation
Finite permutation over an unsigned 32-bit-style domain encoded as Int.
Interprets values as UInt and permutes [0, size) using reversible affine steps and XOR-shift mixing within a 2^k block. Cycle walking ensures that all outputs stay inside the unsigned domain.
Parameters
Random generator used to derive per-round keys.
Number of mixing rounds; higher values increase dispersion.
Odd multiplicative constant used in each affine step.
Properties
Functions
Decodes a previously encoded value without range checks.
Encodes a value without range checks.
Returns an iterator over encode(i) for all i in [0, size) for finite domains, or over the full 32-bit space when size == -1.
Returns an iterator over encode(i) for indices in [offset, size).
Returns a view of this permutation that operates on range instead of [0, size). Only valid for finite domains where range.count() == size.
UIntPermutation
decodeUnchecked
Decodes a previously encoded value without range checks.
encodeUnchecked
Encodes a value without range checks.
iterator
Returns an iterator over encode(i) for indices in [offset, size).
For finite domains, offset is an index in 0..size. For full-domain implementations, semantics are defined by the implementation.