From a9ba1da877051632154bf6b6090f91ce402ac6ce Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco Claraco Date: Fri, 22 Apr 2022 12:37:48 +0200 Subject: [PATCH] Revert "fix derivative" This reverts commit 42b795c769e66dacc24cbe8b13309cdfb3506fc2. --- gtsam/linear/LossFunctions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtsam/linear/LossFunctions.cpp b/gtsam/linear/LossFunctions.cpp index 6573beac9..7307c4a68 100644 --- a/gtsam/linear/LossFunctions.cpp +++ b/gtsam/linear/LossFunctions.cpp @@ -350,8 +350,8 @@ double DCS::weight(double distance) const { const double e2 = distance*distance; if (e2 > c_) { - const double w = c_/(c_ + e2); - return 2.0*w*w; + const double w = 2.0*c_/(c_ + e2); + return w*w; } return 1.0;