ldas-tools-filters
2.6.6
|
Class for performing linear filtering on arbitrary data sequences. More...
#include <LinFilt.hh>
Public Member Functions | |
LinFilt (const std::valarray< TCoeffs > &b, const std::valarray< TCoeffs > &a=std::valarray< TCoeffs >(1.0, 1)) | |
Construct from transfer function. More... | |
virtual | ~LinFilt () |
Destructor. | |
const LinFilt & | operator= (const LinFilt &rhs) |
Assignment operator. More... | |
void | getB (std::valarray< TCoeffs > &b) const |
Get FIR coefficients. | |
size_t | getBSize () const |
Get FIR size. | |
void | getA (std::valarray< TCoeffs > &a) const |
Get IIR coefficients. | |
size_t | getASize () const |
Get IIR size. | |
void | getZ (std::valarray< TState > &z) const |
Get state vector. | |
size_t | getZSize () const |
Get state size. | |
virtual void | reset () |
Reset the internal state to its initial condition. More... | |
void | apply (std::valarray< TOut > &x) |
In-place filter action. More... | |
void | apply (std::valarray< TOut > &y, const std::valarray< TIn > &x) |
Out-of-place filter action. More... | |
LinFilt (const std::valarray< TCoeffs > &b, const std::valarray< TCoeffs > &a=std::valarray< TCoeffs >(1.0, 1)) | |
Construct from transfer function. More... | |
virtual | ~LinFilt () |
Destructor. | |
const LinFilt & | operator= (const LinFilt &rhs) |
Assignment operator. More... | |
void | getB (std::valarray< TCoeffs > &b) const |
Get FIR coefficients. | |
size_t | getBSize () const |
Get FIR size. | |
void | getA (std::valarray< TCoeffs > &a) const |
Get IIR coefficients. | |
size_t | getASize () const |
Get IIR size. | |
void | getZ (std::valarray< TState > &z) const |
Get state vector. | |
size_t | getZSize () const |
Get state size. | |
virtual void | reset () |
Reset the internal state to its initial condition. More... | |
void | apply (std::valarray< TOut > &x) |
In-place filter action. More... | |
void | apply (std::valarray< TOut > &y, const std::valarray< TIn > &x) |
Out-of-place filter action. More... | |
LinFilt (const std::valarray< TCoeffs > &b, const std::valarray< TCoeffs > &a=std::valarray< TCoeffs >(1.0, 1)) | |
Construct from transfer function. More... | |
virtual | ~LinFilt () |
Destructor. | |
const LinFilt & | operator= (const LinFilt &rhs) |
Assignment operator. More... | |
void | getB (std::valarray< TCoeffs > &b) const |
Get FIR coefficients. | |
size_t | getBSize () const |
Get FIR size. | |
void | getA (std::valarray< TCoeffs > &a) const |
Get IIR coefficients. | |
size_t | getASize () const |
Get IIR size. | |
void | getZ (std::valarray< TState > &z) const |
Get state vector. | |
size_t | getZSize () const |
Get state size. | |
virtual void | reset () |
Reset the internal state to its initial condition. More... | |
void | apply (std::valarray< TOut > &x) |
In-place filter action. More... | |
void | apply (std::valarray< TOut > &y, const std::valarray< TIn > &x) |
Out-of-place filter action. More... | |
Class for performing linear filtering on arbitrary data sequences.
TCoeffs is the data type of the elements in the filter coefficient arrays a and b. Internally, coefficients are stored at double precision.
TIn is the data type of the elements in the input array.
The output type TOut is derived from TCoeffs and TIn using trait classes. The internal state type TState is also derived from TCoeffs and TIn.
float float float double float double double double float complex<float> complex<float> complex<double> float complex<double> complex<double> complex<double>
double float float double double double double double double complex<float> complex<float> complex<double> double complex<double> complex<double> complex<double>
complex<float> float complex<float> complex<double> complex<float> double complex<double> complex<double> complex<float> complex<float> complex<float> complex<double> complex<float> complex<double> complex<double> complex<double>
complex<double> float float complex<double> complex<double> double double complex<double> complex<double> complex<float> complex<float> complex<double> complex<double> complex<double> complex<double> complex<double>
Filters::LinFilt< TCoeffs, TIn >::LinFilt | ( | const std::valarray< TCoeffs > & | b, |
const std::valarray< TCoeffs > & | a = std::valarray< TCoeffs >( 1.0, 1 ) |
||
) |
Construct from transfer function.
[in] | b | FIR transfer function |
[in] | a | IIR transfer function (defaults to FIR if a is not provided) |
Filters::LinFilt< TCoeffs, TIn >::LinFilt | ( | const std::valarray< TCoeffs > & | b, |
const std::valarray< TCoeffs > & | a = std::valarray< TCoeffs >(1.0, 1) |
||
) |
Construct from transfer function.
[in] | b | FIR transfer function |
[in] | a | IIR transfer function (defaults to FIR if a is not provided) |
Filters::LinFilt< TCoeffs, TIn >::LinFilt | ( | const std::valarray< TCoeffs > & | b, |
const std::valarray< TCoeffs > & | a = std::valarray< TCoeffs >(1.0, 1) |
||
) |
Construct from transfer function.
[in] | b | FIR transfer function |
[in] | a | IIR transfer function (defaults to FIR if a is not provided) |
void Filters::LinFilt< TCoeffs, TIn >::apply | ( | std::valarray< TOut > & | x | ) |
In-place filter action.
[in] | x | input data for filter. |
std::invalid_argument | x.size() == 0 |
void Filters::LinFilt< TCoeffs, TIn >::apply | ( | std::valarray< TOut > & | x | ) |
In-place filter action.
[in] | x | input data for filter. |
std::invalid_argument | x.size() == 0 |
void Filters::LinFilt< TCoeffs, TIn >::apply | ( | std::valarray< TOut > & | x | ) |
In-place filter action.
[in] | x | input data for filter. |
std::invalid_argument | x.size() == 0 |
void Filters::LinFilt< TCoeffs, TIn >::apply | ( | std::valarray< TOut > & | y, |
const std::valarray< TIn > & | x | ||
) |
Out-of-place filter action.
[in] | y | result of filter acting on in. Existing contents destroyed. param: x - input data for filter. exc: std::invalid_argument - x.size() == 0 |
void Filters::LinFilt< TCoeffs, TIn >::apply | ( | std::valarray< TOut > & | y, |
const std::valarray< TIn > & | x | ||
) |
Out-of-place filter action.
[in] | y | result of filter acting on in. Existing contents destroyed. param: x - input data for filter. exc: std::invalid_argument - x.size() == 0 |
void Filters::LinFilt< TCoeffs, TIn >::apply | ( | std::valarray< TOut > & | y, |
const std::valarray< TIn > & | x | ||
) |
Out-of-place filter action.
[in] | y | result of filter acting on in. Existing contents destroyed. param: x - input data for filter. exc: std::invalid_argument - x.size() == 0 |
const LinFilt< TCoeffs, TIn > & Filters::LinFilt< TCoeffs, TIn >::operator= | ( | const LinFilt< TCoeffs, TIn > & | rhs | ) |
Assignment operator.
[in] | lf | LinFilt object to assign from |
const LinFilt& Filters::LinFilt< TCoeffs, TIn >::operator= | ( | const LinFilt< TCoeffs, TIn > & | rhs | ) |
Assignment operator.
[in] | lf | LinFilt object to assign from |
const LinFilt& Filters::LinFilt< TCoeffs, TIn >::operator= | ( | const LinFilt< TCoeffs, TIn > & | rhs | ) |
Assignment operator.
[in] | lf | LinFilt object to assign from |
|
virtual |
Reset the internal state to its initial condition.
This function sets the internal state information back to zero, exactly as it is when the LinFilt object is first created. This means that when the filter is next applied, data "before" the start of the series will be treated as if it were zero.
Implements Filters::LinFiltBase.
|
virtual |
Reset the internal state to its initial condition.
This function sets the internal state information back to zero, exactly as it is when the LinFilt object is first created. This means that when the filter is next applied, data "before" the start of the series will be treated as if it were zero.
Implements Filters::LinFiltBase.
|
virtual |
Reset the internal state to its initial condition.
This function sets the internal state information back to zero, exactly as it is when the LinFilt object is first created. This means that when the filter is next applied, data "before" the start of the series will be treated as if it were zero.
Implements Filters::LinFiltBase.