Skip to content

Class expression_goertzel

class expression_goertzel<T> dsp

template <typename T>
struct expression_goertzel : expression_traits_defaults { … }

Single-bin Goertzel algorithm expression.

Template parameters
T Sample and result type (floating point).
Parameters
result Reference that receives the complex bin value on destruction.
omega Target angular frequency in radians per sample (omega = 2*pi*f/fs).

Note

The result is only valid after the expression object has been destroyed; the final rotation into the complex value happens in the destructor.

variable dims

constexpr static size_t dims = 1

Fully qualified name: kfr::expression_goertzel<T>::dims

Declared at dsp/goertzel.hpp:57

typedef value_type

using value_type = T

Fully qualified name: kfr::expression_goertzel<T>::value_type

Declared at dsp/goertzel.hpp:59

function get_shape(const expression_goertzel<T> &)

constexpr static shape<1> get_shape(const expression_goertzel&) { … }

Fully qualified name: kfr::expression_goertzel<T>::get_shape(const expression_goertzel<T> &)

Declared at dsp/goertzel.hpp:61

function get_shape()

constexpr static shape<1> get_shape() { … }

Fully qualified name: kfr::expression_goertzel<T>::get_shape()

Declared at dsp/goertzel.hpp:62

constructor expression_goertzel<T>(complex<T> &, T)

expression_goertzel(complex<T>& result, T omega)

Construct a Goertzel resonator for frequency omega .

Parameters
result Output complex bin value (filled on destruction).
omega Target angular frequency [rad/sample].

Fully qualified name: kfr::expression_goertzel<T>::expression_goertzel<T>(complex<T> &, T)

Declared at dsp/goertzel.hpp:69

destructor ~expression_goertzel<T>()

~expression_goertzel()

Destructor: rotates the final filter state into the complex DFT bin value and stores it in result .

Fully qualified name: kfr::expression_goertzel<T>::~expression_goertzel<T>()

Declared at dsp/goertzel.hpp:77

function set_elements(expression_goertzel<T> &, shape<1>, axis_params<VecAxis, N>, const std::type_identity_t<vec<T, N>> &)

template <size_t N, index_t VecAxis>
friend KFR_INTRINSIC void set_elements(expression_goertzel& self, shape<1>, axis_params<VecAxis, N>,
                                       const std::type_identity_t<vec<T, N>>& x)

Internal ADL-provided implementation for expression_goertzel expressions.

Fully qualified name: kfr::expression_goertzel<T>::set_elements(expression_goertzel<T> &, shape<1>, axis_params<VecAxis, N>, const std::type_identity_t<vec<T, N>> &)

Declared at dsp/goertzel.hpp:87

variable result

complex<T>& result

Output complex bin value (written on destruction).

Fully qualified name: kfr::expression_goertzel<T>::result

Declared at dsp/goertzel.hpp:99

variable omega

const T omega

Target angular frequency [rad/sample].

Fully qualified name: kfr::expression_goertzel<T>::omega

Declared at dsp/goertzel.hpp:100

variable coeff

const T coeff

Precomputed resonator coefficient

2*cos(omega) .

Fully qualified name: kfr::expression_goertzel<T>::coeff

Declared at dsp/goertzel.hpp:101

variable q0

mutable T q0

Current filter output (working state).

Fully qualified name: kfr::expression_goertzel<T>::q0

Declared at dsp/goertzel.hpp:102

variable q1

mutable T q1

Previous output sample (working state).

Fully qualified name: kfr::expression_goertzel<T>::q1

Declared at dsp/goertzel.hpp:103

variable q2

mutable T q2

Output sample two steps back (working state).

Fully qualified name: kfr::expression_goertzel<T>::q2

Declared at dsp/goertzel.hpp:104

Fully qualified name: kfr::expression_goertzel<T>

Declared at dsp/goertzel.hpp:55

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.