From a81534f4db319cb184ffa2d0d2f4495060d19da0 Mon Sep 17 00:00:00 2001 From: Vinzent Steinberg Date: Fri, 2 Jun 2017 13:32:18 +0200 Subject: [PATCH] Cholesky: Fix misleading error message The diagonals of the *demoposed* matrix were negative, which means the original matrix was not positive definite (even the the diagonal was positive). --- src/matrix/decomposition/cholesky.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/decomposition/cholesky.rs b/src/matrix/decomposition/cholesky.rs index 4d87990..e99c5a8 100644 --- a/src/matrix/decomposition/cholesky.rs +++ b/src/matrix/decomposition/cholesky.rs @@ -154,7 +154,7 @@ impl Cholesky where T: 'static + Float { "Matrix is singular to working precision.")); } else if diagonal < T::zero() { return Err(Error::new(ErrorKind::DecompFailure, - "Diagonal entries of matrix are not all positive.")); + "Matrix is not positive definite.")); } let divisor = diagonal.sqrt();