Ejemplo n.º 1
0
 /* ************************************************************************* */
 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;
 }
Ejemplo n.º 2
0
 /* ************************************************************************* */
 VectorValues GaussianFactorGraph::hessianDiagonal() const {
   VectorValues d;
   BOOST_FOREACH(const sharedFactor& factor, *this) {
     if(factor){
       VectorValues di = factor->hessianDiagonal();
       d.addInPlace_(di);
     }
   }
   return d;
 }