libftsh
A Fast Transform for Spherical Harmonics
|
A one dimensional sparse matrix, with banded structure. More...
#include <libftsh.h>
Data Fields | |
int | max_size |
int | max_rows |
int | max_bands |
int | n_row |
int | n_col |
int | non_zero |
int * | band_p |
int * | band_list |
REAL * | matrix |
A one dimensional sparse matrix, with banded structure.
NOTES:
int* band_list |
A list of ints that encodes the bands kept. For each band we have three consecutive entries:
int* band_p |
A list of n_row+1 integers that keep track of which bands are in which row of the matrix. band_p[i] holds (three times) the total number of bands used on all previous rows. It is used as an offset within bandlist. band_p[i] gives the beginning of the bands for that row, and band_p[i+1] gives a marker just past the end of the bands for that row. The number of bands on a row is given by (band_p[i+1]-band_p[i])/2. Note that we need access to band_p[n_row].
int max_bands |
(half) the amount of memory available for band_list. Needs to be at least band_p[n_row].
int max_rows |
The amount of memory allocated for row_p. Keeping track of this separately from max_size gives us greater flexibility
int max_size |
The amount of memory allocated for this matrix. This may be quite a lot larger than the amount needed for this particular matrix, but allows us to check if we have enough room when we form a matrix. Needs to be at least non_zero.
int n_col |
The (theoretical) number of colums in the matrix.
int n_row |
The (theoretical) number of rows in the matrix.
int non_zero |
The actual number of non-zero entries in the matrix.