diff options
author | Gael Guennebaud <g.gael@free.fr> | 2013-06-12 12:52:41 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2013-06-12 12:52:41 +0200 |
commit | f6c18413168c01fca08ae9e0cfeb650b705858f6 (patch) | |
tree | 953ce6aaefc27d406f71c4568cbdd16c7433b50e /unsupported/Eigen/src/NonLinearOptimization | |
parent | 65c59307e2e5341ce512d17608a2fdf27df9d671 (diff) |
compilation fixes in unsupported
Diffstat (limited to 'unsupported/Eigen/src/NonLinearOptimization')
-rw-r--r-- | unsupported/Eigen/src/NonLinearOptimization/dogleg.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unsupported/Eigen/src/NonLinearOptimization/dogleg.h b/unsupported/Eigen/src/NonLinearOptimization/dogleg.h index 4210958e7..80c5d277b 100644 --- a/unsupported/Eigen/src/NonLinearOptimization/dogleg.h +++ b/unsupported/Eigen/src/NonLinearOptimization/dogleg.h @@ -92,8 +92,8 @@ void dogleg( /* at which the quadratic is minimized. */ bnorm = qtb.stableNorm(); temp = bnorm / gnorm * (bnorm / qnorm) * (sgnorm / delta); - temp = temp - delta / qnorm * abs2(sgnorm / delta) + sqrt(abs2(temp - delta / qnorm) + (1.-abs2(delta / qnorm)) * (1.-abs2(sgnorm / delta))); - alpha = delta / qnorm * (1. - abs2(sgnorm / delta)) / temp; + temp = temp - delta / qnorm * numext::abs2(sgnorm / delta) + sqrt(numext::abs2(temp - delta / qnorm) + (1.-numext::abs2(delta / qnorm)) * (1.-numext::abs2(sgnorm / delta))); + alpha = delta / qnorm * (1. - numext::abs2(sgnorm / delta)) / temp; algo_end: /* form appropriate convex combination of the gauss-newton */ |