Function peroxide::complex::matrix::complex_inv_u

source ·
pub fn complex_inv_u(u: ComplexMatrix) -> ComplexMatrix
Expand description

Inverse of upper triangular matrix

§Examples

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

fn main() {
   let a = ml_cmatrix("2.0+2.0i 2.0+2.0i;
                              0.0+0.0i 1.0+1.0i");
   let b = cmatrix(vec![C64::new(0.25f64, -0.25f64),
                               C64::new(-0.5f64, 0.5f64),
                               C64::new(0.0f64, 0.0f64),
                               C64::new(0.5f64, -0.5f64)],
                           2, 2, Row
   );
   assert_eq!(complex_inv_u(a), b);
}