WavPCMSampleValue Class Reference

`#include <WavPCMSampleValue.h>`

Inheritance diagram for WavPCMSampleValue:

## Public Member Functions

| WavPCMSampleValue (int v)
SampleValue * | getNearestTargetSampleValue (EmbValue t) const
UWORD32 | calcDistance (const SampleValue *s) const
std::string | getName (void) const
int | getValue (void) const
Public Member Functions inherited from SampleValue
| SampleValue (void)
virtual | ~SampleValue (void)
virtual bool | isNeighbour (const SampleValue *s) const
EmbValue | getEmbeddedValue (void) const
UWORD32 | getKey (void) const
bool | operator== (const SampleValue &sv) const
bool | operator!= (const SampleValue &sv) const
bool | operator< (const SampleValue &sv) const
UWORD32 | getNumEdges (EmbValue t) const
void | setNumEdges (EmbValue t, UWORD32 ne)
void | incNumEdges (EmbValue t)
void | decNumEdges (EmbValue t)
void | setLabel (unsigned long l)
unsigned long | getLabel (void) const
void | print (unsigned short spc=0) const

## Private Member Functions

EmbValue | calcEValue (int v) const

## Private Attributes

int | Value
int | MaxValue
int | MinValue

## Additional Inherited Members

Protected Attributes inherited from SampleValue
EmbValue | EValue
| the bit that is embedded in this sample value - must be set in constructor of derived class
UWORD32 | Key
| the key of this sample value - must be different for two different sample values - must be set in constructor of derived class

## Constructor & Destructor Documentation

## WavPCMSampleValue()

WavPCMSampleValue::WavPCMSampleValue | ( | int | v | ) |

## Member Function Documentation

## calcDistance()

UWORD32 WavPCMSampleValue::calcDistance | ( | const SampleValue * | s | ) | const

virtual

calculate the distance between the sample value s and this sample value

Parameters

  s | a sample value of the same type as this

Returns
  the distance

Implements SampleValue.

## calcEValue()

EmbValue WavPCMSampleValue::calcEValue | ( | int | v | ) | const

inline private

## getName()

std::string WavPCMSampleValue::getName | ( | void |  | ) | const

virtual

return a short name uniquely identifying this sample value

Implements SampleValue.

## getNearestTargetSampleValue()

SampleValue * WavPCMSampleValue::getNearestTargetSampleValue | ( | EmbValue | t | ) | const

virtual

get the nearest (with the least distance to this sample value) sample value whose embedded value equals the specified target

Parameters

  t | the target embedded value

If two or more target sample values have equal distance each of them should be returned with equal probability.

The returned SampleValue object should be deleted by the callser.

Implements SampleValue.

## getValue()

int WavPCMSampleValue::getValue | ( | void |  | ) | const

inline

## Member Data Documentation

## MaxValue

int WavPCMSampleValue::MaxValue

private

## MinValue

int WavPCMSampleValue::MinValue

private

## Value

int WavPCMSampleValue::Value

private

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

- WavPCMSampleValue.h
- WavPCMSampleValue.cc