rustebra 0.4.0

A hybrid no_std/alloc linear algebra crate for Rust, scaling from embedded targets to dynamic Krylov subspace solvers.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use rustebra::algorithm::matrix::{cholesky, cholesky_decompose};
use rustebra::storage::StaticStorage;

pub(crate) fn run() {
    println!("\n== Cholesky decomposition ==");
    // [[4, 2], [2, 2]], symmetric positive-definite.
    let a = StaticStorage::new([4.0, 2.0, 2.0, 2.0]);

    let mut l = [0.0; 4];
    cholesky(&a, 2, 2, &mut l).unwrap();
    println!("l = {l:?}");

    let mut l_explicit = [0.0; 4];
    cholesky_decompose(&a, 2, 2, &mut l_explicit, 1e-9).unwrap();
    println!("l (explicit) = {l_explicit:?}");
}