lineas

Crates.iolineas
lib.rslineas
version0.1.1
sourcesrc
created_at2022-09-03 20:30:51.726145
updated_at2022-09-07 12:22:07.019728
descriptionA mathematical linear algebra library for Rust
homepagehttps://github.com/RosiePuddles/lineas
repositoryhttps://github.com/RosiePuddles/lineas
max_upload_size
id658043
size108,338
nxe (RosiePuddles)

documentation

https://docs.rs/crate/lineas

README

Lineas

Linear algebra in Rust

crate.io version badge docs.rs docs status badge

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.

Examples

Use lines

If you want to use a matrix, you ned to import it. Operations are included as default too.

use lineas::Matrix;

A new 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

DTypes

You can change the dtype (data type taken from NumPy) with the dtype function

Matrix::new([[1, 2], [3, 4]]).dtype::<f32>();

Decomposition

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();

Contribute

If you want to contribute, feel free. That is the nature of open source after all. Do a pull request or something.

Commit count: 12

cargo fmt