|
|
@ -69,6 +69,14 @@ fn test_validate_params_valid_cim() { |
|
|
|
assert_eq!(Ok(()), param.validate_params()); |
|
|
|
assert_eq!(Ok(()), param.validate_params()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[test] |
|
|
|
|
|
|
|
fn test_validate_params_valid_cim_with_huge_values() { |
|
|
|
|
|
|
|
let mut param = utils::generate_discrete_time_continous_param(3); |
|
|
|
|
|
|
|
let cim = array![[[-2e10, 1e10, 1e10], [1.5e10, -3e10, 1.5e10], [1e10, 1e10, -2e10]]]; |
|
|
|
|
|
|
|
let result = param.set_cim(cim); |
|
|
|
|
|
|
|
assert_eq!(Ok(()), result); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#[test] |
|
|
|
#[test] |
|
|
|
fn test_validate_params_cim_not_initialized() { |
|
|
|
fn test_validate_params_cim_not_initialized() { |
|
|
|
let param = utils::generate_discrete_time_continous_param(3); |
|
|
|
let param = utils::generate_discrete_time_continous_param(3); |
|
|
@ -80,7 +88,6 @@ fn test_validate_params_cim_not_initialized() { |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[test] |
|
|
|
#[test] |
|
|
|
fn test_validate_params_wrong_shape() { |
|
|
|
fn test_validate_params_wrong_shape() { |
|
|
|
let mut param = utils::generate_discrete_time_continous_param(4); |
|
|
|
let mut param = utils::generate_discrete_time_continous_param(4); |
|
|
@ -94,7 +101,6 @@ fn test_validate_params_wrong_shape() { |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[test] |
|
|
|
#[test] |
|
|
|
fn test_validate_params_positive_diag() { |
|
|
|
fn test_validate_params_positive_diag() { |
|
|
|
let mut param = utils::generate_discrete_time_continous_param(3); |
|
|
|
let mut param = utils::generate_discrete_time_continous_param(3); |
|
|
@ -108,7 +114,6 @@ fn test_validate_params_positive_diag() { |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[test] |
|
|
|
#[test] |
|
|
|
fn test_validate_params_row_not_sum_to_zero() { |
|
|
|
fn test_validate_params_row_not_sum_to_zero() { |
|
|
|
let mut param = utils::generate_discrete_time_continous_param(3); |
|
|
|
let mut param = utils::generate_discrete_time_continous_param(3); |
|
|
|