2 GTSAM Copyright 2010-2019, Georgia Tech Research Corporation,
3 Atlanta, Georgia 30332-0415
6 See LICENSE for the license information
8 Simple unit test for custom robust noise model.
26 return 1.0
if abs_e <= k
else k / abs_e
30 return abs_e * abs_e / 2.0
if abs_e <= k
else k * abs_e - k * k / 2.0
34 gtsam.noiseModel.mEstimator.Base.ReweightScheme.Scalar,
37 f = gtsam.PriorFactorDouble(0, 1.0, custom_robust)
41 self.assertAlmostEqual(f.error(v), 0.125)
43 if __name__ ==
"__main__":