QUANTIZER_VALUES Class Reference

Quantizer to apply scale/offset values. More...

#include <mi32/quantizer.h>

Inheritance diagram for QUANTIZER_VALUES:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 QUANTIZER_VALUES (double ScaleQtoD, double OffsetQtoD)
 QUANTIZER_VALUES ()
double CalcDouble (double ValueQ) const
INT16 CalcPrecision () const
double CalcRaw (double ValueD) const
double GetOffset () const
double GetScale () const
void Set (double ScaleQtoD, double OffsetQtoD)
void SetOffset (double OffsetQtoD)
void SetScale (double ScaleQtoD)

Detailed Description

Quantizer to apply scale/offset values.

Retains scales for both directions to avoid floating-point division for maximum efficiency.


Constructor & Destructor Documentation

QUANTIZER_VALUES::QUANTIZER_VALUES (  )  [inline]

Default constructor, uses scale of 1 and offset of 0.

QUANTIZER_VALUES::QUANTIZER_VALUES ( double  ScaleQtoD,
double  OffsetQtoD 
) [inline]

Construct with scale and offset.

Parameters:
ScaleQtoD Scale from "quantized" to "dequantized" must not be 0
OffsetQtoD Offset from "quantized" to "dequantized", applied after scaling

Member Function Documentation

double QUANTIZER_VALUES::CalcDouble ( double  ValueQ  )  const [inline]

Calculate "dequantized" value from quantized value, applying scale and offset.

Parameters:
ValueQ Quantized (integer) value
INT16 QUANTIZER_VALUES::CalcPrecision (  )  const [inline]

Calculate precision (number of decimal places) based on scale.

double QUANTIZER_VALUES::CalcRaw ( double  ValueD  )  const [inline]

Calculate "raw" value with quantization scale/offset removed, with no rounding.

Parameters:
ValueD Dequantized value
double QUANTIZER_VALUES::GetOffset (  )  const [inline]

Get offset from "quantized" to "dequantized", applied after scaling.

double QUANTIZER_VALUES::GetScale (  )  const [inline]

Get scale from "quantized" to "dequantized".

void QUANTIZER_VALUES::Set ( double  ScaleQtoD,
double  OffsetQtoD 
) [inline]

Set scale and offset values.

Parameters:
ScaleQtoD Scale from "quantized" to "dequantized" must not be 0
OffsetQtoD Offset from "quantized" to "dequantized", applied after scaling
void QUANTIZER_VALUES::SetOffset ( double  OffsetQtoD  )  [inline]

Set offset.

Parameters:
OffsetQtoD Offset from "quantized" to "dequantized", applied after scaling
void QUANTIZER_VALUES::SetScale ( double  ScaleQtoD  )  [inline]

Set scale from "quantized" to "dequantized".

Parameters:
ScaleQtoD Scale from "quantized" to "dequantized" must not be 0

The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:33:45 2012 for TNTsdk 2012 by  doxygen 1.6.1