mathru
Mathru is a numeric library containing algorithms for linear algebra, analysis and statistics written in pure Rust with BLAS/LAPACK support.
Features
The following features are impelmented in this create:
-
- Vector
- Matrix
- Basic matrix operations(+,-,*)
- Transposition
- LU decomposition
- QR decomposition
- Hessenberg decomposition
- Cholesky decomposition
- Singular value decomposition
- Inverse
- Pseudo inverse
- Determinant
- Trace
- Eigenvalue
- Solve linear system
-
Ordinary differential equation (ODE)
- Explicit methods
- Heun's method
- Euler method
- Midpoint method
- Ralston's method
- Kutta 3rd order
- Runge-Kutta 4th order
- Runge-Kutta-Felhberg 4(5)
- Dormand-Prince 4(5)
- Cash-Karp 4(5)
- Tsitouras 4(5)
- Bogacki-Shampine 2(3)
- Adams-Bashforth
- Automatic step size control with starting step size
- Implizit methods
- Implizit Euler
- Explicit methods
-
- Gauss-Newton algorithm
- Gradient descent
- Newton method
- Levenberg-Marquardt algorithm
- Conjugate gradient method
-
- probability distribution
- Bernoulli
- Beta
- Binomial
- Exponential
- Gamma
- Chi-squared
- Normal
- Poisson
- Raised cosine
- Student-t
- Uniform
- test
- Chi-squared
- G
- Student-t
- probability distribution
-
elementary functions
- trigonometric functions
- hyperbolic functions
- exponential functions
-
special functions
- gamma functions
- beta functions
- hypergeometrical functions
Usage
Add this to your Cargo.toml
for the native Rust implementation:
[]
= "^0.6"
Add the following lines to 'Cargo.toml' if the blas/lapack backend should be used:
[]
= "^0.6"
= false
= ["blaslapack"]
Then import the modules and it is ready to be used.
Documentation
See project page for more information and examples. The API is documented on docs.rs.
License
Licensed under
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Contribution
Any contribution is welcome!