Crates.io | lineas |
lib.rs | lineas |
version | 0.1.1 |
source | src |
created_at | 2022-09-03 20:30:51.726145 |
updated_at | 2022-09-07 12:22:07.019728 |
description | A mathematical linear algebra library for Rust |
homepage | https://github.com/RosiePuddles/lineas |
repository | https://github.com/RosiePuddles/lineas |
max_upload_size | |
id | 658043 |
size | 108,338 |
This fast and simple-to-use library provides the ability to perform linear algebra within Rust. It provides matrices and vectors as well as complex numbers for all your computing needs.
If you want to use a matrix, you ned to import it. Operations are included as default too.
use lineas::Matrix;
Matrix::new([[1, 2, 3], [4, 5, 6]]);
Make sure that the array you give is two dimensional and that each element is the same size
You can change the dtype (data type taken from NumPy) with the dtype
function
Matrix::new([[1, 2], [3, 4]]).dtype::<f32>();
If you need to use decompositions, you'll need to specify that:
use lineas::decompose::{
LUDecompose,
PLUDecompose,
Diagonalise
};
let a = Matrix::new([[1, 2], [3, 4]]);
a.lu_decompose();
a.plu_decompose();
a.diagonalise();
If you want to contribute, feel free. That is the nature of open source after all. Do a pull request or something.