$search
One-dimensional digital filter class. More...
#include <transfer_function.h>
Public Member Functions | |
virtual bool | configure () |
Configure the filter with the correct number of channels and params. | |
MultiChannelTransferFunctionFilter () | |
Construct the filter. | |
virtual bool | update (const std::vector< T > &data_in, std::vector< T > &data_out) |
Update the filter and return the data seperately. | |
~MultiChannelTransferFunctionFilter () | |
Destructor to clean up. | |
Protected Attributes | |
std::vector< double > | a_ |
std::vector< double > | b_ |
boost::scoped_ptr < RealtimeCircularBuffer < std::vector< T > > > | input_buffer_ |
boost::scoped_ptr < RealtimeCircularBuffer < std::vector< T > > > | output_buffer_ |
std::vector< T > | temp_ |
One-dimensional digital filter class.
This class calculates the output for one-dimensional digital filters. Where the input, , is a ( x 1) vector of inputs and the output, , is a ( x 1) vector of outputs. The filter is described by vectors and and implemented using the standard difference equation:
If is not equal to 1, the coefficients are normalized by .
Example xml config:
<filter type="MultiChannelTransferFunctionFilter" name="filter_name">
<params a="1.0 0.5" b="0.2 0.2">
</filter>
Definition at line 225 of file transfer_function.h.
filters::MultiChannelTransferFunctionFilter< T >::MultiChannelTransferFunctionFilter | ( | ) | [inline] |
Construct the filter.
Definition at line 264 of file transfer_function.h.
filters::MultiChannelTransferFunctionFilter< T >::~MultiChannelTransferFunctionFilter | ( | ) | [inline] |
Destructor to clean up.
Definition at line 269 of file transfer_function.h.
bool filters::MultiChannelTransferFunctionFilter< T >::configure | ( | ) | [inline, virtual] |
Configure the filter with the correct number of channels and params.
number_of_channels | The number of inputs filtered. | |
config | The xml that is parsed to configure the filter. |
Implements filters::MultiChannelFilterBase< T >.
Definition at line 274 of file transfer_function.h.
bool filters::MultiChannelTransferFunctionFilter< T >::update | ( | const std::vector< T > & | data_in, | |
std::vector< T > & | data_out | |||
) | [inline, virtual] |
Update the filter and return the data seperately.
data_in | vector<T> with number_of_channels elements | |
data_out | vector<T> with number_of_channels elements |
Implements filters::MultiChannelFilterBase< T >.
Definition at line 321 of file transfer_function.h.
std::vector<double> filters::MultiChannelTransferFunctionFilter< T >::a_ [protected] |
Definition at line 258 of file transfer_function.h.
std::vector<double> filters::MultiChannelTransferFunctionFilter< T >::b_ [protected] |
Definition at line 259 of file transfer_function.h.
boost::scoped_ptr<RealtimeCircularBuffer<std::vector<T> > > filters::MultiChannelTransferFunctionFilter< T >::input_buffer_ [protected] |
Definition at line 253 of file transfer_function.h.
boost::scoped_ptr<RealtimeCircularBuffer<std::vector<T> > > filters::MultiChannelTransferFunctionFilter< T >::output_buffer_ [protected] |
Definition at line 254 of file transfer_function.h.
std::vector<T> filters::MultiChannelTransferFunctionFilter< T >::temp_ [protected] |
Definition at line 256 of file transfer_function.h.