Package 'RcppBessel'

Title: Bessel Functions Rcpp Interface
Description: Exports an 'Rcpp' interface for the Bessel functions in the 'Bessel' package, which can then be called from the 'C++' code of other packages. For the original 'Fortran' implementation of these functions see Amos (1995) <doi:10.1145/212066.212078>.
Authors: Alexios Galanos [aut, cre] , Martin Maechler [aut] (Author of the Bessel R package, <https://orcid.org/0000-0002-8685-9910>), Donald E. Amos [aut] (Original author of the zbsubs Fortran code, Sandia National Laboratories)
Maintainer: Alexios Galanos <[email protected]>
License: GPL (>= 2)
Version: 1.0.0
Built: 2024-10-27 05:04:59 UTC
Source: https://github.com/alexiosg/rcppbessel

Help Index


The AiryA Function

Description

Computes the Airy function Ai for real or complex inputs.

Usage

airy_a(z, deriv = 0, expon_scaled = FALSE, verbose = 0)

Arguments

z

A numeric or complex vector representing the input values at which to evaluate the Airy function.

deriv

An integer indicating whether to compute the function (0 for the function itself) or its first derivative (1 for the first derivative). Defaults to 0.

expon_scaled

A logical value indicating whether to use the exponentially scaled form of the Airy function. Defaults to FALSE.

verbose

An integer specifying the verbosity level for error messages. Defaults to 0.

Value

A numeric or complex vector (depending on the input) containing the values of the airy_a function evaluated at the points in z.

References

Maechler M (2024). Bessel: Computations and Approximations for Bessel Functions. R package version 0.6-1, https://CRAN.R-project.org/package=Bessel.
Amos DE (1995). “A remark on Algorithm 644: "A portable package for Bessel functions of a complex argument and nonnegative order".” ACM Transactions on Mathematical Software (TOMS), 21(4), 388–393.


The AiryB Function

Description

Computes the Airy function Bi for real or complex inputs.

Usage

airy_b(z, deriv = 0, expon_scaled = FALSE, verbose = 0)

Arguments

z

A numeric or complex vector representing the input values at which to evaluate the Airy function.

deriv

An integer indicating whether to compute the function (0 for the function itself) or its first derivative (1 for the first derivative). Defaults to 0.

expon_scaled

A logical value indicating whether to use the exponentially scaled form of the Airy function. Defaults to FALSE.

verbose

An integer specifying the verbosity level for error messages. Defaults to 0.

Value

A numeric or complex vector (depending on the input) containing the values of the airy_b function evaluated at the points in z.

References

Maechler M (2024). Bessel: Computations and Approximations for Bessel Functions. R package version 0.6-1, https://CRAN.R-project.org/package=Bessel.
Amos DE (1995). “A remark on Algorithm 644: "A portable package for Bessel functions of a complex argument and nonnegative order".” ACM Transactions on Mathematical Software (TOMS), 21(4), 388–393.


The BesselH Function

Description

Computes the Hankel function (Bessel function of the third kind) for real or complex inputs.

Usage

bessel_h(m, z, nu, expon_scaled = FALSE, verbose = 0)

Arguments

m

An integer representing the type of Hankel function. It must be either 1 (for the first kind) or 2 (for the second kind).

z

A numeric or complex vector representing the input values at which to evaluate the Hankel function.

nu

A double representing the order of the Hankel function.

expon_scaled

A logical value indicating whether to use the exponentially scaled form of the Hankel function. Defaults to FALSE.

verbose

An integer specifying the verbosity level for error messages. Defaults to 0.

Value

A complex vector containing the values of the bessel_h function evaluated at the points in z.

References

Maechler M (2024). Bessel: Computations and Approximations for Bessel Functions. R package version 0.6-1, https://CRAN.R-project.org/package=Bessel.
Amos DE (1995). “A remark on Algorithm 644: "A portable package for Bessel functions of a complex argument and nonnegative order".” ACM Transactions on Mathematical Software (TOMS), 21(4), 388–393.


The BesselI Function

Description

Computes the modified Bessel function of the first kind for real or complex inputs.

Usage

bessel_i(z, nu, expon_scaled = FALSE, verbose = 0)

Arguments

z

A numeric or complex vector representing the input values at which to evaluate the Bessel function.

nu

A double representing the order of the Bessel function.

expon_scaled

A logical value indicating whether to use the exponentially scaled form of the Bessel function. Defaults to FALSE.

verbose

An integer specifying the verbosity level for error messages. Defaults to 0.

Value

A numeric or complex vector (depending on the input) containing the values of the bessel_i function evaluated at the points in z.

References

Maechler M (2024). Bessel: Computations and Approximations for Bessel Functions. R package version 0.6-1, https://CRAN.R-project.org/package=Bessel.
Amos DE (1995). “A remark on Algorithm 644: "A portable package for Bessel functions of a complex argument and nonnegative order".” ACM Transactions on Mathematical Software (TOMS), 21(4), 388–393.


The BesselJ Function

Description

Computes the Bessel function of the first kind for real or complex inputs.

Usage

bessel_j(z, nu, expon_scaled = FALSE, verbose = 0)

Arguments

z

A numeric or complex vector representing the input values at which to evaluate the Bessel function.

nu

A double representing the order of the Bessel function.

expon_scaled

A logical value indicating whether to use the exponentially scaled form of the Bessel function. Defaults to FALSE.

verbose

An integer specifying the verbosity level for error messages. Defaults to 0.

Value

A numeric or complex vector (depending on the input) containing the values of the bessel_j function evaluated at the points in z.

References

Maechler M (2024). Bessel: Computations and Approximations for Bessel Functions. R package version 0.6-1, https://CRAN.R-project.org/package=Bessel.
Amos DE (1995). “A remark on Algorithm 644: "A portable package for Bessel functions of a complex argument and nonnegative order".” ACM Transactions on Mathematical Software (TOMS), 21(4), 388–393.


The BesselK Function

Description

Computes the modified Bessel function of the second kind for real or complex inputs.

Usage

bessel_k(z, nu, expon_scaled = FALSE, verbose = 0)

Arguments

z

A numeric or complex vector representing the input values at which to evaluate the Bessel function.

nu

A double representing the order of the Bessel function.

expon_scaled

A logical value indicating whether to use the exponentially scaled form of the Bessel function. Defaults to FALSE.

verbose

An integer specifying the verbosity level for error messages. Defaults to 0.

Value

A numeric or complex vector (depending on the input) containing the values of the bessel_k function evaluated at the points in z.

References

Maechler M (2024). Bessel: Computations and Approximations for Bessel Functions. R package version 0.6-1, https://CRAN.R-project.org/package=Bessel.
Amos DE (1995). “A remark on Algorithm 644: "A portable package for Bessel functions of a complex argument and nonnegative order".” ACM Transactions on Mathematical Software (TOMS), 21(4), 388–393.


The BesselY Function

Description

Computes the Bessel function of the second kind (Neumann function) for real or complex inputs.

Usage

bessel_y(z, nu, expon_scaled = FALSE, verbose = 0)

Arguments

z

A numeric or complex vector representing the input values at which to evaluate the Bessel function.

nu

A double representing the order of the Bessel function.

expon_scaled

A logical value indicating whether to use the exponentially scaled form of the Bessel function. Defaults to FALSE.

verbose

An integer specifying the verbosity level for error messages. Defaults to 0.

Value

A numeric or complex vector (depending on the input) containing the values of the bessel_y function evaluated at the points in z.

References

Maechler M (2024). Bessel: Computations and Approximations for Bessel Functions. R package version 0.6-1, https://CRAN.R-project.org/package=Bessel.
Amos DE (1995). “A remark on Algorithm 644: "A portable package for Bessel functions of a complex argument and nonnegative order".” ACM Transactions on Mathematical Software (TOMS), 21(4), 388–393.