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

◆ create_polynomial_function()

Polynomial::DirectFunction MayaFlux::Nodes::Generator::Polynomial::create_polynomial_function ( const std::vector< double > &  coefficients)

Creates a polynomial function from coefficients.

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

Generates a function that evaluates the polynomial defined by the specified coefficients. The cofficients are ordered from highest power to lowest.

Definition at line 223 of file Polynomial.cpp.

224{
225 return [coefficients](double x) {
226 return power_sum(coefficients, x);
227 };
228}
static double power_sum(const std::vector< double > &coefficients, double x) noexcept
Evaluates the coefficient list at x, highest power first.

References power_sum().

+ Here is the call graph for this function: