Pf::Kit::Sparse32(T)
Constants
CAPS = StaticArray(UInt8, 33).new(0_u8)
Maps population count (array size) to capacity directly.
GROWTH = StaticArray(UInt8, 33).new(0_u8)
Maps item count to expected capacity. '0' means 'keep' (do not grow).
Constructors
new
SourceInstance methods
Returns the element at index, or nil.
index must be in 0...32, otherwise this method raises IndexError.
bitmap
Returns the bitmap. The bitmap specifies which slots out of the 32 available ones are occupied.
Yields each element from this array followed by its index.
- lo can be used to specify the lower bound (the index where to start; inclusive).
inspect(io)
Sourcereverse_each
Yields each element from this array starting at the rightmost one and moving left.
Returns a copy of this array where el is present at index.
Modifies this array at index by updating or inserting el there.
Returns a copy of this array where the element at index is absent.