|
S2kit
1.1
Toolkit for working with functions defined on the sphere
|
Source code for naive discrete Legendre transform. More...
Go to the source code of this file.
Functions | |
| void | DLTNaive (double *data, const int bw, const int m, double *weights, double *result, double *pml_table, double *workspace) |
| The naive forward discrete Legendre transform. More... | |
| void | InvDLTNaive (double *coeffs, const int bw, const int m, double *result, double *pml_table) |
| The inverse discrete Legendre transform. More... | |
Source code for naive discrete Legendre transform.
Source code to synthesize functions using a naive DLT based on recurrence. This algorithm is stable and does not require any precomputed functions, but the slowest one.
Definition in file naive.c.
| void DLTNaive | ( | double * | data, |
| const int | bw, | ||
| const int | m, | ||
| double * | weights, | ||
| double * | result, | ||
| double * | pml_table, | ||
| double * | workspace | ||
| ) |
The naive forward discrete Legendre transform.
Computes the discrete Legendre transform of a function via summing naively. I.e. this is the forward discrete Legendre transform.
| data | array of size 2*bw containing the sample points |
| bw | bandwidth |
| m | order |
| weights | weights for Legendre transform |
| result | array of size bw-m which will contain the coefficients |
| pml_table | array of size 2*bw*(bw-m) which contains the precomputed Pmls |
| workspace | space for computations of size 2*bw |
weights should be generated by GenerateWeightsForDLT(). pml_table should be generated by GeneratePmlTable() and contains Legendres with norm equal to 1. | void InvDLTNaive | ( | double * | coeffs, |
| const int | bw, | ||
| const int | m, | ||
| double * | result, | ||
| double * | pml_table | ||
| ) |
The inverse discrete Legendre transform.
Synthesizes a function from a list of coefficients of a Legendre series. I.e. this is the inverse discrete Legendre transform.
| coeffs | array of size bw-m. The first coefficient is for Pmm |
| bw | bandwidth |
| m | order |
| result | array of size 2*bw which will contain the synthesized function |
| pml_table | array of size 2*bw*(bw-m) which contains the precomputed Pmls |
pml_table should be generated by GeneratePmlTable() and contains Legendres with norm equal to 1.