Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::UniformQuantizer Class Reference

#include <Quantizer.h>

Inheritance diagram for prapi::UniformQuantizer:

prapi::Quantizer List of all members.

Detailed Description

UniformQuantizer implements an uniform quantization scheme.

It divides the feature space into equally spaced bins.


Public Methods

 UniformQuantizer (int lev, double origMax, double origMin=0.0)
 Create a new UniformQuantizer instance.

void setMin (double min)
void setMax (double max)
double getMin (void) const
double getMax (void) const
int getBinIndex (double value) throw (QuantizationException&)
 Get the bin index for the given value, i.e.


Constructor & Destructor Documentation

prapi::UniformQuantizer::UniformQuantizer int    lev,
double    origMax,
double    origMin = 0.0
[inline]
 

Create a new UniformQuantizer instance.

Example:

 UniformQuantizer q(64,256); //drop two lsb's of 8-bit feature values
 
Parameters:
lev  the number of quantization levels
origMax  the original maximum value of the data. Add a small value (one quantization step in the original feature space) to this to prevent the quantizer from producing bin index lev. Typically, one is added when quantizing integer spaces.
origMin  the original minimum value. Use the exact value.


Member Function Documentation

int prapi::UniformQuantizer::getBinIndex double    value throw (QuantizationException&) [inline, virtual]
 

Get the bin index for the given value, i.e.

quantize the value.

Returns:
the quantized value

Implements prapi::Quantizer.


The documentation for this class was generated from the following file:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.