[][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 self, index: usize) -> Option<&'a Segment>[src]

Find a value from its index

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

Return the number of values in this CDF

Auto Trait Implementations

impl RefUnwindSafe for CumulativeDistributionFrequency

impl Send for CumulativeDistributionFrequency

impl Sync for CumulativeDistributionFrequency

impl Unpin for CumulativeDistributionFrequency

impl UnwindSafe for CumulativeDistributionFrequency

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.