/* ************************************************************************* */ VectorValues GaussianFactorGraph::gradientAtZero() const { // Zero-out the gradient VectorValues g; BOOST_FOREACH(const sharedFactor& factor, *this) { VectorValues gi = factor->gradientAtZero(); g.addInPlace_(gi); } return g; }
/* ************************************************************************* */ VectorValues GaussianFactorGraph::hessianDiagonal() const { VectorValues d; BOOST_FOREACH(const sharedFactor& factor, *this) { if(factor){ VectorValues di = factor->hessianDiagonal(); d.addInPlace_(di); } } return d; }