Fix argument to const &
parent
18f4d8b24c
commit
549e0b1e64
|
@ -47,8 +47,9 @@ void updateAb(MATRIX& Ab, int j, const Vector& a, const Vector& rd) {
|
|||
|
||||
/* ************************************************************************* */
|
||||
// check *above the diagonal* for non-zero entries
|
||||
boost::optional<Vector> checkIfDiagonal(const Matrix M) {
|
||||
boost::optional<Vector> checkIfDiagonal(const Matrix& M) {
|
||||
size_t m = M.rows(), n = M.cols();
|
||||
assert(m > 0);
|
||||
// check all non-diagonal entries
|
||||
bool full = false;
|
||||
size_t i, j;
|
||||
|
@ -92,7 +93,7 @@ Gaussian::shared_ptr Gaussian::SqrtInformation(const Matrix& R, bool smart) {
|
|||
return Diagonal::Sigmas(diagonal->array().inverse(), true);
|
||||
}
|
||||
// NOTE(frank): only reaches here if !(smart && diagonal)
|
||||
return shared_ptr(new Gaussian(R.rows(), R));
|
||||
return boost::make_shared<Gaussian>(R.rows(), R);
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
|
@ -108,7 +109,7 @@ Gaussian::shared_ptr Gaussian::Information(const Matrix& information, bool smart
|
|||
else {
|
||||
Eigen::LLT<Matrix> llt(information);
|
||||
Matrix R = llt.matrixU();
|
||||
return shared_ptr(new Gaussian(n, R));
|
||||
return boost::make_shared<Gaussian>(n, R);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -732,7 +732,7 @@ namespace gtsam {
|
|||
};
|
||||
|
||||
// Helper function
|
||||
GTSAM_EXPORT boost::optional<Vector> checkIfDiagonal(const Matrix M);
|
||||
GTSAM_EXPORT boost::optional<Vector> checkIfDiagonal(const Matrix& M);
|
||||
|
||||
} // namespace noiseModel
|
||||
|
||||
|
|
Loading…
Reference in New Issue