Summary
Implements a symbol context best suited for relatively small ranges of valid symbols. Supports efficient updates
of individual symbol frequencies. The smallest symbol supported is 0, and the memory usage goes up linearly with
the largest valid symbol.
Constructors
Instance methods
uint | | Returns the frequency of the specified symbol. |
uint | | Returns the sum of the frequencies of all symbols less than symbol. |
uint | | Returns the sum of all symbol frequencies. |
void | |
Updates the frequency of the specified symbol by adding incrementBy to it. |
void | |
Updates the frequency of the specified symbol. To update a large number of frequencies in one go more
efficiently, use ArithmeticSymbolArrayContext.UpdateFrequencies(Action<uint[]>). |
void | |
Updates the frequencies of all symbols. Use this method to update a large number of frequencies. Use ArithmeticSymbolArrayContext.SetSymbolFrequency(int, uint) to update a small number of frequencies more efficiently. |
void | |
Static fields
uint | |
The maximum sum of all symbol frequencies. The encoder/decoder can overflow if the sum of all frequencies
exceeds this value. |