Skip to main content

Module solve

Module solve 

Source
Expand description

Linear system solving utilities for equations of the form Ax = B

use mdarray_linalg_backend::Backend; // Use the real backend here, Lapack, Faer, ...
let bd = Backend::default();
use mdarray_linalg::solve::Solve;

let a = darray![[2.0_f64, 1.0, 0.0], [1.0, 3.0, 1.0], [0.0, 1.0, 2.0]];
let b = darray![[1.0_f64], [2.0], [1.0]];

let xr = Lapack::default().solve(&mut a.clone(), &b);

let x = xr.unwrap();
let ax = Naive.matvec(&a, &x.view(.., 0)).eval(); // Ax = b

Enums§

SolveError
Error types related to linear system solving

Traits§

Solve
Linear system solver.