Modules | |
NFSFT: Functions related to associated Legendre | |
functions/polynomials | |
NFSFT: Direct algorithms | |
Public API | |
Data Structures | |
struct | nfsft_plan_ |
Structure for a NFSFT transform plan. More... | |
Defines | |
#define | NFSFT_NORMALIZED (1U << 0) |
By default, all computations are performed with respect to the unnormalized basis functions
If this flag is set, all computations are carried out using the
| |
#define | NFSFT_USE_NDFT (1U << 1) |
If this flag is set, the fast NFSFT algorithms (see nfsft_trafo, nfsft_adjoint) will use internally the exact but usually slower direct NDFT algorithm in favor of fast but approximative NFFT algorithm. | |
#define | NFSFT_USE_DPT (1U << 2) |
If this flag is set, the fast NFSFT algorithms (see nfsft_trafo, nfsft_adjoint) will use internally the usually slower direct DPT algorithm in favor of the fast FPT algorithm. | |
#define | NFSFT_MALLOC_X (1U << 3) |
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array x for you. | |
#define | NFSFT_MALLOC_F_HAT (1U << 5) |
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array f_hat for you. | |
#define | NFSFT_MALLOC_F (1U << 6) |
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array f for you. | |
#define | NFSFT_PRESERVE_F_HAT (1U << 7) |
If this flag is set, it is guaranteed that during an execution of ndsft_trafo or nfsft_trafo the content of f_hat remains unchanged. | |
#define | NFSFT_PRESERVE_X (1U << 8) |
If this flag is set, it is guaranteed that during an execution of ndsft_trafo, nfsft_trafo or ndsft_adjoint, nfsft_adjoint the content of x remains unchanged. | |
#define | NFSFT_PRESERVE_F (1U << 9) |
If this flag is set, it is guaranteed that during an execution of ndsft_adjoint or nfsft_adjoint the content of f remains unchanged. | |
#define | NFSFT_DESTROY_F_HAT (1U << 10) |
If this flag is set, it is explicitely allowed that during an execution of ndsft_trafo or nfsft_trafo the content of f_hat may be changed. | |
#define | NFSFT_DESTROY_X (1U << 11) |
If this flag is set, it is explicitely allowed that during an execution of ndsft_trafo, nfsft_trafo or ndsft_adjoint, nfsft_adjoint the content of x may be changed. | |
#define | NFSFT_DESTROY_F (1U << 12) |
If this flag is set, it is explicitely allowed that during an execution of ndsft_adjoint or nfsft_adjoint the content of f may be changed. | |
#define | NFSFT_NO_DIRECT_ALGORITHM (1U << 13) |
If this flag is set, the transforms ndsft_trafo and ndsft_adjoint do not work. | |
#define | NFSFT_NO_FAST_ALGORITHM (1U << 14) |
If this flag is set, the transforms nfsft_trafo and nfsft_adjoint do not work. | |
#define | NFSFT_ZERO_F_HAT (1U << 16) |
If this flag is set, the transforms nfsft_adjoint and ndsft_adjoint set all unused entries in f_hat not corresponding to spherical Fourier coefficients to zero. | |
#define | NFSFT_INDEX(k, n, plan) ((2*(plan)->N+2)*((plan)->N-n+1)+(plan)->N+k+1) |
This helper macro expands to the index ![]() ![]() ![]() ![]()
. | |
#define | NFSFT_F_HAT_SIZE(N) ((2*N+2)*(2*N+2)) |
This helper macro expands to the logical size of a spherical Fourier coefficients array for a bandwidth N. | |
Typedefs | |
typedef nfsft_plan_ | nfsft_plan |
Structure for a NFSFT transform plan. | |
Functions | |
void | nfsft_init (nfsft_plan *plan, int N, int M) |
Creates a transform plan. | |
void | nfsft_init_advanced (nfsft_plan *plan, int N, int M, unsigned int nfsft_flags) |
Creates a transform plan. | |
void | nfsft_init_guru (nfsft_plan *plan, int N, int M, unsigned int nfsft_flags, int nfft_flags, int nfft_cutoff) |
Creates a transform plan. | |
void | nfsft_precompute (int N, double kappa, unsigned int nfsft_flags, unsigned int fpt_flags) |
Performes precomputation up to the next power of two with respect to a given bandwidth ![]() | |
void | nfsft_forget () |
Forgets all precomputed data. | |
void | ndsft_trafo (nfsft_plan *plan) |
Executes a direct NDSFT, i.e. | |
void | ndsft_adjoint (nfsft_plan *plan) |
Executes a direct adjoint NDSFT, i.e. | |
void | nfsft_trafo (nfsft_plan *plan) |
Executes a NFSFT, i.e. | |
void | nfsft_adjoint (nfsft_plan *plan) |
Executes an adjoint NFSFT, i.e. | |
void | nfsft_finalize (nfsft_plan *plan) |
Destroys a plan. | |
void | nfsft_precompute_x (nfsft_plan *plan) |
In the following, we abbreviate the term "nonuniform fast spherical Fourier transform" by NFSFT.
and identify a point from with the corresponding vector
. The spherical coordinate system is illustrated in the following figure:
The corresponding three-term recurrence relation is
With
being the usual inner product, the Legendre polynomials obey the orthogonality condition
For , they coincide with the Legendre polynomials, i.e.
. The associated Legendre functions obey the three-term recurrence relation
with ,
, and
For fixed , the set
forms a complete set of orthogonal functions in
with
with the usual inner product
The normalisation constant renders the scaled basis functions
orthonormal with respect to the induced norm
A function has the orthogonal expansion
where the coefficients are the spherical Fourier coefficients and the equivalence is understood in the
-sense.
read
and write
. The public members are structured as follows: N_total
(read
) The total number of components in f_hat
. If the bandwidth is f_hat
is N_total
M_total
(read
) the total number of samples f_hat
(read-write
) The flattened array of spherical Fourier coefficents. The array has length f_hat
[
] are f_hat
[ NFSFT_INDEX
(
)] =
... to access the component corresponding to f
(read-write
) the array of coefficients f
[
] = N
(read
) the bandwidth x
the array of nodes f
[
] = f
[
] = f_hat
while the input x
is preserved. On the contrary, the adjoint NDSFT transforms (see ndsft_adjoint, nfsft_adjoint) do not destroy the input f
and x
by default. The desired behaviour can be assured by using the NFSFT_PRESERVE_F_HAT, NFSFT_PRESERVE_X, NFSFT_PRESERVE_F and NFSFT_DESTROY_F_HAT, NFSFT_DESTROY_X, NFSFT_DESTROY_F flags.
|
If this flag is set, it is explicitely allowed that during an execution of ndsft_adjoint or nfsft_adjoint the content of
|
|
If this flag is set, it is explicitely allowed that during an execution of ndsft_trafo or nfsft_trafo the content of
|
|
If this flag is set, it is explicitely allowed that during an execution of ndsft_trafo, nfsft_trafo or ndsft_adjoint, nfsft_adjoint the content of
|
|
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array
Otherwise, you have to assure by yourself that
|
|
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array
Otherwise, you have to assure by yourself that
|
|
If this flag is set, the init methods (see nfsft_init , nfsft_init_advanced , and nfsft_init_guru) will allocate memory and the method nfsft_finalize will free the array
Otherwise, you have to assure by yourself that
|
|
If this flag is set, the transforms ndsft_trafo and ndsft_adjoint do not work. Setting this flag saves some memory for precomputed data.
|
|
If this flag is set, the transforms nfsft_trafo and nfsft_adjoint do not work. Setting this flag saves memory for precomputed data.
|
|
By default, all computations are performed with respect to the unnormalized basis functions
If this flag is set, all computations are carried out using the
.
|
|
If this flag is set, it is guaranteed that during an execution of ndsft_adjoint or nfsft_adjoint the content of
|
|
If this flag is set, it is guaranteed that during an execution of ndsft_trafo or nfsft_trafo the content of
|
|
If this flag is set, it is guaranteed that during an execution of ndsft_trafo, nfsft_trafo or ndsft_adjoint, nfsft_adjoint the content of
|
|
If this flag is set, the fast NFSFT algorithms (see nfsft_trafo, nfsft_adjoint) will use internally the usually slower direct DPT algorithm in favor of the fast FPT algorithm.
|
|
If this flag is set, the fast NFSFT algorithms (see nfsft_trafo, nfsft_adjoint) will use internally the exact but usually slower direct NDFT algorithm in favor of fast but approximative NFFT algorithm.
|
|
If this flag is set, the transforms nfsft_adjoint and ndsft_adjoint set all unused entries in
|
|
Executes a direct adjoint NDSFT, i.e.
computes for
|
|
Executes a direct NDSFT, i.e.
computes for
|
|
Executes an adjoint NFSFT, i.e.
computes for
|
|
Destroys a plan.
|
|
Forgets all precomputed data.
|
|
Creates a transform plan.
|
|
Creates a transform plan.
|
|
Creates a transform plan.
|
|
Performes precomputation up to the next power of two with respect to a given bandwidth
|
|
Executes a NFSFT, i.e.
computes for
|