Feature Class Reference

#include <feature.h>

List of all members.


Detailed Description

A data structure representing a weighted vector of floats.

The size of the feature vector is determined at construction and cannot be changed. The elements in the vector and weight are mutable.


Public Member Functions

 Feature (int dim)
 Initially sets all elements in the vector to 0 and weight to 1.
 ~Feature ()
int GetDim () const
 Returns the size of the vector.
float GetValue (int index) const
 Equivalent to operator[](int index) .
float GetWeight () const
 Returns the current weight.
float & operator[] (int index)
 Returns a reference to the specified index. Does bounds checking.
float operator[] (int index) const
 Returns a reference to the specified index. Does bounds checking.
float SetWeight (float weight)
 Sets a new weight, and returns the old weight.


Constructor & Destructor Documentation

Feature ( int  dim  ) 

Initially sets all elements in the vector to 0 and weight to 1.

~Feature (  ) 


Member Function Documentation

int GetDim (  )  const

Returns the size of the vector.

float GetValue ( int  index  )  const

Equivalent to operator[](int index) .

float GetWeight (  )  const

Returns the current weight.

float & operator[] ( int  index  ) 

Returns a reference to the specified index. Does bounds checking.

float operator[] ( int  index  )  const

Returns a reference to the specified index. Does bounds checking.

float SetWeight ( float  weight  ) 

Sets a new weight, and returns the old weight.


The documentation for this class was generated from the following files:
Generated on Wed May 2 11:17:13 2007 for libpmk by  doxygen 1.5.1