[][src]Struct compress::entropy::ari::table::Model

pub struct Model { /* fields omitted */ }

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]

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]