Call JacobianFactor constructor with map

release/4.3a0
dellaert 2014-09-21 13:11:55 +02:00
parent c7b6a9af12
commit 6532966f62
1 changed files with 7 additions and 1 deletions

View File

@ -93,7 +93,13 @@ public:
/// linearize to a GaussianFactor
boost::shared_ptr<GaussianFactor> linearize(const Values& c) const {
return boost::shared_ptr<JacobianFactor>(new JacobianFactor());
// We will construct an n-ary factor below, where terms is a container whose
// value type is std::pair<Key, Matrix>, specifying the
// collection of keys and matrices making up the factor.
std::map<Key,Matrix> terms;
Vector b;
SharedDiagonal model = SharedDiagonal();
return boost::shared_ptr<JacobianFactor>(new JacobianFactor(terms,b,model));
}
};