RapidLib  v2.1.0
A simple library for interactive machine learning
rapidStream< T > Class Template Reference

#include <rapidStream.h>

Collaboration diagram for rapidStream< T >:
Collaboration graph

Public Member Functions

 rapidStream ()
 
 rapidStream (int windowSize)
 
 ~rapidStream ()
 
void clear ()
 
void pushToWindow (T input)
 
velocity ()
 
acceleration ()
 
minimum ()
 
maximum ()
 
sum ()
 
mean ()
 
standardDeviation ()
 
rms ()
 
bayesFilter (T inputValue)
 
void bayesSetDiffusion (float logDiffusion)
 
void bayesSetJumpRate (float jump_rate)
 
void bayesSetMVC (float mvc)
 
minVelocity ()
 
maxVelocity ()
 
minAcceleration ()
 
maxAcceleration ()
 

Constructor & Destructor Documentation

§ rapidStream() [1/2]

template<typename T >
rapidStream< T >::rapidStream ( )

Create a circular buffer with 3 elements.

§ rapidStream() [2/2]

template<typename T >
rapidStream< T >::rapidStream ( int  windowSize)

Create a circular buffer with an arbitrary number of elements.

Parameters
intnumber of elements to hold in the buffer

§ ~rapidStream()

template<typename T >
rapidStream< T >::~rapidStream ( )

Member Function Documentation

§ acceleration()

template<typename T >
T rapidStream< T >::acceleration ( )

Calculate the second-order difference (aka acceleration) over the last three inputs.

Returns
double: acceleration over the last three inputs.

§ bayesFilter()

template<typename T >
T rapidStream< T >::bayesFilter ( inputValue)

Non-linear Baysian filtering for EMG envelope extraction.

Returns
current envelope value

§ bayesSetDiffusion()

template<typename T >
void rapidStream< T >::bayesSetDiffusion ( float  logDiffusion)

§ bayesSetJumpRate()

template<typename T >
void rapidStream< T >::bayesSetJumpRate ( float  jump_rate)

§ bayesSetMVC()

template<typename T >
void rapidStream< T >::bayesSetMVC ( float  mvc)

§ clear()

template<typename T >
void rapidStream< T >::clear ( )

Resets all the values in the buffer to zero.

§ maxAcceleration()

template<typename T >
T rapidStream< T >::maxAcceleration ( )

Calculate the maximum second-order difference over consecutive inputs in the buffer.

Returns
double: maximum acceleration.

§ maximum()

template<typename T >
T rapidStream< T >::maximum ( )

Find the maximum value in the buffer.

Returns
double: maximum.

§ maxVelocity()

template<typename T >
T rapidStream< T >::maxVelocity ( )

Calculate the maximum first-order difference over consecutive inputs in the buffer.

Returns
double: maximum velocity.

§ mean()

template<typename T >
T rapidStream< T >::mean ( )

Calculate the mean of all values in the buffer.

Returns
double: mean.

§ minAcceleration()

template<typename T >
T rapidStream< T >::minAcceleration ( )

Calculate the minimum second-order difference over consecutive inputs in the buffer.

Returns
double: minimum acceleration.

§ minimum()

template<typename T >
T rapidStream< T >::minimum ( )

Find the minimum value in the buffer.

Returns
double: minimum.

§ minVelocity()

template<typename T >
T rapidStream< T >::minVelocity ( )

Calculate the minimum first-order difference over consecutive inputs in the buffer.

Returns
double: minimum velocity.

§ pushToWindow()

template<typename T >
void rapidStream< T >::pushToWindow ( input)

Add a value to a circular buffer whose size is defined at creation.

Parameters
doublevalue to be pushed into circular buffer.

§ rms()

template<typename T >
T rapidStream< T >::rms ( )

Calculate the root mean square of the values in the buffer

Returns
double: rms

§ standardDeviation()

template<typename T >
T rapidStream< T >::standardDeviation ( )

Calculate the standard deviation of all values in the buffer.

Returns
double: standard deviation.

§ sum()

template<typename T >
T rapidStream< T >::sum ( )

Calculate the sum of all values in the buffer.

Returns
double: sum.

§ velocity()

template<typename T >
T rapidStream< T >::velocity ( )

Calculate the first-order difference (aka velocity) between the last two inputs.

Returns
double: difference between last two inputs.

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