MCPcopy Create free account
hub / github.com/Axect/Peroxide / test_inverse

Function test_inverse

tests/linalg.rs:7–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5#[cfg(feature = "nc")]
6#[test]
7fn test_inverse() {
8 for i in 5..21 {
9 let df = DataFrame::read_nc_by_header(
10 &format!("test_data/rand_mat/randmat_{}.nc", i),
11 vec!["m", "inv"],
12 )
13 .unwrap();
14 let a_vec: Vec<f64> = df["m"].to_vec();
15 let b_vec: Vec<f64> = df["inv"].to_vec();
16 let a: Matrix = matrix(a_vec, i, i, Col);
17 let b: Matrix = matrix(b_vec, i, i, Col);
18 let c = a.inv();
19 assert_eq!(b, c);
20 }
21}
22
23#[cfg(feature = "nc")]
24#[test]

Callers

nothing calls this directly

Calls 3

matrixFunction · 0.85
to_vecMethod · 0.45
invMethod · 0.45

Tested by

no test coverage detected