Crates.io | zenu-matrix |
lib.rs | zenu-matrix |
version | 0.1.2 |
source | src |
created_at | 2024-03-02 12:59:52.499402 |
updated_at | 2024-11-14 10:28:42.950227 |
description | Matrix library for ZeNu |
homepage | |
repository | https://github.com/bokutotu/zenu |
max_upload_size | |
id | 1159696 |
size | 555,844 |
ZeNu Matrix is a high-performance linear algebra library for Rust, designed to provide efficient matrix operations and various utilities for working with matrices. Whether you are building complex machine learning models or performing scientific computations, ZeNu Matrix offers the tools you need.
To start using ZeNu Matrix, add it to your Cargo.toml
:
[dependencies]
zenu-matrix = "0.1.1"
Here's a simple example of using ZeNu Matrix:
use zenu_matrix::{
matrix::{IndexItem, OwnedMatrix},
matrix_impl::OwnedMatrixDyn,
operation::asum::Asum,
};
fn main() {
let a = OwnedMatrixDyn::from_vec(vec![1., 2., 3., 4., 5., 6.], [2, 3]);
let b = OwnedMatrixDyn::from_vec(vec![7., 8., 9., 10., 11., 12.], [3, 2]);
let c = a.clone() * b.clone();
assert_eq!(c.index_item([0, 0]), 58.);
assert_eq!(c.index_item([0, 1]), 64.);
assert_eq!(c.index_item([1, 0]), 139.);
assert_eq!(c.index_item([1, 1]), 154.);
}
For more details and examples, please refer to the documentation.
ZeNu Matrix is licensed under the MIT License.