Function
NumCosmoMathSpectralcompute_proj_row
Declaration [src]
void
ncm_spectral_compute_proj_row (
gdouble* row_data,
glong k,
glong offset,
gdouble coeff
)
Description [src]
Computes row k of the projection operator that maps Chebyshev coefficients to Gegenbauer $C^{(2)}_k$ coefficients (ultraspherical basis with $\lambda=2$). This is the identity operator expressed in different bases.
Input: Chebyshev $T_n(x)$ basis coefficients (columns) Output: Gegenbauer $C^{(2)}_k(x)$ basis coefficient (row k)
Mathematical formula: $$ C^{(2)}k = \frac{1}{2} c_0 \delta{k,0} + \frac{c_k}{2(k+1)} - \frac{(k+2) c_{k+2}}{(k+1)(k+3)} + \frac{c_{k+4}}{2(k+3)} $$ where $c_n$ are the input Chebyshev coefficients.
Adds to existing row data (for linear combinations of operators).
Matrix entries for row k: - column k: coeff * 1/(2(k+1)) - column k+2: coeff * -(k+2)/((k+1)(k+3)) - column k+4: coeff * 1/(2*(k+3)) - For k=0 only: additional value coeff * 1/2 at column 0.