NFFT 3.5.3alpha
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 $I_{n+\alpha}(x)$, possibly scaled by $\mathrm{e}^{-x}$, for real non-negative $x,alpha$ with $0 \le \alpha < 1$, and $n=0,1,\ldots,nb-1$.
static double innerProduct (const double phi1, const double theta1, const double phi2, const double theta2)
 Computes the $\mathbb{R}^3$ standard inner product between two vectors on the unit sphere $\mathbb{S}^2$ given in spherical coordinates.
static double poissonKernel (const double x, const double h)
 Evaluates the Poisson kernel $Q_h: [-1,1] \rightarrow \mathbb{R}$ at a node $x \in [-1,1]$.
static double singularityKernel (const double x, const double h)
 Evaluates the singularity kernel $S_h: [-1,1] \rightarrow \mathbb{R}$ at a node $x \in [-1,1]$.
static double locallySupportedKernel (const double x, const double h, const double lambda)
 Evaluates the locally supported kernel $L_{h,\lambda}: [-1,1] \rightarrow
\mathbb{R}$ at a node $x \in [-1,1]$.
static double gaussianKernel (const double x, const double sigma)
 Evaluates the spherical Gaussian kernel $G_\sigma: [-1,1] \rightarrow
\mathbb{R}$ at a node $x \in [-1,1]$.
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 )
inlinestatic

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_ )
inlinestatic

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 $I_{n+\alpha}(x)$, possibly scaled by $\mathrm{e}^{-x}$, for real non-negative $x,alpha$ with $0 \le \alpha < 1$, and $n=0,1,\ldots,nb-1$.

  • [in] x non-negative real number in $I_{n+\alpha}(x)$
  • [in] alpha non-negative real number with $0 \le \alpha < 1$ in $I_{n+\alpha}(x)$
  • [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 $I_{n+\alpha}(x)$, $n=0,1,\ldots,nb-1$
    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, $|x| \ge exparg$). In this case, the output vector b is not calculated and ncalc is set to $\min(nb,0)-1$.
    • 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 $I_{n+\alpha}(x)$ are calculated to full accuracy for $n=0,1,\ldots,ncalc$. The rest of the values up to $n=0,1,\ldots,nb-1$ 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 $J_{\nu}(x)$ or $I_{\nu}(x)$ for real argument $x$ and integer order $\nu$. modifications include the restriction of the computation to the Bessel function $I_{\nu}(x)$ for non-negative real argument, the extension of the computation to arbitrary non-negative orders $\nu$, 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 )
inlinestatic

Computes the $\mathbb{R}^3$ standard inner product between two vectors on the unit sphere $\mathbb{S}^2$ given in spherical coordinates.

  • phi1 The angle $\varphi_1 \in [-\pi,\pi)$ of the first vector
  • theta1 The angle $\vartheta_1 \in [0,\pi]$ of the first vector
  • phi2 The angle $\varphi_2 \in [-\pi,\pi)$ of the second vector
  • theta2 The angle $\vartheta_2 \in [0,\pi]$ of the second vector
Returns
The inner product $\cos \vartheta_1 \cos \vartheta_2 +
        \sin \vartheta_1 \sin(\vartheta_2 \cos(\varphi_1 - \varphi_2)$
Author
Jens Keiner

Definition at line 449 of file fastsumS2.c.

Referenced by main().

◆ poissonKernel()

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

Evaluates the Poisson kernel $Q_h: [-1,1] \rightarrow \mathbb{R}$ at a node $x \in [-1,1]$.

  • x The node $x \in [-1,1]$
  • h The parameter $h \in (0,1)$
Returns
The value of the Poisson kernel $Q_h(x)$ at the node $x$
Author
Jens Keiner

Definition at line 468 of file fastsumS2.c.

Referenced by main().

◆ singularityKernel()

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

Evaluates the singularity kernel $S_h: [-1,1] \rightarrow \mathbb{R}$ at a node $x \in [-1,1]$.

  • x The node $x \in [-1,1]$
  • h The parameter $h \in (0,1)$
Returns
The value of the Poisson kernel $S_h(x)$ at the node $x$
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 )
inlinestatic

Evaluates the locally supported kernel $L_{h,\lambda}: [-1,1] \rightarrow
\mathbb{R}$ at a node $x \in [-1,1]$.

  • x The node $x \in [-1,1]$
  • h The parameter $h \in (0,1)$
  • lambda The parameter $\lambda \in \mathbb{N}_0$
Returns
The value of the locally supported kernel $L_{h,\lambda}(x)$ at the node $x$
Author
Jens Keiner

Definition at line 502 of file fastsumS2.c.

Referenced by main().

◆ gaussianKernel()

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

Evaluates the spherical Gaussian kernel $G_\sigma: [-1,1] \rightarrow
\mathbb{R}$ at a node $x \in [-1,1]$.

  • x The node $x \in [-1,1]$
  • sigma The parameter $\sigma \in \mathbb{R}_+$
Returns
The value of the pherical Gaussian kernel $G_\sigma(x)$ at the node $x$
Author
Jens Keiner

Definition at line 520 of file fastsumS2.c.

Referenced by main().

◆ main()

int main ( int argc,
char ** argv )