Function peroxide::structure::matrix::inv_l

source ·
pub fn inv_l(l: Matrix) -> Matrix
Expand description

Inverse of Lower matrix

§Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = matrix(c!(1,0,2,1), 2, 2, Row);
    assert_eq!(inv_l(a), matrix(c!(1,0,-2,1), 2, 2, Row));

    let b = matrix(c!(1,0,0,2,1,0,4,3,1), 3, 3, Row);
    assert_eq!(inv_l(b), matrix(c!(1,0,0,-2,1,0,2,-3,1), 3, 3, Row));
}