Method
NumCosmoMathSpectralcompute_chebyshev_coeffs
Declaration [src]
void
ncm_spectral_compute_chebyshev_coeffs (
NcmSpectral* spectral,
NcmSpectralF F,
gdouble a,
gdouble b,
guint order,
GArray** coeffs,
gpointer user_data
)
Description [src]
Computes order Chebyshev coefficients of $f(x)$ on $[a,b]$ at fixed resolution,
sampling F at the Chebyshev–Lobatto nodes and applying FFTW DCT-I. See the
Spectral Methods page for the node
placement and coefficient normalization.
If coeffs points to NULL, allocates a new GArray of size order. If coeffs points
to an existing GArray, resizes it to order. Through bindings, coeffs always receives NULL.
Parameters
F-
Type:
NcmSpectralFFunction to evaluate, receives x in [a,b].
a-
Type:
gdoubleLeft endpoint of the interval.
b-
Type:
gdoubleRight endpoint of the interval.
order-
Type:
guintNumber of Chebyshev coefficients to compute.
coeffs-
Type: An array of
doubleOutput array of coefficients.
The argument will be set by the function. The caller of the method takes ownership of the returned data, and is responsible for freeing it. user_data-
Type:
gpointerUser data for
F.The argument can be NULL.The data is owned by the caller of the method.