Module mayda::utility
[−]
[src]
Contains constants, enums, traits and functions used by all of the encoding
types provided by the mayda
crate.
Traits
Access |
A trait for indexing an encoded vector. Similar to but less convenient than
|
AccessInto |
A trait for indexing a range of an encoded vector. Writes the result into
the slice provided. Similar to but less convenient than |
Bits |
Indicates that the bitwise representation of the type is known to |
Encode |
Indicates that the type can be encoded and decoded by |
Functions
select_m |
A modified version of the Floyd-Rivest algorithm with fewer comparisions and fewer swaps, specialized for the case of slices with length < 500. The modifications may not be known in the literature. Intended to be used to find the median of a block. |
words_for_bits |
Returns number of words required to store the given number of bits. A word is 32 bits long. |