
Chebyshev coefficients for a real-valued function
Source:R/methods-ckks.R
eval_chebyshev_coefficients.RdComputes the Chebyshev (first-kind) coefficients that approximate
a univariate function func on the interval \([a, b]\) using the
discrete orthogonality formula at degree + 1 Chebyshev nodes.
This is a direct port of the upstream routine
EvalChebyshevCoefficients() in
core/lib/math/chebyshev.cpp of openfhe-development, and the
returned vector is in exactly the form that
eval_chebyshev() (and the upstream EvalChebyshevSeries)
expect — the zeroth coefficient is not halved.