Skip to main content

build_prob_table

Function build_prob_table 

Source
pub fn build_prob_table(freqs: &[u32]) -> Vec<ProbTableEntry>
Expand description

Builds a probability lookup table for n_syms symbols.

freqs[i] is the unnormalised frequency of symbol i. Returns a table of n_syms entries indexed by symbol.