MCPcopy Create free account
hub / github.com/Open-Quant/openquant / test_m2n_constructor

Function test_m2n_constructor

crates/openquant/tests/ef3m.rs:4–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2use openquant::util::InputError;
3
4#[test]
5fn test_m2n_constructor() {
6 let moments = vec![1.0, 2.0, 3.0, 4.0, 5.0];
7 let m2n = M2N::with_defaults(moments.clone());
8 assert_eq!(m2n.moments, moments);
9 assert_eq!(m2n.new_moments, vec![0.0; 5]);
10 assert_eq!(m2n.parameters, vec![0.0; 5]);
11 assert!((m2n.error - 55.0).abs() < 1e-12);
12}
13
14#[test]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected