From 29558ed56c8a69a4fb68c8d5dd2e123e9d702db2 Mon Sep 17 00:00:00 2001 From: axect Date: Tue, 9 Apr 2024 19:12:52 +0900 Subject: [PATCH] RLSE: Ver 0.36.1 - Generic Butcher Tableau - Fix all warnings - More & safe non-macro --- Cargo.toml | 2 +- RELEASES.md | 36 ++++++++++++++++++++++++++++++++++++ src/numerical/ode.rs | 1 - 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 87a8dbbe..1a120447 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "peroxide" -version = "0.36.0" +version = "0.36.1" 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 f3df7bbd..0793cd66 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,39 @@ +# Release 0.36.1 (2024-04-09) + +- Fix all warnings in peroxide +- Change redundant method + - `Vec::resize` -> `Vec::reshape` +- Error handling for concatenation + - `cbind` & `rbind` now returns `Result` +- New non-macro utils + - `column_stack(&[Vec]) -> Result` + - `row_stack(&[Vec]) -> Result` + - `rand_with_rng(usize, usize, &mut Rng) -> Matrix` +- Generic Butcher tableau trait (now for embedded Runge-Kutta methods) + + ```rust + pub trait ButcherTableau { + const C: &'static [f64]; + const A: &'static [&'static [f64]]; + const BH: &'static [f64]; + const BL: &'static [f64]; + + fn tol(&self) -> f64; + fn safety_factor(&self) -> f64; + fn max_step_size(&self) -> f64; + fn min_step_size(&self) -> f64; + fn max_step_iter(&self) -> usize; + } + ``` + + - Implement `ODEIntegrator` for `ButcherTableau` + - Just declare `ButcherTableau` then `step` is free + + - Three available embedded Runge-Kutta methods + - `RKF45`: Runge-Kutta-Fehlberg 4/5th order + - `DP45`: Dormand-Prince 4/5th order + - `TSIT45`: Tsitouras 4/5th order + # Release 0.36.0 (2024-04-08) ## Huge Update - Error handling & Whole new ODE diff --git a/src/numerical/ode.rs b/src/numerical/ode.rs index 0d665e5a..fbfe846e 100644 --- a/src/numerical/ode.rs +++ b/src/numerical/ode.rs @@ -259,7 +259,6 @@ pub trait ButcherTableau { fn max_step_size(&self) -> f64; fn min_step_size(&self) -> f64; fn max_step_iter(&self) -> usize; - } impl ODEIntegrator for BT {