Function lbcrypto::EvalChebyshevCoefficients

Function Documentation

std::vector<double> lbcrypto::EvalChebyshevCoefficients(std::function<double(double)> func, double a, double b, uint32_t degree)

Method for calculating Chebyshev coefficients for an input function over the range [a,b]. These coefficents can be input into EValChebyshevSeries to evaluate the function.

Parameters
  • func – is the function to be approximated

  • a – - lower bound of argument for which the coefficients were found

  • b – - upper bound of argument for which the coefficients were found

  • degree – Desired degree of approximation

Returns

the coefficients of the Chebyshev approximation.