MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ bind_coefficients()

Polynomial::BufferFunction MayaFlux::Nodes::Generator::Polynomial::bind_coefficients ( CoefBufferFunction  function)
private

Converts coefficient vector to a polynomial function.

Parameters
coefficientsVector of polynomial coefficients (highest power first)
Returns
Function that evaluates the polynomial

Creates a function that evaluates the polynomial defined by the specified coefficients.

Adapts a CoefBufferFunction to the BufferFunction slot

Parameters
functionFunction receiving the history window and the coefficient array
Returns
BufferFunction that supplies m_coefficients on every call

Definition at line 176 of file Polynomial.cpp.

177{
178 return [this, function = std::move(function)](std::span<double> window) {
179 return function(window, std::span<double>(m_coefficients));
180 };
181}
std::weak_ptr< Core::Window > window
Definition Picker.cpp:23
std::vector< double > m_coefficients
Polynomial coefficients (if using coefficient-based definition)

References m_coefficients, and window.

Referenced by set_buffer_function().

+ Here is the caller graph for this function: