frog
Interface Quantizer

All Superinterfaces:
Serializable
All Known Implementing Classes:
Kmeans

public interface Quantizer
extends Serializable

Quantizer is an interface for classes that serve as data quantizers. That is, they serve to reduce the effective amount of information in a data set by algorithmically determining a small set of appropriate representatives to which the data items can be translated to. In particular, Quantizer deals with 3D acceleration data. A quantizer should be constructed with a data set with which to develop its "codebook."

Author:
Team Better Recognize

Field Summary
static int KMEANS
          This is the Quantizer type index for Kmeans quantizers.
static int NUM_TYPES_SUPPORTED
          This is the number of Quantizer implementations currently supported by Quantizer
 
Method Summary
 Vector<Accel3D> getDataSet()
          Accessor for the data set utilized by this Quantizer.
 int getType()
          Accessor for the Quantizer type index.
 void setDataSet(Vector<Accel3D> data)
          Sets the data set to use in this Quantizer.
 int size()
          Returns the size of the Quantizer, which corresponds to the size of the image of the quantization mapping.
 int translate(Accel3D acc)
          Translates a 3D acceleration into its appropriate representative.
 

Field Detail

KMEANS

static final int KMEANS
This is the Quantizer type index for Kmeans quantizers.

See Also:
Constant Field Values

NUM_TYPES_SUPPORTED

static final int NUM_TYPES_SUPPORTED
This is the number of Quantizer implementations currently supported by Quantizer

See Also:
Constant Field Values
Method Detail

getDataSet

Vector<Accel3D> getDataSet()
Accessor for the data set utilized by this Quantizer.

Returns:
the data set for the Quantizer

getType

int getType()
Accessor for the Quantizer type index. Should return the value as specified in the Quantizer interface.

Returns:
the Quantizer type index.

setDataSet

void setDataSet(Vector<Accel3D> data)
Sets the data set to use in this Quantizer.

Parameters:
data - the data set to assign to this Quantizer

translate

int translate(Accel3D acc)
Translates a 3D acceleration into its appropriate representative.

Parameters:
acc - The acceleration vector to translate (quantize)
Returns:
the quantized value (an integer) which the Accel3D is mapped to in this Quantizer

size

int size()
Returns the size of the Quantizer, which corresponds to the size of the image of the quantization mapping. That is, the size is the total number of representatives determined by this Quantizer for its data set.

Returns:
the size of the Quantizer.