ldas-tools-filters
2.6.6
|
Class for performing linear filtering on arbitrary data sequences. More...
#include <LinFilt.hh>
Public Types | |
typedef LinFiltTraits< TCoeffs, TIn >::OutType | TOut |
typedef LinFiltCoeffTraits< TCoeffs >::CoeffType | TCo |
typedef LinFiltStateTraits< TCoeffs, TIn >::StateType | TState |
typedef LinFiltTraits< TCoeffs, TIn >::OutType | TOut |
typedef LinFiltCoeffTraits< TCoeffs >::CoeffType | TCo |
typedef LinFiltStateTraits< TCoeffs, TIn >::StateType | TState |
typedef LinFiltTraits< TCoeffs, TIn >::OutType | TOut |
typedef LinFiltCoeffTraits< TCoeffs >::CoeffType | TCo |
typedef LinFiltStateTraits< TCoeffs, TIn >::StateType | TState |
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. More... | |
const LinFilt & | operator= (const LinFilt &rhs) |
Assignment operator. More... | |
bool | operator== (const LinFilt &rhs) |
virtual LinFilt * | Clone () const |
void | getB (std::valarray< TCoeffs > &b) const |
Get FIR coefficients. More... | |
size_t | getBSize () const |
Get FIR size. More... | |
void | getA (std::valarray< TCoeffs > &a) const |
Get IIR coefficients. More... | |
size_t | getASize () const |
Get IIR size. More... | |
void | getZ (std::valarray< TState > &z) const |
Get state vector. More... | |
size_t | getZSize () const |
Get state size. More... | |
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. More... | |
const LinFilt & | operator= (const LinFilt &rhs) |
Assignment operator. More... | |
bool | operator== (const LinFilt &rhs) |
virtual LinFilt * | Clone () const |
void | getB (std::valarray< TCoeffs > &b) const |
Get FIR coefficients. More... | |
size_t | getBSize () const |
Get FIR size. More... | |
void | getA (std::valarray< TCoeffs > &a) const |
Get IIR coefficients. More... | |
size_t | getASize () const |
Get IIR size. More... | |
void | getZ (std::valarray< TState > &z) const |
Get state vector. More... | |
size_t | getZSize () const |
Get state size. More... | |
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. More... | |
const LinFilt & | operator= (const LinFilt &rhs) |
Assignment operator. More... | |
bool | operator== (const LinFilt &rhs) |
virtual LinFilt * | Clone () const |
void | getB (std::valarray< TCoeffs > &b) const |
Get FIR coefficients. More... | |
size_t | getBSize () const |
Get FIR size. More... | |
void | getA (std::valarray< TCoeffs > &a) const |
Get IIR coefficients. More... | |
size_t | getASize () const |
Get IIR size. More... | |
void | getZ (std::valarray< TState > &z) const |
Get state vector. More... | |
size_t | getZSize () const |
Get state size. More... | |
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... | |
Private Member Functions | |
LinFilt () | |
Default constructor private. More... | |
LinFilt () | |
Default constructor private. More... | |
LinFilt () | |
Default constructor private. More... | |
Private Attributes | |
std::valarray< TCo > | m_b |
FIR coefficients. More... | |
std::valarray< TCo > | m_a |
IIR coefficients. More... | |
std::valarray< TState > | m_z |
State information. 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>
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>
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>
typedef LinFiltCoeffTraits< TCoeffs >::CoeffType Filters::LinFilt< TCoeffs, TIn >::TCo |
typedef LinFiltCoeffTraits< TCoeffs >::CoeffType Filters::LinFilt< TCoeffs, TIn >::TCo |
typedef LinFiltCoeffTraits< TCoeffs >::CoeffType Filters::LinFilt< TCoeffs, TIn >::TCo |
typedef LinFiltTraits< TCoeffs, TIn >::OutType Filters::LinFilt< TCoeffs, TIn >::TOut |
typedef LinFiltTraits< TCoeffs, TIn >::OutType Filters::LinFilt< TCoeffs, TIn >::TOut |
typedef LinFiltTraits< TCoeffs, TIn >::OutType Filters::LinFilt< TCoeffs, TIn >::TOut |
typedef LinFiltStateTraits< TCoeffs, TIn >::StateType Filters::LinFilt< TCoeffs, TIn >::TState |
typedef LinFiltStateTraits< TCoeffs, TIn >::StateType Filters::LinFilt< TCoeffs, TIn >::TState |
typedef LinFiltStateTraits< TCoeffs, TIn >::StateType Filters::LinFilt< TCoeffs, TIn >::TState |
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) |
|
virtual |
Destructor.
|
private |
Default constructor private.
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) |
|
virtual |
Destructor.
|
private |
Default constructor private.
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) |
|
virtual |
Destructor.
|
private |
Default constructor private.
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 |
|
virtual |
Implements Filters::LinFiltBase.
|
virtual |
Implements Filters::LinFiltBase.
|
virtual |
Implements Filters::LinFiltBase.
void Filters::LinFilt< TCoeffs, TIn >::getA | ( | std::valarray< TCoeffs > & | a | ) | const |
Get IIR coefficients.
void Filters::LinFilt< TCoeffs, TIn >::getA | ( | std::valarray< TCoeffs > & | a | ) | const |
Get IIR coefficients.
void Filters::LinFilt< TCoeffs, TIn >::getA | ( | std::valarray< TCoeffs > & | a | ) | const |
Get IIR coefficients.
|
inline |
Get IIR size.
size_t Filters::LinFilt< TCoeffs, TIn >::getASize | ( | ) | const |
Get IIR size.
size_t Filters::LinFilt< TCoeffs, TIn >::getASize | ( | ) | const |
Get IIR size.
void Filters::LinFilt< TCoeffs, TIn >::getB | ( | std::valarray< TCoeffs > & | b | ) | const |
Get FIR coefficients.
void Filters::LinFilt< TCoeffs, TIn >::getB | ( | std::valarray< TCoeffs > & | b | ) | const |
Get FIR coefficients.
void Filters::LinFilt< TCoeffs, TIn >::getB | ( | std::valarray< TCoeffs > & | b | ) | const |
Get FIR coefficients.
|
inline |
Get FIR size.
size_t Filters::LinFilt< TCoeffs, TIn >::getBSize | ( | ) | const |
Get FIR size.
size_t Filters::LinFilt< TCoeffs, TIn >::getBSize | ( | ) | const |
Get FIR size.
void Filters::LinFilt< TCoeffs, TIn >::getZ | ( | std::valarray< TState > & | z | ) | const |
Get state vector.
void Filters::LinFilt< TCoeffs, TIn >::getZ | ( | std::valarray< TState > & | z | ) | const |
Get state vector.
void Filters::LinFilt< TCoeffs, TIn >::getZ | ( | std::valarray< TState > & | z | ) | const |
Get state vector.
|
inline |
Get state size.
size_t Filters::LinFilt< TCoeffs, TIn >::getZSize | ( | ) | const |
Get state size.
size_t Filters::LinFilt< TCoeffs, TIn >::getZSize | ( | ) | const |
Get state size.
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 |
bool Filters::LinFilt< TCoeffs, TIn >::operator== | ( | const LinFilt< TCoeffs, TIn > & | rhs | ) |
bool Filters::LinFilt< TCoeffs, TIn >::operator== | ( | const LinFilt< TCoeffs, TIn > & | rhs | ) |
bool Filters::LinFilt< TCoeffs, TIn >::operator== | ( | const LinFilt< TCoeffs, TIn > & | rhs | ) |
|
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.
|
private |
IIR coefficients.
|
private |
FIR coefficients.
|
private |
State information.