deprecate error in noisemodel, use loss instead; revise virtual with override

release/4.3a0
yetongumich 2020-07-12 23:09:13 -04:00
parent 7db7455c12
commit ec993497f3
1 changed files with 1 additions and 1 deletions

View File

@ -515,7 +515,7 @@ Vector JacobianFactor::error_vector(const VectorValues& c) const {
double JacobianFactor::error(const VectorValues& c) const {
Vector e = unweighted_error(c);
// Use the noise model distance function to get the correct error if available.
if (model_) return model_->error(e);
if (model_) return 0.5 * model_->squaredMahalanobisDistance(e);
return 0.5 * e.dot(e);
}