Function heongpu::approximate_function

Function Documentation

std::vector<Complex64> heongpu::approximate_function(std::function<Complex64(Complex64)> function, double a, double b, int degree)

Approximate a complex-valued function using Chebyshev interpolation.

Parameters:
  • function – Function to approximate (Complex64 -> Complex64)

  • a – Lower bound of interval

  • b – Upper bound of interval

  • degree – Degree of polynomial approximation

Returns:

std::vector<Complex64> Chebyshev coefficients