remove a small overhead

release/4.3a0
Yong-Dian Jian 2012-03-15 17:23:01 +00:00
parent b76cf5b07f
commit 30557ce4a5
1 changed files with 2 additions and 1 deletions

View File

@ -642,8 +642,9 @@ namespace gtsam {
r.vector() = Vector::Zero(r.dim()); r.vector() = Vector::Zero(r.dim());
Index i = 0; Index i = 0;
BOOST_FOREACH(const JacobianFactor::shared_ptr& factor, fg) { BOOST_FOREACH(const JacobianFactor::shared_ptr& factor, fg) {
SubVector &y = r[i];
for(JacobianFactor::const_iterator j = factor->begin(); j != factor->end(); ++j) { for(JacobianFactor::const_iterator j = factor->begin(); j != factor->end(); ++j) {
r[i] += factor->getA(j) * x[*j]; y += factor->getA(j) * x[*j];
} }
++i; ++i;
} }