Check if active

release/4.3a0
dellaert 2014-11-02 13:53:22 +01:00
parent a8ab910c32
commit 90a0fa6e45
1 changed files with 4 additions and 0 deletions

View File

@ -107,6 +107,10 @@ public:
virtual boost::shared_ptr<GaussianFactor> linearize(const Values& x) const {
// Only linearize if the factor is active
if (!this->active(x))
return boost::shared_ptr<JacobianFactor>();
// Create a writeable JacobianFactor in advance
// In case noise model is constrained, we need to provide a noise model
bool constrained = noiseModel_->is_constrained();