pub struct BitTreeEncoder { /* private fields */ }Expand description
A tree of binary probability models, addressed by the bits of a symbol.
Implementations§
Source§impl BitTreeEncoder
impl BitTreeEncoder
Sourcepub fn num_bit_levels(&self) -> u32
pub fn num_bit_levels(&self) -> u32
The number of levels of the tree.
Sourcepub fn encode(&mut self, range_encoder: &mut Encoder, symbol: u32)
pub fn encode(&mut self, range_encoder: &mut Encoder, symbol: u32)
Encodes a symbol, most significant bit first.
Sourcepub fn reverse_encode(&mut self, range_encoder: &mut Encoder, symbol: u32)
pub fn reverse_encode(&mut self, range_encoder: &mut Encoder, symbol: u32)
Encodes a symbol, least significant bit first.
Sourcepub fn get_price(&self, symbol: u32) -> u32
pub fn get_price(&self, symbol: u32) -> u32
The price of encoding a symbol, most significant bit first.
Sourcepub fn reverse_get_price(&self, symbol: u32) -> u32
pub fn reverse_get_price(&self, symbol: u32) -> u32
The price of encoding a symbol, least significant bit first.
Sourcepub fn reverse_get_price_at(
models: &[BitEncoder],
start_index: u32,
num_bit_levels: i32,
symbol: u32,
) -> u32
pub fn reverse_get_price_at( models: &[BitEncoder], start_index: u32, num_bit_levels: i32, symbol: u32, ) -> u32
The price of encoding a symbol with an external tree, least significant bit first.
Sourcepub fn reverse_encode_at(
models: &mut [BitEncoder],
start_index: u32,
range_encoder: &mut Encoder,
num_bit_levels: i32,
symbol: u32,
)
pub fn reverse_encode_at( models: &mut [BitEncoder], start_index: u32, range_encoder: &mut Encoder, num_bit_levels: i32, symbol: u32, )
Encodes a symbol with an external tree, least significant bit first.
Trait Implementations§
Source§impl Clone for BitTreeEncoder
impl Clone for BitTreeEncoder
Source§impl Debug for BitTreeEncoder
impl Debug for BitTreeEncoder
impl Eq for BitTreeEncoder
Source§impl PartialEq for BitTreeEncoder
impl PartialEq for BitTreeEncoder
impl StructuralPartialEq for BitTreeEncoder
Auto Trait Implementations§
impl Freeze for BitTreeEncoder
impl RefUnwindSafe for BitTreeEncoder
impl Send for BitTreeEncoder
impl Sync for BitTreeEncoder
impl Unpin for BitTreeEncoder
impl UnsafeUnpin for BitTreeEncoder
impl UnwindSafe for BitTreeEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.