Copiste  0.1
 All Classes Functions Variables Enumerations Friends Pages
Public Member Functions | Protected Member Functions
AverageFilter Class Reference

A filter for computing the temporal average of a value. More...

#include <average.h>

Inheritance diagram for AverageFilter:
Filter FeatureExtractor

List of all members.

Public Member Functions

 AverageFilter ()
 Default constructor : does nothing.
 ~AverageFilter ()
 Destructor : cleans the memory.
void transform (vector< float > data)
 Run the algorithm and store the results.
float value (int index=0)
 Retrieve the results (from the index).
float min ()
 Lower bound for outputted values (same as the parent)
float max ()
 Higher bound for outputted values (same as the parent)
int size ()
 Get the number of available values.
void setInt (string key, int value)
 Set a int parameter (available : size)
int getInt (string key)
 Get a int parameter (available : size)
- Public Member Functions inherited from Filter
 Filter ()
 Default constructor : does nothing yet.
virtual ~Filter ()
 Destructor (inherited from FeatureExtractor)
FeatureExtractorbind (FeatureExtractor *extr)
 Binds the filter to the output of an extractor (or another filter). Returns the old one.
bool extract (std::deque< uint16_t > data, int size=0)
 Extract data This method should not be reimplemented by the user. The given parameters are ignored : the data is drawn from the upstream extractor without taking care of the raw data.
- Public Member Functions inherited from FeatureExtractor
 FeatureExtractor (int chunkSize=0)
 Constructor. Can set the typical chunk size.
virtual ~FeatureExtractor ()
 Virtual destructor : enables each extractor to delete arrays.
bool extract (std::deque< uint16_t > data, int size, size_t start)
 Idem, but the buffer starts at index start instead (circular buffer)
virtual float safeValue (int index=0)
 Retrieve the results, with the bounds respected (we apply a min / max)
virtual float value (int index, float low, float high)
 Retrieve the results, with other bounds.
virtual void setFloat (string key, float value)
 Set a float parameter.
virtual float getFloat (string key)
 Get a float parameter.
virtual void setString (string key, string value)
 Set a string parameter.
virtual string getString (string key)
 Get a string parameter.
virtual void clear ()
 Clear the memory of the extractor (so that the previously computed results don't infer to the next ones)

Protected Member Functions

void parentChanged ()
 Update the sizes.

Additional Inherited Members

- Protected Attributes inherited from Filter
FeatureExtractormExtr
 The extractor from which the data is drawn.

Detailed Description

A filter for computing the temporal average of a value.


Member Function Documentation

float AverageFilter::value ( int  index = 0)
virtual

Retrieve the results (from the index).

Retrive the results (from the index). The values are usually between -1 and 1.

Implements FeatureExtractor.


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