Skip to main content

compute_lloyd_max_codebook

Function compute_lloyd_max_codebook 

Source
pub fn compute_lloyd_max_codebook(num_levels: usize) -> Vec<f64>
Expand description

Compute Lloyd-Max codebook for N(0,1) with the given number of levels.

Returns the sorted centroid array. This is used in tests to validate the hardcoded codebooks.