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

## Macros

#define | SYMBOL_ABEL_POISSON(k, h) (pow(h,k))
#define | SYMBOL_SINGULARITY(k, h) ((2.0/(2*k+1))*pow(h,k))
#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.

## 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 . More...
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. More...
static double | poissonKernel (const double x, const double h)
| Evaluates the Poisson kernel at a node . More...
static double | singularityKernel (const double x, const double h)
| Evaluates the singularity kernel at a node . More...
static double | locallySupportedKernel (const double x, const double h, const double lambda)
| Evaluates the locally supported kernel at a node . More...
static double | gaussianKernel (const double x, const double sigma)
| Evaluates the spherical Gaussian kernel at a node . More...
int | main (int argc, char **argv)
| The main program. More...

## Detailed Description

## Function Documentation

static 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.

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().

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

inlinestatic

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().

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

inlinestatic

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().

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

inlinestatic

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().

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

inlinestatic

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().

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

inlinestatic

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().

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, FFT_OUT_OF_PLACE, 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.