[−][src]Struct arcode::util::range::Range
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]
&self,
symbol: u32,
source_model: &SourceModel
) -> (u64, u64)
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
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,