Solve conflic with num-traits (#130)

* Solve conflic with num-traits

* Fix clippy warnings

Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
This commit is contained in:
morenol
2022-05-05 10:39:18 -04:00
committed by GitHub
parent 12c102d02b
commit 820201e920
23 changed files with 58 additions and 65 deletions
+3 -4
View File
@@ -87,8 +87,7 @@ impl<T: RealNumber, M: BaseMatrix<T>> Cholesky<T, M> {
if bn != rn {
return Err(Failed::because(
FailedError::SolutionFailed,
&"Can\'t solve Ax = b for x. Number of rows in b != number of rows in R."
.to_string(),
"Can\'t solve Ax = b for x. Number of rows in b != number of rows in R.",
));
}
@@ -128,7 +127,7 @@ pub trait CholeskyDecomposableMatrix<T: RealNumber>: BaseMatrix<T> {
if m != n {
return Err(Failed::because(
FailedError::DecompositionFailed,
&"Can\'t do Cholesky decomposition on a non-square matrix".to_string(),
"Can\'t do Cholesky decomposition on a non-square matrix",
));
}
@@ -148,7 +147,7 @@ pub trait CholeskyDecomposableMatrix<T: RealNumber>: BaseMatrix<T> {
if d < T::zero() {
return Err(Failed::because(
FailedError::DecompositionFailed,
&"The matrix is not positive definite.".to_string(),
"The matrix is not positive definite.",
));
}