Function lattice_qcd_rs::su3::get_t

source ·
pub fn get_t(m: CMatrix2) -> CMatrix3
Expand description

Embed a Matrix2 inside Matrix3 leaving the first row and column be the same as identity.

Example

let m1 = CMatrix2::new(
    Complex::from(1_f64),
    Complex::from(2_f64),
    // ---
    Complex::from(3_f64),
    Complex::from(4_f64),
);

let m2 = CMatrix3::new(
    Complex::from(1_f64),
    Complex::from(0_f64),
    Complex::from(0_f64),
    // ---
    Complex::from(0_f64),
    Complex::from(1_f64),
    Complex::from(2_f64),
    // ---
    Complex::from(0_f64),
    Complex::from(3_f64),
    Complex::from(4_f64),
);
assert_eq_matrix!(get_t(m1), m2, f64::EPSILON);