Ejemplo n.º 1
0
 /* ************************************************************************* */
 Errors GaussianFactorGraph::operator*(const VectorValues& x) const {
   Errors e;
   BOOST_FOREACH(const GaussianFactor::shared_ptr& Ai_G, *this) {
     JacobianFactor::shared_ptr Ai = convertToJacobianFactorPtr(Ai_G);
     e.push_back((*Ai) * x);
   }
   return e;
 }
Ejemplo n.º 2
0
/* ************************************************************************* */
Errors Errors::operator-(const Errors& b) const {
#ifndef NDEBUG
  size_t m = size();
  if (b.size()!=m)
    throw(std::invalid_argument("Errors::operator-: incompatible sizes"));
#endif
  Errors result;
  Errors::const_iterator it = b.begin();
  BOOST_FOREACH(const Vector& ai, *this)
    result.push_back(ai - *(it++));
  return result;
}
Ejemplo n.º 3
0
/* ************************************************************************* */
Errors Errors::operator-() const {
  Errors result;
  BOOST_FOREACH(const Vector& ai, *this)
    result.push_back(-ai);
  return result;
}