S2kit  1.1
Toolkit for working with functions defined on the sphere
cospml.h File Reference

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 *)
 

Function Documentation

◆ GenerateCosPmlTable()

void GenerateCosPmlTable ( const int  ,
const int  ,
double *  ,
double *   
)

Definition at line 161 of file cospml.c.

◆ Reduced_Naive_TableSize()

int Reduced_Naive_TableSize ( const int  ,
const int   
)

Definition at line 434 of file cospml.c.

◆ Reduced_SpharmonicTableSize()

int Reduced_SpharmonicTableSize ( const int  ,
const int   
)

Definition at line 107 of file cospml.c.

◆ RowSize()

int RowSize ( const int  ,
const int   
)

Definition at line 250 of file cospml.c.

◆ SemiNaive_Naive_Pml_Table()

double** SemiNaive_Naive_Pml_Table ( const int  ,
const int  ,
double *  ,
double *   
)

Definition at line 451 of file cospml.c.

◆ Spharmonic_Pml_Table()

double** Spharmonic_Pml_Table ( const int  ,
double *  ,
double *   
)

Definition at line 387 of file cospml.c.

◆ Spharmonic_TableSize()

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.

Note
Size of transposed table is exactly the same, obviously.

Definition at line 85 of file cospml.c.

◆ TableOffset()

int TableOffset ( int  ,
int   
)

Definition at line 123 of file cospml.c.

◆ TableSize()

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.

Parameters
morder
bwbandwidth
Note
Assumes the table is generated by GenerateCosPmlTable().

Definition at line 39 of file cospml.c.

◆ Transpose_RowSize()

int Transpose_RowSize ( const int  ,
const int  ,
const int   
)

Definition at line 270 of file cospml.c.

◆ Transpose_SemiNaive_Naive_Pml_Table()

double** Transpose_SemiNaive_Naive_Pml_Table ( double **  ,
const int  ,
const int  ,
double *  ,
double *   
)

Definition at line 490 of file cospml.c.

◆ Transpose_Spharmonic_Pml_Table()

double** Transpose_Spharmonic_Pml_Table ( double **  ,
const int  ,
double *   
)

Definition at line 415 of file cospml.c.

◆ TransposeCosPmlTable()

void TransposeCosPmlTable ( const int  ,
const int  ,
double *  ,
double *   
)

Definition at line 301 of file cospml.c.