diff --git a/gtsam/linear/GaussianFactor.h b/gtsam/linear/GaussianFactor.h index bb4b20e58..bc14cc670 100644 --- a/gtsam/linear/GaussianFactor.h +++ b/gtsam/linear/GaussianFactor.h @@ -126,7 +126,7 @@ namespace gtsam { * @param scatter A mapping from variable index to slot index in this HessianFactor * @param info The information matrix to be updated */ - virtual void updateATA(const Scatter& scatter, + virtual void updateHessian(const Scatter& scatter, SymmetricBlockMatrix* info) const = 0; /// y += alpha * A'*A*x diff --git a/gtsam/linear/HessianFactor.cpp b/gtsam/linear/HessianFactor.cpp index a5b3e4a9a..0cb813b01 100644 --- a/gtsam/linear/HessianFactor.cpp +++ b/gtsam/linear/HessianFactor.cpp @@ -248,7 +248,7 @@ HessianFactor::HessianFactor(const GaussianFactorGraph& factors, gttic(update); BOOST_FOREACH(const GaussianFactor::shared_ptr& factor, factors) if(factor) - factor->updateATA(*scatter, &info_); + factor->updateHessian(*scatter, &info_); gttoc(update); } @@ -346,7 +346,7 @@ double HessianFactor::error(const VectorValues& c) const { } /* ************************************************************************* */ -void HessianFactor::updateATA(const Scatter& scatter, +void HessianFactor::updateHessian(const Scatter& scatter, SymmetricBlockMatrix* info) const { gttic(updateATA_HessianFactor); // N is number of variables in information matrix, n in HessianFactor diff --git a/gtsam/linear/HessianFactor.h b/gtsam/linear/HessianFactor.h index 50a81b579..160d05b15 100644 --- a/gtsam/linear/HessianFactor.h +++ b/gtsam/linear/HessianFactor.h @@ -344,7 +344,7 @@ namespace gtsam { * @param scatter A mapping from variable index to slot index in this HessianFactor * @param info The information matrix to be updated */ - void updateATA(const Scatter& scatter, SymmetricBlockMatrix* info) const; + void updateHessian(const Scatter& scatter, SymmetricBlockMatrix* info) const; /** y += alpha * A'*A*x */ void multiplyHessianAdd(double alpha, const VectorValues& x, VectorValues& y) const; diff --git a/gtsam/linear/JacobianFactor.cpp b/gtsam/linear/JacobianFactor.cpp index 9d0917919..c960dca04 100644 --- a/gtsam/linear/JacobianFactor.cpp +++ b/gtsam/linear/JacobianFactor.cpp @@ -498,7 +498,7 @@ map JacobianFactor::hessianBlockDiagonal() const { } /* ************************************************************************* */ -void JacobianFactor::updateATA(const Scatter& scatter, +void JacobianFactor::updateHessian(const Scatter& scatter, SymmetricBlockMatrix* info) const { gttic(updateATA_JacobianFactor); @@ -509,10 +509,10 @@ void JacobianFactor::updateATA(const Scatter& scatter, if (model && !model->isUnit()) { if (model->isConstrained()) throw invalid_argument( - "JacobianFactor::updateATA: cannot update information with " + "JacobianFactor::updateHessian: cannot update information with " "constrained noise model"); JacobianFactor whitenedFactor = whiten(); - whitenedFactor.updateATA(scatter, info); + whitenedFactor.updateHessian(scatter, info); } else { // Ab_ is the augmented Jacobian matrix A, and we perform I += A'*A below // N is number of variables in information matrix, n in JacobianFactor diff --git a/gtsam/linear/JacobianFactor.h b/gtsam/linear/JacobianFactor.h index 73f992770..00a9b5488 100644 --- a/gtsam/linear/JacobianFactor.h +++ b/gtsam/linear/JacobianFactor.h @@ -278,7 +278,7 @@ namespace gtsam { * @param scatter A mapping from variable index to slot index in this HessianFactor * @param info The information matrix to be updated */ - void updateATA(const Scatter& scatter, SymmetricBlockMatrix* info) const; + void updateHessian(const Scatter& scatter, SymmetricBlockMatrix* info) const; /** Return A*x */ Vector operator*(const VectorValues& x) const; diff --git a/gtsam/slam/GeneralSFMFactor.h b/gtsam/slam/GeneralSFMFactor.h index be20ee3fa..9a8d613ad 100644 --- a/gtsam/slam/GeneralSFMFactor.h +++ b/gtsam/slam/GeneralSFMFactor.h @@ -149,7 +149,7 @@ namespace gtsam { : JacobianFactor(i1, A1, i2, A2, b, model), AC_(A1), AL_(A2), b_(b) {} // Fixed-size matrix update - void updateATA(const Scatter& scatter, SymmetricBlockMatrix* info) const { + void updateHessian(const Scatter& scatter, SymmetricBlockMatrix* info) const { gttic(updateATA_LinearizedFactor); // Whiten the factor if it has a noise model @@ -157,10 +157,10 @@ namespace gtsam { if (model && !model->isUnit()) { if (model->isConstrained()) throw std::invalid_argument( - "JacobianFactor::updateATA: cannot update information with " + "JacobianFactor::updateHessian: cannot update information with " "constrained noise model"); JacobianFactor whitenedFactor = whiten(); - whitenedFactor.updateATA(scatter, info); + whitenedFactor.updateHessian(scatter, info); } else { // N is number of variables in information matrix DenseIndex N = info->nBlocks() - 1; diff --git a/gtsam/slam/RegularImplicitSchurFactor.h b/gtsam/slam/RegularImplicitSchurFactor.h index f2fc4e819..87d78911d 100644 --- a/gtsam/slam/RegularImplicitSchurFactor.h +++ b/gtsam/slam/RegularImplicitSchurFactor.h @@ -115,10 +115,10 @@ public: return D; } - virtual void updateATA(const Scatter& scatter, + virtual void updateHessian(const Scatter& scatter, SymmetricBlockMatrix* info) const { throw std::runtime_error( - "RegularImplicitSchurFactor::updateATA non implemented"); + "RegularImplicitSchurFactor::updateHessian non implemented"); } virtual Matrix augmentedJacobian() const { throw std::runtime_error(