[][src]Struct arcode::util::range::Range

pub struct Range { /* fields omitted */ }

Methods

impl Range[src]

pub fn new(precision: u64) -> Self[src]

pub fn in_bottom_half(&self) -> bool[src]

pub fn in_upper_half(&self) -> bool[src]

pub fn in_middle_half(&self) -> bool[src]

pub fn in_bottom_quarter(&self) -> bool[src]

pub fn scale_upper_half(&mut self)[src]

scaling the upper half is a left shift, to avoid overflow we minus a 1/2 first

pub fn scale_middle_half(&mut self)[src]

subtract a quarter is the same as shifting out the second most significant bit

pub fn scale_bottom_half(&mut self)[src]

scaling the bottom half in a left shift

pub fn calculate_range(
    &self,
    symbol: u32,
    source_model: &SourceModel
) -> (u64, u64)
[src]

returns (low, high)

pub fn update_range(&mut self, low_high: (u64, u64))[src]

pub fn get_half(&self) -> u64[src]

pub fn get_quarter(&self) -> u64[src]

Auto Trait Implementations

impl Send for Range

impl Sync for Range

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

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> BorrowMut for T where
    T: ?Sized
[src]

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

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

The type returned in the event of a conversion error.