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
49
//! Performs 1-dimentional numerical integration
//!
//! ## Examples
//!
//! In order to calculate the simple integral, you can use `integral` function.
//!
//! ```
//! use gkquad::single::integral;
//!
//! // calculate the integral over range (0.0, 1.0)
//! let result = integral(|x: f64| x.sin() * (- x * x).exp(), 0.0..1.0)
//! .estimate()
//! .unwrap();
//! ```
//!
//! If you want to calculate more complicated integral, you can use `Integrator` object.
//!
//! ```
//! use core::f64::{INFINITY, NEG_INFINITY};
//!
//! use gkquad::single::Integrator;
//! use gkquad::single::algorithm::QAGP;
//!
//! // calculate the integral over range (-∞, ∞), with QAGP algorithm,
//! // maximum iteration limit being 100, singular point on the origin of coordinate.
//! let result = Integrator::new(|x: f64| 1. - (-(x.abs() / 1.6).powf(-2.3)).exp())
//! .max_iters(100)
//! .points(&[0.])
//! .run(NEG_INFINITY..INFINITY)
//! .estimate()
//! .unwrap();
//! ```
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;