[−][src]Struct range_encoding::CumulativeDistributionFrequency
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]
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>,