pub struct LookupDecoderModel<Symbol, Probability, SymbolTable, LookupTable, const PRECISION: usize>where
    Probability: BitArray,
{ /* private fields */ }
Expand description

A tabularized DecoderModel that is optimized for fast decoding of i.i.d. symbols

You will usually want to use this type through one of the type aliases SmallContiguousLookupDecoderModel or SmallNonContiguousLookupDecoderModel. See these types for extended documentation and examples.

Implementations§

Create a LookupDecoderModel over arbitrary symbols.

TODO: example

Create a LookupDecoderModel over arbitrary symbols.

TODO: example

TODO: test

Create a LookupDecoderModel over a contiguous range of symbols.

TODO: example

Create a LookupDecoderModel over a contiguous range of symbols using fixed point arighmetic.

Example

See SmallContiguousLookupDecoderModel.

Makes a very cheap shallow copy of the model that can be used much like a shared reference.

The returned LookupDecoderModel implements Copy, which is a requirement for some methods, such as Decode::decode_iid_symbols. These methods could also accept a shared reference to a NonContiguousCategoricalDecoderModel (since all references to entropy models are also entropy models, and all shared references implement Copy), but passing a view instead may be slightly more efficient because it avoids one level of dereferencing.

TODO: documentation

TODO: documentation

Makes a very cheap shallow copy of the model that can be used much like a shared reference.

The returned LookupDecoderModel implements Copy, which is a requirement for some methods, such as Decode::decode_iid_symbols. These methods could also accept a shared reference to a NonContiguousCategoricalDecoderModel (since all references to entropy models are also entropy models, and all shared references implement Copy), but passing a view instead may be slightly more efficient because it avoids one level of dereferencing.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Looks up the symbol for a given quantile. Read more
The type of data over which the entropy model is defined. Read more
The type used to represent probabilities, cumulatives, and quantiles. Read more
Converts to this type from the input type.
Converts to this type from the input type.
The type of the iterator returned by symbol_table. Read more
Iterates over all symbols in the unique order that is consistent with the cumulative distribution. Read more
Similar to symbol_table, but yields both cumulatives and probabilities in floating point representation. Read more
Returns the entropy in units of bits (i.e., base 2). Read more
The type of the iterator returned by symbol_table. Read more
Iterates over all symbols in the unique order that is consistent with the cumulative distribution. Read more
Similar to symbol_table, but yields both cumulatives and probabilities in floating point representation. Read more
Returns the entropy in units of bits (i.e., base 2). Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.