pub fn a_times_b_inv<T: Scalar>(a: &Matrix<T>, b: &Matrix<T>) -> Matrix<T>Expand description
Calculates A * B^{-1} using Gaussian elimination.
§Panics
Panics if the number of columns of a does not match the dimensions of b,
or if b is not square.
§Examples
use tensor4all_tcicore::{from_vec2d, matrix::a_times_b_inv};
let a = from_vec2d(vec![vec![2.0_f64, 0.0], vec![0.0, 4.0]]);
let b = from_vec2d(vec![vec![1.0, 0.0], vec![0.0, 2.0]]);
let result = a_times_b_inv(&a, &b);
assert!((result[[0, 0]] - 2.0).abs() < 1e-10);
assert!((result[[1, 1]] - 2.0).abs() < 1e-10);