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

Function test_det

tests/linalg.rs:61–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59#[cfg(feature = "nc")]
60#[test]
61fn test_det() {
62 for i in 5..21 {
63 let df = DataFrame::read_nc_by_header(
64 &format!("test_data/rand_mat/randmat_{}.nc", i),
65 vec!["m", "det"],
66 )
67 .unwrap();
68 let a_vec: Vec<f64> = df["m"].to_vec();
69 let a: Matrix = matrix(a_vec, i, i, Col);
70 let b: f64 = df["det"].at(0).unwrap();
71 let c = a.det();
72 assert!((b - c).abs() <= 1e-10);
73 }
74}
75
76#[cfg(feature = "nc")]
77#[test]

Callers

nothing calls this directly

Calls 4

matrixFunction · 0.85
atMethod · 0.80
to_vecMethod · 0.45
detMethod · 0.45

Tested by

no test coverage detected