# [−][src]Crate peroxide

peroxide is comprehensive numerical library for Rust.

## Components

peroxide has various components for scientific computation.

• Linear Algebra (with BLAS & LAPACK)
• Statistics
• Special functions (Using puruspe crate)
• Gaussian
• Gamma
• Beta
• Error
• Incomplete Gamma
• Incomplete Beta
• Automatic Differentiation
• Numerical Utils
• Optimization
• 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
• Communication with Python
• DataFrame
• Read & Write with netcdf or csv format
• Macros

And all these things are built on mathematical traits.

## Quick Start

### Cargo.toml

• To use peroxide, you should edit Cargo.toml
• Current document version is corresponding to 0.25.0
1. Default
[dependencies]
peroxide = "0.25"

2. OpenBLAS & SIMD
[dependencies.peroxide]
version = "0.25"
default-features = false
features = ["O3"]

3. Plot
[dependencies.peroxide]
version = "0.25"
default-features = false
features = ["plot"]

4. DataFrame
[dependencies.peroxide]
version = "0.25"
default-features = false
features = ["dataframe"]

5. Together
[dependencies.peroxide]
version = "0.25"
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

• After 0.23.0, there are two options - fuga, prelude. Choose proper option for your computations.
• After 0.21.4, if size of matrix is smaller than 1000 x 1000, default is more effective than O3 feature.
• 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) cbind R like cbind dnorm R like dnorm dt R like dt 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 pnorm pt R like pt 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