Struct redux::model::AdaptiveLinearModel
[−]
[src]
pub struct AdaptiveLinearModel { /* fields omitted */ }
Adaptive model that uses a simple array for cumulative freq and simple, but slow linear algorithms for operations.
Methods
impl AdaptiveLinearModel
[src]
fn new(p: Parameters) -> Box<Model>
Initializes the model with the given parameters.
Trait Implementations
impl Model for AdaptiveLinearModel
[src]
fn parameters<'a>(&'a self) -> &'a Parameters
Returns the arithmetic compression parameters.
fn total_frequency(&self) -> u64
Returns the maximum cumulative frequency.
fn get_frequency(&mut self, symbol: usize) -> Result<(u64, u64)>
Returns the cumulative frequency range for the given input symbol.
fn get_symbol(&mut self, value: u64) -> Result<(usize, u64, u64)>
Returns the symbol that corresponds to the given cumulative frequency.
fn get_freq_table(&self) -> Vec<(u64, u64)>
Returns the cumulative frequency table for debugging purposes.