diff --git a/matlab.h b/matlab.h index c4891a615..349cdeea4 100644 --- a/matlab.h +++ b/matlab.h @@ -143,7 +143,7 @@ void perturbPoint2(Values& values, double sigma, int32_t seed = 42u) { sigma); Sampler sampler(model, seed); BOOST_FOREACH(const Values::ConstFiltered::KeyValuePair& key_value, values.filter()) { - values.update(key_value.key, key_value.value.retract(sampler.sample())); + values.update(key_value.key, key_value.value + Point2(sampler.sample())); } } @@ -164,7 +164,7 @@ void perturbPoint3(Values& values, double sigma, int32_t seed = 42u) { sigma); Sampler sampler(model, seed); BOOST_FOREACH(const Values::ConstFiltered::KeyValuePair& key_value, values.filter()) { - values.update(key_value.key, key_value.value.retract(sampler.sample())); + values.update(key_value.key, key_value.value + Point3(sampler.sample())); } }