Fixed warning

release/4.3a0
Frank 2016-02-17 12:36:57 -08:00
parent 52fff13b6f
commit a10f462fef
1 changed files with 8 additions and 8 deletions

View File

@ -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));
} }
/* ************************************************************************* */ /* ************************************************************************* */