[][src]Struct range_encoding::CumulativeDistributionFrequency

pub struct CumulativeDistributionFrequency { /* fields omitted */ }

Methods

impl CumulativeDistributionFrequency
[src]

pub fn new(probabilities: Vec<u32>) -> Self
[src]

pub fn width(&self) -> u32
[src]

Return the total frequency of symbols in this distribution.

pub fn widths<'a>(
    &'a self
) -> impl Iterator<Item = u32> + 'a
[src]

Iterate through the widths of the symbols.

pub fn find(&self, probability: u32) -> Option<IndexedSegment>
[src]

Find a value from its frequency.

pub fn at_index<'a>(&'a mut self, index: usize) -> Option<&'a mut Segment>
[src]

Find a value from its index

pub fn requirements_for_index(
    &self,
    index: usize
) -> Option<DefinitionRequirement>
[src]

pub fn len(&self) -> usize
[src]

Return the number of values in this CDF

Auto Trait Implementations

Blanket Implementations

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

impl<T> From for T
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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