fastsumS2_matlab
Applications » Fast summation of radial functions on the sphere
Collaboration diagram for fastsumS2_matlab:

## Macros

#define | SYMBOL_ABEL_POISSON(k, h)
#define | SYMBOL_SINGULARITY(k, h)
#define | KT_ABEL_POISSON (0)
| Abel-Poisson kernel.
#define | KT_SINGULARITY (1)
| Singularity kernel.
#define | KT_LOC_SUPP (2)
| Locally supported kernel.
#define | KT_GAUSSIAN (3)
| Gaussian kernel.

## Enumerations

enum | pvalue { NO = 0 , YES = 1 , BOTH = 2 }
| Enumeration type for yes/no/both-type parameters. More...

## Functions

static int | scaled_modified_bessel_i_series (const R x, const R alpha, const int nb, const int ize, R *b)
static void | scaled_modified_bessel_i_normalize (const R x, const R alpha, const int nb, const int ize, R *b, const R sum_)
static int | smbi (const R x, const R alpha, const int nb, const int ize, R *b)
| Calculates the modified bessel function , possibly scaled by , for real non-negative with , and .
static double | innerProduct (const double phi1, const double theta1, const double phi2, const double theta2)
| Computes the standard inner product between two vectors on the unit sphere given in spherical coordinates.
static double | poissonKernel (const double x, const double h)
| Evaluates the Poisson kernel at a node .
static double | singularityKernel (const double x, const double h)
| Evaluates the singularity kernel at a node .
static double | locallySupportedKernel (const double x, const double h, const double lambda)
| Evaluates the locally supported kernel at a node .
static double | gaussianKernel (const double x, const double sigma)
| Evaluates the spherical Gaussian kernel at a node .
int | main (int argc, char **argv)
| The main program.

## Detailed Description

## Macro Definition Documentation

## SYMBOL_ABEL_POISSON

#define SYMBOL_ABEL_POISSON | ( |  | k,
|  |  | h )

Value:
(pow(h,k))

Definition at line 42 of file fastsumS2.c.

## SYMBOL_SINGULARITY

#define SYMBOL_SINGULARITY | ( |  | k,
|  |  | h )

Value:
((2.0/(2*k+1))*pow(h,k))

Definition at line 45 of file fastsumS2.c.

## KT_ABEL_POISSON

#define KT_ABEL_POISSON (0)

Abel-Poisson kernel.

Definition at line 50 of file fastsumS2.c.

Referenced by main().

## KT_SINGULARITY

#define KT_SINGULARITY (1)

Singularity kernel.

Definition at line 52 of file fastsumS2.c.

Referenced by main().

## KT_LOC_SUPP

#define KT_LOC_SUPP (2)

Locally supported kernel.

Definition at line 54 of file fastsumS2.c.

Referenced by main().

## KT_GAUSSIAN

#define KT_GAUSSIAN (3)

Gaussian kernel.

Definition at line 56 of file fastsumS2.c.

Referenced by main().

## Enumeration Type Documentation

## pvalue

enum pvalue

Enumeration type for yes/no/both-type parameters.

Definition at line 59 of file fastsumS2.c.

## Function Documentation

## scaled_modified_bessel_i_series()

int scaled_modified_bessel_i_series | ( | const R | x,
|  | const R | alpha,
|  | const int | nb,
|  | const int | ize,
|  | R * | b )

inline static

Definition at line 61 of file fastsumS2.c.

## scaled_modified_bessel_i_normalize()

void scaled_modified_bessel_i_normalize | ( | const R | x,
|  | const R | alpha,
|  | const int | nb,
|  | const int | ize,
|  | R * | b,
|  | const R | sum_ )

inline static

Definition at line 117 of file fastsumS2.c.

## smbi()

int smbi | ( | const R | x,
|  | const R | alpha,
|  | const int | nb,
|  | const int | ize,
|  | R * | b )

static

Calculates the modified bessel function , possibly scaled by , for real non-negative with , and .

- [in] `x` non-negative real number in
- [in] `alpha` non-negative real number with in
- [in] `nb` number of functions to be calculated
- [in] `ize` switch between no scaling (`ize` = 1) and exponential scaling (`ize` = 2)
- [out] `b` real output vector to contain ,
  Returns
    error indicator. Only if this value is identical to `nb`, then all values in `b` have been calculated to full accuracy. If not, errors are indicated using the following scheme:
    - ncalc < 0: At least one of the arguments was out of range (e.g. nb <= 0, ize neither equals 1 nor 2, ). In this case, the output vector b is not calculated and `ncalc` is set to .
    - 0 < ncalc < nb: Not all requested functions could be calculated to full accuracy. This can occur when nb is much larger than |x|. in this case, the values are calculated to full accuracy for . The rest of the values up to is calculated to a lower accuracy.
  \acknowledgement

This program is based on a program written by David J. Sookne [2] that computes values of the Bessel functions or for real argument and integer order . modifications include the restriction of the computation to the Bessel function for non-negative real argument, the extension of the computation to arbitrary non-negative orders , and the elimination of most underflow.

References: [1] F. W. J. Olver and D. J. Sookne, A note on backward recurrence algorithms", Math. Comput. (26), 1972, pp 125 -- 132. [2] D. J. Sookne, "Bessel functions of real argument and int order", NBS Jour. of Res. B. (77B), 1973, pp. 125 – 132.

Modified by W. J. Cody, Applied Mathematics Division, Argonne National Laboratory, Argonne, IL, 60439, USA

Modified by Jens Keiner, Institute of Mathematics, University of Lübeck, 23560 Lübeck, Germany

Definition at line 192 of file fastsumS2.c.

Referenced by main().

## innerProduct()

double innerProduct | ( | const double | phi1,
|  | const double | theta1,
|  | const double | phi2,
|  | const double | theta2 )

inline static

Computes the standard inner product between two vectors on the unit sphere given in spherical coordinates.

- phi1 The angle of the first vector
- theta1 The angle of the first vector
- phi2 The angle of the second vector
- theta2 The angle of the second vector

Returns
  The inner product

Author
  Jens Keiner

Definition at line 449 of file fastsumS2.c.

Referenced by main().

## poissonKernel()

double poissonKernel | ( | const double | x,
|  | const double | h )

inline static

Evaluates the Poisson kernel at a node .

- x The node
- h The parameter

Returns
  The value of the Poisson kernel at the node

Author
  Jens Keiner

Definition at line 468 of file fastsumS2.c.

Referenced by main().

## singularityKernel()

double singularityKernel | ( | const double | x,
|  | const double | h )

inline static

Evaluates the singularity kernel at a node .

- x The node
- h The parameter

Returns
  The value of the Poisson kernel at the node

Author
  Jens Keiner

Definition at line 484 of file fastsumS2.c.

Referenced by main().

## locallySupportedKernel()

double locallySupportedKernel | ( | const double | x,
|  | const double | h,
|  | const double | lambda )

inline static

Evaluates the locally supported kernel at a node .

- x The node
- h The parameter
- lambda The parameter

Returns
  The value of the locally supported kernel at the node

Author
  Jens Keiner

Definition at line 502 of file fastsumS2.c.

Referenced by main().

## gaussianKernel()

double gaussianKernel | ( | const double | x,
|  | const double | sigma )

inline static

Evaluates the spherical Gaussian kernel at a node .

- x The node
- sigma The parameter

Returns
  The value of the pherical Gaussian kernel at the node

Author
  Jens Keiner

Definition at line 520 of file fastsumS2.c.

Referenced by main().

## main()

int main | ( | int | argc,
|  | char ** | argv )

The main program.

Parameters

  argc | The number of arguments
  argv | An array containing the arguments as C-strings

Returns
  Exit code

Author
  Jens Keiner

Definition at line 535 of file fastsumS2.c.

References nfsft_plan::f, nfsft_plan::f_hat, FFTW_INIT, gaussianKernel(), innerProduct(), KT_ABEL_POISSON, KT_GAUSSIAN, KT_LOC_SUPP, KT_SINGULARITY, locallySupportedKernel(), nfft_elapsed_seconds(), nfft_free(), nfft_malloc(), nfsft_adjoint(), NFSFT_F_HAT_SIZE, nfsft_finalize(), nfsft_forget(), NFSFT_INDEX, NFSFT_NO_FAST_ALGORITHM, nfsft_precompute(), nfsft_trafo(), NFSFT_USE_DPT, NFSFT_USE_NDFT, poissonKernel(), PRE_PHI_HUT, PRE_PSI, singularityKernel(), smbi(), X, and nfsft_plan::x.