mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-08-20 13:00:00 +00:00
Compare commits
3 Commits
88245b59e4
...
ddc4a71f76
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ddc4a71f76 | ||
![]() |
2cd2e24f57 | ||
![]() |
61aeedbf76 |
@ -360,6 +360,7 @@ mod tests {
|
|||||||
|
|
||||||
// <0 case
|
// <0 case
|
||||||
assert_eq!(gamma_pdf_func(-1.0, 1.0, 1.0), 0.0);
|
assert_eq!(gamma_pdf_func(-1.0, 1.0, 1.0), 0.0);
|
||||||
|
assert_eq!(gamma_cdf_func(-1.0, 1.0, 1.0), 0.0);
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn test_gamma_matrix() {
|
fn test_gamma_matrix() {
|
||||||
@ -376,11 +377,6 @@ mod tests {
|
|||||||
let x = Matrix::filled(5, 5, 1.0);
|
let x = Matrix::filled(5, 5, 1.0);
|
||||||
let expected = lower_incomplete_gamma_func(2.0, 1.0);
|
let expected = lower_incomplete_gamma_func(2.0, 1.0);
|
||||||
let result = lower_incomplete_gamma(s, x);
|
let result = lower_incomplete_gamma(s, x);
|
||||||
assert!(
|
assert!((result.data()[0] - expected).abs() < 1e-7);
|
||||||
(result.data()[0] - expected).abs() < 1e-7,
|
|
||||||
"Expected: {}, Got: {}",
|
|
||||||
expected,
|
|
||||||
result.data()[0]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user