[−][src]Struct compress::entropy::ari::table::Model
A simple table of frequencies.
Implementations
impl Model
[src]
pub fn new_custom<F>(num_values: usize, threshold: Border, fn_init: F) -> Model where
F: FnMut(usize) -> Frequency,
[src]
F: FnMut(usize) -> Frequency,
Create a new table with frequencies initialized by a function
pub fn new_flat(num_values: usize, threshold: Border) -> Model
[src]
Create a new tanle with all frequencies being equal
pub fn reset_flat(&mut self)
[src]
Reset the table to the flat state
pub fn update(&mut self, value: usize, add_log: usize, add_const: Border)
[src]
Adapt the table in favor of given 'value' using 'add_log' and 'add_const' to produce the additive factor the higher 'add_log' is, the more concervative is the adaptation
pub fn downscale(&mut self)
[src]
Reduce frequencies by 'cut_iter' bits
pub fn get_frequencies<'a>(&'a self) -> &'a [Frequency]
[src]
Return read-only frequencies slice
Trait Implementations
impl Model<usize> for Model
[src]
fn get_range(&self, value: usize) -> (Border, Border)
[src]
fn find_value(&self, offset: Border) -> (usize, Border, Border)
[src]
fn get_denominator(&self) -> Border
[src]
fn encode(&self, value: V, re: &mut RangeEncoder, out: &mut [Symbol]) -> usize
[src]
fn decode(&self, code: Border, re: &mut RangeEncoder) -> (V, usize)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnwindSafe for Model
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,