[−][src]Crate mathru
mathru
A crate that provides mathematics functions implemented entirely in Rust.
Usage
The library usage is described well in the API documentation - including example code.
Add this to your Cargo.toml
:
[dependencies]
mathru = "0.1.0"
And then import the library using:
extern crate mathru;
Then import the modules and it is ready to be used:
extern crate mathru; use mathru::algebra::linear::{Matrix}; // Compute the LU decomposition of a 2x2 matrix let a: Matrix<f64> = Matrix::new(2, 2, vec![1.0, -2.0, 3.0, -7.0]); let l_ref: Matrix<f64> = Matrix::new(2, 2, vec![1.0, 0.0, 1.0 / 3.0, 1.0]); let (l, u, p): (Matrix<f64>, Matrix<f64>, Matrix<f64>) = a.dec_lu(); assert_eq!(l_ref, l);
Modules
algebra | Algebra |
elementary | Elementary functions |
num | |
special | Special functions |
stats | Statistics |
Macros
Complex | |
Complex32 | |
Complex64 | |
matrix | use serde::de::{Deserialize}; Macro to construct matrices |
vector | Macro to construct vectores |