[−][src]Crate peroxide
peroxide
is comprehensive numerical library for Rust.
Components
peroxide
has various components for scientific computation.
- Linear Algebra (with BLAS & LAPACK)
- Matrix operations
+,-,*,/
- LU, Determinant, Inverse
- QR Decomposition
- Singular Value Decomposition
- Reduced Row Echelon Form
- Vector operations
- Eigenvalue, Eigenvector algorithms
- Matrix operations
- Statistics
- Statistical operations
mean, var, sd
factorial, P, C, H
- Distributions
- Bernoulli
- Uniform
- Binomial
- Normal
- Gamma
- Beta
- Student's t
- Statistical operations
- Special functions (Using
puruspe
crate)- Gaussian
- Gamma
- Beta
- Error
- Incomplete Gamma
- Incomplete Beta
- Automatic Differentiation
- Numerical Utils
- Optimization
- Gradient Descent
- Levenberg-Marquardt
- Root Finding
- Bisection
- False Position (Regula falsi)
- Secant
- Newton
- Differential Equations
- Explicit
- Runge-Kutta 4th order
- Euler methods
- Implicit
- Backward Euler
- Gauss-Legendre 4th order
- Explicit
- Communication with Python
- DataFrame
- Read & Write with
netcdf
orcsv
format
- Read & Write with
- Macros
And all these things are built on mathematical traits.
- Traits
Quick Start
Cargo.toml
- To use
peroxide
, you should editCargo.toml
- Current document version is corresponding to
0.27.0
- Default
[dependencies] peroxide = "0.27"
- OpenBLAS
[dependencies.peroxide] version = "0.27" default-features = false features = ["O3"]
- Plot
[dependencies.peroxide] version = "0.27" default-features = false features = ["plot"]
- DataFrame
[dependencies.peroxide] version = "0.27" default-features = false features = ["dataframe"]
- Together
[dependencies.peroxide] version = "0.27" default-features = false features = ["O3", "plot", "dataframe"]
Import all at once
Peroxide has two options.
To see differences, follow above two links.
You can import all functions & structures at once
prelude
#[macro_use] extern crate peroxide; use peroxide::prelude::*; fn main() { // Write what you want }
fuga
#[macro_use] extern crate peroxide; use peroxide::fuga::*; fn main() { // Write what you want }
Useful tips for features
- If you want to use
QR
orSVD
then should useO3
feature (there are no implementations for these decompositions indefault
) - If you want to write your numerical results, then use
dataframe
feature andnetcdf
format. (It is much more effective thancsv
andjson
.) - After
0.23.0
, there are two options -fuga
,prelude
. Choose proper option for your computations. - To plot, use
dataframe
to export data as netcdf format and use python to draw plot.plot
feature has limited plot abilities.- There is a template of python code. - Socialst
Modules
fuga | Choose what you want. |
macros | Useful macros |
ml | Machine learning tools |
numerical | Differential equations & Numerical Analysis tools |
prelude | Do not disturbed. Just use. |
special | Special function module |
statistics | Statistical Modules |
structure | Main structures for peroxide |
traits | |
util | Utility - plot, print, pickle and etc. |
Macros
c | R like concatenate (Type: Vec<f64>) |
cbind | R like cbind |
dnorm | R like |
dt | R like |
eye | MATLAB like eye - identity matrix |
hstack | |
linspace | MATLAB like linspace |
lm | R like lm |
matrix | More R like Matrix constructor (Macro) |
pnorm | R like |
pt | R like |
rand | MATLAB like rand - random matrix |
rbind | R like rbind |
rnorm | R like random normal |
rt | R like random Student's t |
runif | R like random uniform |
seq | R like seq macro |
vstack | |
zeros | MATLAB like zeros - zero matrix |