S2kit
1.1
Toolkit for working with functions defined on the sphere
|
Go to the source code of this file.
Functions | |
int | TableSize (const int, const int) |
Computes the number of non-zero entries of coeffs in a table for seminaive transform. More... | |
int | Spharmonic_TableSize (const int) |
Returns the amount of space needed for an entire spharmonic table. More... | |
int | Reduced_SpharmonicTableSize (const int, const int) |
int | Reduced_Naive_TableSize (const int, const int) |
int | TableOffset (int, int) |
void | GenerateCosPmlTable (const int, const int, double *, double *) |
int | RowSize (const int, const int) |
int | Transpose_RowSize (const int, const int, const int) |
void | TransposeCosPmlTable (const int, const int, double *, double *) |
double ** | Spharmonic_Pml_Table (const int, double *, double *) |
double ** | Transpose_Spharmonic_Pml_Table (double **, const int, double *) |
double ** | SemiNaive_Naive_Pml_Table (const int, const int, double *, double *) |
double ** | Transpose_SemiNaive_Naive_Pml_Table (double **, const int, const int, double *, double *) |
void GenerateCosPmlTable | ( | const int | , |
const int | , | ||
double * | , | ||
double * | |||
) |
double** SemiNaive_Naive_Pml_Table | ( | const int | , |
const int | , | ||
double * | , | ||
double * | |||
) |
double** Spharmonic_Pml_Table | ( | const int | , |
double * | , | ||
double * | |||
) |
int Spharmonic_TableSize | ( | const int | bw | ) |
Returns the amount of space needed for an entire spharmonic table.
Returns an integer value for the amount of space necessary to fill out an entire spharmonic table. Note that in TableSize()
formula, you need to sum this formula over m
as m
ranges from 0 to (bw-1)
. The critical closed form that you need is that:
\sum_{k=0}^n = \frac{(n(n+1)(2n+1)}{6}
You also need to account for integer division. From this you should derive an upper bound on the amount of space.
Some notes - because of integer division, you need to account for a fudge factor - this is the additional " + bw" at the end. This guarantees that you will always have slightly more space than you need, which is clearly better than underestimating! Also, if bw > 512, the closed form fails because of the bw*bw*bw term (at least on Sun Sparcstations) so the loop computation is used instead.
int TableSize | ( | const int | m, |
const int | bw | ||
) |
Computes the number of non-zero entries of coeffs in a table for seminaive transform.
Computes the number of non-zero entries in a table containing cosine series coefficients of all the P(m,l) or G(m,l) functions necessary for computing the seminaive legendre transform for a given bandwidth bw
and order m
.
m | order |
bw | bandwidth |
GenerateCosPmlTable()
. int Transpose_RowSize | ( | const int | , |
const int | , | ||
const int | |||
) |
double** Transpose_SemiNaive_Naive_Pml_Table | ( | double ** | , |
const int | , | ||
const int | , | ||
double * | , | ||
double * | |||
) |
double** Transpose_Spharmonic_Pml_Table | ( | double ** | , |
const int | , | ||
double * | |||
) |