diff --git a/Cargo.toml b/Cargo.toml index 4b38f596..a1e0ef1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "peroxide" -version = "0.37.1" +version = "0.37.2" authors = ["axect "] edition = "2018" description = "Rust comprehensive scientific computation library contains linear algebra, numerical analysis, statistics and machine learning tools with farmiliar syntax" diff --git a/RELEASES.md b/RELEASES.md index 2bb06fd9..f7ee308d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,13 @@ +# Release 0.37.2 (2024-04-16) + +- Do not include legend box if there is no legend ([#58](https://github.com/Axect/Peroxide/pull/58)) (Thanks to [@GComitini](https://github.com/GComitini)) +- Add `rtol` field to `BroydenMethod` +- Implement high-level macros for root finding + - `bisection!(f, (a,b), max_iter, tol)` + - `newton!(f, x0, max_iter, tol)` (require `#[ad_function]` attribute) + - `secant!(f, (a,b), max_iter, tol)` + - `false_position!(f, (a,b), max_iter, tol)` + # Release 0.37.1 (2024-04-15) - Implement `BrodenMethod`: Broyden's method (`I>=1, O>=1, T=([f64; I], [f64; I])`) diff --git a/examples/broyden_test.rs b/examples/broyden_test.rs index 164f4c4b..6ddf5653 100644 --- a/examples/broyden_test.rs +++ b/examples/broyden_test.rs @@ -3,7 +3,7 @@ use peroxide::numerical::root::{Pt, Intv}; fn main() -> Result<(), Box> { let problem = Quadratic; - let broyden = BroydenMethod { max_iter: 100, tol: 1e-6 }; + let broyden = BroydenMethod { max_iter: 100, tol: 1e-6, rtol: 1e-6 }; let root = broyden.find(&problem)?; let result = problem.function(root)?; diff --git a/src/numerical/root.rs b/src/numerical/root.rs index 5fabfa7d..33a04cb1 100644 --- a/src/numerical/root.rs +++ b/src/numerical/root.rs @@ -781,7 +781,7 @@ impl RootFinder<1, 1, (f64, f64)> for FalsePositionMethod { /// /// fn main() -> Result<(), Box> { /// let problem = CircleTangentLine; -/// let broyden = BroydenMethod { max_iter: 100, tol: 1e-6 }; +/// let broyden = BroydenMethod { max_iter: 100, tol: 1e-6, rtol: 1e-6 }; /// /// let root = broyden.find(&problem)?; /// let result = problem.function(root)?;