Approximate representation of a 1D continuous function.
More...
#include <ChebyshevInterpolatingFunction.hh>
|
| ChebyshevInterpolatingFunction (const std::function< double(double)> &func, double x_min, double x_max, size_t N=0) |
|
ChebyshevInterpolatingFunction | cdf () const |
|
const std::vector< double > & | chebyshev_coeffs () const |
|
double | evaluate (double x) const |
| Approximates the represented function using the barycentric formula.
|
|
const std::vector< double > & | Fs () const |
|
double | integral () const |
|
int | N () const |
|
const std::vector< double > & | Xs () const |
|
|
std::vector< double > | chebyshev_coeffs_ |
| Coefficients of the Chebyshev expansion of this function.
|
|
std::vector< double > | Fs_ |
| Function values at the grid points.
|
|
std::vector< int > | ifac_ |
|
double | integral_ |
| Approximate integral of the function on [x_min_, x_max_].
|
|
size_t | N_ |
| Grid size parameter (N + 1 total points)
|
|
std::vector< double > | wsave_ |
|
double | x_max_ |
| Upper edge of the grid.
|
|
double | x_min_ |
| Lower edge of the grid.
|
|
std::vector< double > | Xs_ |
| Chebyshev points at which the function was evaluated.
|
|
|
static constexpr size_t | N_MAX_ = 65536u |
| Maximum allowed value of the grid size parameter.
|
|
Approximate representation of a 1D continuous function.
◆ ChebyshevInterpolatingFunction()
marley::ChebyshevInterpolatingFunction::ChebyshevInterpolatingFunction |
( |
const std::function< double(double)> & |
func, |
|
|
double |
x_min, |
|
|
double |
x_max, |
|
|
size_t |
N = 0 |
|
) |
| |
- Todo:
- PRINT WARNING MESSAGE
◆ chebyshev_point()
double marley::ChebyshevInterpolatingFunction::chebyshev_point |
( |
size_t |
j | ) |
const |
|
inlineprotected |
For a given N, returns the x position of the jth Chebyshev point (of the second kind)
- Todo:
- If needed for speed, consider caching the std::cos evaluations used here
The documentation for this class was generated from the following files: