Type: | Package |
Title: | Bessel Functions Rcpp Interface |
Version: | 1.0.0 |
Maintainer: | Alexios Galanos <alexios@4dscape.com> |
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>. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
LinkingTo: | Rcpp |
Imports: | Rcpp (≥ 1.0.12), Rdpack |
URL: | https://github.com/alexiosg/RcppBessel |
RdMacros: | Rdpack |
Suggests: | knitr, rmarkdown, roxygen2, Bessel, testthat (≥ 3.0.0), microbenchmark |
VignetteBuilder: | knitr |
Config/testthat/edition: | 3 |
NeedsCompilation: | yes |
Packaged: | 2024-08-22 16:09:28 UTC; alexios |
Author: | Alexios Galanos |
Repository: | CRAN |
Date/Publication: | 2024-08-27 16:30:14 UTC |
RcppBessel: 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. The original 'Fortran' code for these function was originally published by Amos (1995) doi:10.1145/212066.212078.
Author(s)
Maintainer: Alexios Galanos alexios@4dscape.com (ORCID)
Authors:
Martin Maechler (ORCID) (Author of the Bessel R package)
Donald E. Amos (Original author of the zbsubs Fortran code, Sandia National Laboratories)
See Also
Useful links:
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 ( |
expon_scaled |
A logical value indicating whether to use the exponentially scaled form of the Airy function. Defaults to |
verbose |
An integer specifying the verbosity level for error messages. Defaults to |
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 ( |
expon_scaled |
A logical value indicating whether to use the exponentially scaled form of the Airy function. Defaults to |
verbose |
An integer specifying the verbosity level for error messages. Defaults to |
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 |
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 |
verbose |
An integer specifying the verbosity level for error messages. Defaults to |
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 |
verbose |
An integer specifying the verbosity level for error messages. Defaults to |
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 |
verbose |
An integer specifying the verbosity level for error messages. Defaults to |
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 |
verbose |
An integer specifying the verbosity level for error messages. Defaults to |
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 |
verbose |
An integer specifying the verbosity level for error messages. Defaults to |
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.