Type:
StandardSQ is a Lloyd-Max scalar quantiser. The number of reconstruction levels is specified on construction, and LloydAlgorithm allows the quantiser to be trained for efficient quatisation of a distribution represented by a training set. The save and load members allow a trained quantiser to be saved to disk for subsequent re-use. |
StandardSQ | (const QLevels& ql) ; |
~StandardSQ | () ; |
int Index | (float x) const ; |
float Reconstruction | (unsigned int idx) const ; |
float LloydAlgorithm | (unsigned int tsize, float *training, float theshold, unsigned int iteration_limit =0) ; |
Use Lloyd Algorithm to generate a codebook from the training data |
void initialise_codebook | (unsigned int tsize, float *training) ; |
float LloydIteration | (unsigned int tsize, float *training) ; |
Single iteration of the Lloyd Algorithm |
bool save | (char *filename) const ; |
bool save | (ofstream& ofs) const ; |
bool load | (char *filename) ; |
bool load | (ifstream& ifs) ; |