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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! [![github]](https://github.com/tamaskis/numint) [![crates-io]](https://crates.io/crates/numint) [![docs-rs]](https://docs.rs/numint)
//!
//! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github
//! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust
//! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs
//!
//! ODE solvers and numerical integration in Rust.
//!
//! # Overview
//!
//! At its core, this crate is designed to work with scalar-valued, vector-valued, and matrix-valued
//! ordinary differential equations.
//!
//! | ODE Type | Function Signature |
//! | ------------ | ------------------------------ |
//! | scalar-valued | $$\frac{dy}{dt}=f(t,y)\quad\quad\left\(f:\mathbb{R}\times\mathbb{R}\to\mathbb{R}\right\)$$ |
//! | vector-valued | $$\frac{d\mathbf{y}}{dt}=\mathbf{f}(t,\mathbf{y})\quad\quad\left\(\mathbf{f}:\mathbb{R}\times\mathbb{R}^{p}\to\mathbb{R}^{p}\right\)$$ |
//! | matrix-valued | $$\frac{d\mathbf{Y}}{dt}=\mathbf{F}(t,\mathbf{Y})\quad\quad\left\(\mathbf{F}:\mathbb{R}\times\mathbb{R}^{p\times r}\to\mathbb{R}^{p\times r}\right\)$$ |
//!
//! # Initial Value Problem (IVP) Solver
//!
//! The [`solve_ivp()`] function is a general purpose IVP solver with the following features:
//!
//! * it accepts a generic parameter defining the integration method
//! * it can be used for scalar-valued, vector-valued, and matrix-valued problems (this is
//! accomplished by accepting another generic parameter defining the type of the ODE state)
//! * any types of vectors or matrices can be used with this function as long as they implement
//! the [`OdeState`] trait (see [The `OdeState` trait](#the-odestate-trait) section below).
//!
//! # Integration Methods
//!
//! ## Runge-Kutta Methods
//!
//! | Integration Method | Order | Implementation |
//! | ------------------ | ----- | -------------- |
//! | Euler Method | 2 | [`Euler`] |
//! | Midpoint Method | 2 | [`RK2`] |
//! | Heun's Second-Order Method | 2 | [`RK2Heun`] |
//! | Ralston's Second-Order Method | 2 | [`RK2Ralston`] |
//! | Classic (Kutta's) Third-Order method | 2 | [`RK3`] |
//! | Heun's Third-Order Method | 3 | [`RK3Heun`] |
//! | Ralston's Third-Order Method | 3 | [`RK3Ralston`] |
//! | Strong Stability Preserving Runge-Kutta Third-Order Method | 3 | [`SSPRK3`] |
//! | (Classic) Runge-Kutta Fourth-Order Method | 4 | [`RK4`] |
//! | Ralston's Fourth-Order Method | 4 | [`RK4Ralston`] |
//! | 3/8 Rule Fourth Order Method | 4 | [`RK438`] |
//!
//! # The [`OdeState`] trait
//!
//! To allow users to use their favorite vector and matrix representations, this crate defines the
//! [`OdeState`] trait. As long as the ODE state trait is implemented for a type, you can use that
//! type to define an ODE to be solved using this crate.
//!
//! This crate already defines the [`OdeState`] for a variety of different types from the standard
//! library, `nalgebra`, `ndarray`, `faer`, and `linalg-traits`. For a full list, refer to the
//! [`OdeState`] documentation. This crate also provides macros to automate the implementation of
//! the [`OdeState`] trait for types that implement `linalg_traits::Scalar`,
//! `linalg_traits::Vector`, or `linalg_traits::Matrix` traits.
//!
//! | Macro | Description |
//! | ----- | ----------- |
//! | [`impl_ode_state_for_scalar!`] | Implement [`OdeState`] for a scalar type already implementing the [`linalg_traits::Scalar`](https://docs.rs/linalg-traits/latest/linalg_traits/trait.Scalar.html) trait. |
//! | [`impl_ode_state_for_dvector!`] | Implement [`OdeState`] for a dynamically-sized vector type already implementing the [`linalg_traits::Vector`](https://docs.rs/linalg-traits/latest/linalg_traits/trait.Vector.html) trait. |
//! | [`impl_ode_state_for_svector!`] | Implement [`OdeState`] for a statically-sized vector type already implementing the [`linalg_traits::Vector`](https://docs.rs/linalg-traits/latest/linalg_traits/trait.Vector.html) trait. |
//! | [`impl_ode_state_for_dmatrix!`] | Implement [`OdeState`] for a dynamically-sized matrix type already implementing the [`linalg_traits::Matrix`](https://docs.rs/linalg-traits/latest/linalg_traits/trait.Matrix.html) trait. |
//! | [`impl_ode_state_for_smatrix!`] | Implement [`OdeState`] for a statically-sized matrix type already implementing the [`linalg_traits::Matrix`](https://docs.rs/linalg-traits/latest/linalg_traits/trait.Matrix.html) trait. |
//!
//! # Bouncing Ball Example
//!
//! TODO
// Linter setup.
// Module declarations.
pub
pub
pub
pub
pub
// Re-exports.
pub use crate;
pub use crateEventManager;
pub use crateEventDetectionMethod;
pub use crateIntegrator;
pub use crate;
pub use crate;
pub use crateSolution;
pub use cratesolve_ivp;