Fixed warning
parent
52fff13b6f
commit
a10f462fef
|
@ -82,13 +82,13 @@ Gaussian::shared_ptr Gaussian::SqrtInformation(const Matrix& R, bool smart) {
|
||||||
size_t m = R.rows(), n = R.cols();
|
size_t m = R.rows(), n = R.cols();
|
||||||
if (m != n)
|
if (m != n)
|
||||||
throw invalid_argument("Gaussian::SqrtInformation: R not square");
|
throw invalid_argument("Gaussian::SqrtInformation: R not square");
|
||||||
boost::optional<Vector> diagonal = boost::none;
|
if (smart) {
|
||||||
if (smart)
|
boost::optional<Vector> diagonal = checkIfDiagonal(R);
|
||||||
diagonal = checkIfDiagonal(R);
|
if (diagonal)
|
||||||
if (diagonal)
|
return Diagonal::Sigmas(diagonal->array().inverse(), true);
|
||||||
return Diagonal::Sigmas(diagonal->array().inverse(), true);
|
}
|
||||||
else
|
// NOTE(frank): only reaches here if !smart && !diagonal
|
||||||
return shared_ptr(new Gaussian(R.rows(), R));
|
return shared_ptr(new Gaussian(R.rows(), R));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
Loading…
Reference in New Issue