Struct redux::model::AdaptiveTreeModel
[−]
[src]
pub struct AdaptiveTreeModel { /* fields omitted */ }
Adaptive model that uses a Binary Indexed Tree for storing cumulative frequencies.
Methods
impl AdaptiveTreeModel
[src]
fn new(p: Parameters) -> Box<Model>
Initializes the model with the given parameters.
Trait Implementations
impl Model for AdaptiveTreeModel
[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.