Struct redux::model::Parameters
[−]
[src]
pub struct Parameters { pub symbol_bits: usize, pub symbol_eof: usize, pub symbol_count: usize, pub freq_bits: usize, pub freq_max: u64, pub code_bits: usize, pub code_min: u64, pub code_one_fourth: u64, pub code_half: u64, pub code_three_fourths: u64, pub code_max: u64, }
Model parameters that specifies the common property of the models.
Fields
symbol_bits: usize
Bit width of the symbols being encoded. Usually 8 for byte oriented inputs.
symbol_eof: usize
Code for the EOF symbol. This is the next symbol code after the valid symbols to encode.
symbol_count: usize
Number of possible symbols including the EOF symbol.
freq_bits: usize
Number of bits representing symbol frequencies.
freq_max: u64
Maximum cumulated frequency value for symbols.
code_bits: usize
Number of bits representing the current code ranges.
code_min: u64
Minimum value for code range. This is always zero.
code_one_fourth: u64
Delimiter for the one fourth of the valid code range.
code_half: u64
Delimiter for the half of the valid code range.
code_three_fourths: u64
Delimiter for the three fourths of the valid code range.
code_max: u64
Upper limit of the valid code range.
Methods
impl Parameters
[src]
fn new(symbol: usize, frequency: usize, code: usize) -> Result<Parameters>
Calculates all parameter values based on the symbol
, frequency
and code
width.
Trait Implementations
impl Clone for Parameters
[src]
fn clone(&self) -> Parameters
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more