1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! A library for performing quasi-discrete Hankel transforms.
//!
//! This crate provides tools for efficiently computing Hankel transforms
//! of various orders using a quasi-discrete approximation. It operates seamlessly
//! on `ndarray` arrays and natively supports both real (`f64`) and complex
//! (`num_complex::Complex64`) numbers via the [`HankelScalar`] trait.
//!
//! # Examples and Guides
//! Comprehensive examples and theoretical demonstrations can be found in the
//! [online `hankrs` book](https://etfrogers.github.io/hankrs/).
//!
//! ## Quick Start
//! ```rust
//! # #[cfg(feature = "blas")]
//! # extern crate blas_src;
//! use hankrs::HankelTransform;
//! use ndarray::{Array1, Axis};
//!
//! // 1. Create a transformer for order 0 up to radius 10.0 with 256 points
//! let transformer = HankelTransform::new(0, 10.0, 256).unwrap();
//!
//! // 2. Define a function on the generated radial grid `transformer.radius()`
//! let r = transformer.radius();
//! let f = r.mapv(|rad| (-rad * rad).exp()); // Gaussian function
//!
//! // 3. Compute the quasi-discrete Hankel transform (QDHT)
//! let ht = transformer.qdht(&f, Axis(0));
//!
//! // The transformed values are evaluated at `transformer.kr()` (or `transformer.frequency()`)
//! ```
// Not using BLAS increases time by 4% on a qdht with 256 points, and 233% on a qdht with 1024 points
// Using bessel_zeros fast mode, and real_bessel, speeds up creation by a factor of 4.
/// Convenience functions for performing one-off Hankel transforms.
/// The primary struct used for computing Hankel transforms.
pub use ;
pub use ;