Peroxide
Pure Rust numeric library contains linear algebra, numerical analysis, statistics and machine learning tools with R, MATLAB, Python like macros.
Latest README version
Corresponding to 0.8.7
.
Install
- Add next line to your
cargo.toml
= "0.8"
Module Structure
- src
- bin : For test some libraries
- lib.rs :
mod
andre-export
- ml : For machine learning (Beta)
- macros : Macro files
- matlab_macro.rs : MATLAB like macro
- mod.rs
- r_macro.rs : R like macro
- numerical : To do numerical things
- bdf.rs : Backward Differentiation Formula
- gauss_legendre.rs : Gauss-Legendre 4th order
- interp.rs : Interpolation
- mod.rs
- newton.rs : Newton's Method
- ode.rs : Merge all ODE algorithm to one module
- runge_kutta.rs : Runge Kutta 4th order
- spline.rs : Natural Spline
- utils.rs : Utils to do numerical things (e.g. jacobian)
- operation : To define general operations
- statistics : Statistical Tools
- structure : Fundamental data structures
- dataframe.rs : Not yet implemented
- dual.rs : Dual number system for automatic differentiation
- matrix.rs : Matrix
- multinomial.rs : For multinomial (Beta)
- mod.rs
- polynomial.rs : Polynomial
- vector.rs : Extra tools for
Vec<f64>
- util
- mod.rs
- api.rs : Matrix constructor for various language style
- non_macro.rs : Primordial version of macros
- print.rs : To print conveniently
- useful.rs : Useful utils to implement library
Documentation
There is Peroxide Gitbook
Not yet documentized contents
Polynomial
// Peroxide
extern crate peroxide;
use *;
Interpolation (Beta)
- Lagrange polynomial interpolation
- Chebyshev nodes
// Peroxide
extern crate peroxide;
use *;
Spline (Beta)
- Natural cubic spline
// Peroxide
extern crate peroxide;
use *;
MATLAB like macro
zeros
- zero vector or matrixeye
- identity matrixrand
- random matrix (range from 0 to 1)
Automatic Differentiation
- Implemented AD with dual number structure.
- Available functions
sin, cos, tan
pow, powf
+,-,x,/
exp, ln
extern crate peroxide;
use *;
Jacobian
- Implemented by AD - Exact Jacobian
extern crate peroxide;
use *;
// f(t, x) = 3t^2 * x
Ordinary Differential Equation
- Solve 1st order ODE with various methods
- Explicit Method
RK4
: Runge-Kutta 4th order
- Implicit Method
BDF1
: Backward EulerGL4
: Gauss-Legendre 4th order
Caution
- input function should have form
(Dual, Vec<Dual>) -> Vec<Dual>
// Lotka-Volterra
extern crate peroxide;
use *;
Version Info
To see RELEASES.md
TODO
To see TODO.md