Peroxide Versions Save

Rust numeric library with R, MATLAB & Python syntax

v0.37.0

2 weeks ago

Release 0.37.0 (2024-04-14)

Huge Update - Whole new Root finding & anyhow

Whole new Root finding

  • Remove all boilerplates
  • Now, RootFinding is composed of traits
    • RootFindingProblem<const I: usize, const O: usize, T>: Trait for defining and root finding problem
      • I: Input dimension
      • O: Output dimension
      • T: Type of state
    • RootFinder: Trait for finding root
      • BisectionMethod: Bisection Method (I=1, O=1, T=(f64, f64))
      • FalsePositionMethod: False Position Method (I=1, O=1, T=(f64, f64))
      • NewtonMethod: Newton Method (I=1, O=1, T=f64)
      • SecantMethod: Secant Method (I=1, O=1, T=(f64, f64))

Error handling with anyhow

  • Remove thiserror dependency
  • Add anyhow for error handling
  • Change error handling in ODE, Spline, WeightedUniform

Full Changelog: https://github.com/Axect/Peroxide/compare/v0.36.4...v0.37.0

v0.36.4

3 weeks ago

Release 0.36.4 (2024-04-11)

  • More generic Butcher tableau
    • Now, you can use ButcherTableau for non-embedded methods too
  • More ODE integrators
    • RALS3, RALS4, RK5, BS23

Full Changelog: https://github.com/Axect/Peroxide/compare/v0.36.2...v0.36.4

v0.36.2

3 weeks ago

Release 0.36.2 (2024-04-10)

  • Now, you can report current states if your constraints are violated.
    • ODEError::ConstraintViolation -> ODEError::ConstraintViolation(f64, Vec<f64>, Vec<f64>)
    • for detailed information, see docs for ODEError
  • Add docs for ODEError

Full Changelog: https://github.com/Axect/Peroxide/compare/v0.36.1...v0.36.2

v0.36.1

3 weeks ago

Release 0.36.1 (2024-04-09)

  • Fix all warnings in peroxide

  • Change redundant method

    • Vec<f64>::resize -> Vec<f64>::reshape
  • Error handling for concatenation

    • cbind & rbind now returns Result<Matrix, ConcatenateError>
  • New non-macro utils

    • column_stack(&[Vec<f64>]) -> Result<Matrix, ConcatenateError>
    • row_stack(&[Vec<f64>]) -> Result<Matrix, ConcatenateError>
    • rand_with_rng(usize, usize, &mut Rng) -> Matrix
  • Generic Butcher tableau trait (now for embedded Runge-Kutta methods)

    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

Full Changelog: https://github.com/Axect/Peroxide/compare/v0.36.0...v0.36.1

v0.36.0

3 weeks ago

Release 0.36.0 (2024-04-08)

Huge Update - Error handling & Whole new ODE

Error handling

  • Add thiserror for error handling
  • Implement errors for cubic spline & cubic hermite spline.
  • Implement errors for weighted uniform distribution & PRS.

Seedable sampling

  • Now, all distribution has sample_with_rng method.
  • There are two wrappers for SeedableRng
    • smallrng_from_seed : Performant but not secure
    • stdrng_from_seed : Performant enough and secure enough

Whole new ODE

  • Remove all boilerplates.
  • Now, ODE is composed of traits.
    • ODEProblem: Trait for defining and ODE problem.
    • ODEIntegrator: Trait for integrating ODE.
      • RK4: Runge-Kutta 4th order
      • RKF45: Runge-Kutta-Fehlberg 4/5th order
      • GL4: Gauss-Legendre 4th order
      • You can implement your own integrator.
    • ODESolver: Trait for solving ODE.
      • BasicODESolver: Basic ODE solver - define range of t, initial step size and integrate it.
      • You can implement your own solver.
  • For more information, see docs for ode.

Full Changelog: https://github.com/Axect/Peroxide/compare/v0.35.1...v0.36.0

v0.34.7

1 month ago

More updates for plot feature

  • Make legend optional (Now, no legend is available)
  • Implement set_line_style. Here are available line styles.
    • LineStyle::Solid
    • LineStyle::Dashed
    • LineStyle::Dotted
    • LineStyle::DashDot
  • Implement set_color
  • Implement set_alpha
  • More markers.

Getter for ODE

  • Add explicit getter for ExplicitODE and ImplicitODE for various fields.

Full Changelog: https://github.com/Axect/Peroxide/compare/v0.34.6...v0.34.7