mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix bug #314: move remaining math functions from internal to numext namespace
This commit is contained in:
@@ -254,14 +254,14 @@ HybridNonLinearSolver<FunctorType,Scalar>::solveOneStep(FVectorType &x)
|
||||
/* compute the scaled actual reduction. */
|
||||
actred = -1.;
|
||||
if (fnorm1 < fnorm) /* Computing 2nd power */
|
||||
actred = 1. - internal::abs2(fnorm1 / fnorm);
|
||||
actred = 1. - numext::abs2(fnorm1 / fnorm);
|
||||
|
||||
/* compute the scaled predicted reduction. */
|
||||
wa3 = R.template triangularView<Upper>()*wa1 + qtf;
|
||||
temp = wa3.stableNorm();
|
||||
prered = 0.;
|
||||
if (temp < fnorm) /* Computing 2nd power */
|
||||
prered = 1. - internal::abs2(temp / fnorm);
|
||||
prered = 1. - numext::abs2(temp / fnorm);
|
||||
|
||||
/* compute the ratio of the actual to the predicted reduction. */
|
||||
ratio = 0.;
|
||||
@@ -497,14 +497,14 @@ HybridNonLinearSolver<FunctorType,Scalar>::solveNumericalDiffOneStep(FVectorType
|
||||
/* compute the scaled actual reduction. */
|
||||
actred = -1.;
|
||||
if (fnorm1 < fnorm) /* Computing 2nd power */
|
||||
actred = 1. - internal::abs2(fnorm1 / fnorm);
|
||||
actred = 1. - numext::abs2(fnorm1 / fnorm);
|
||||
|
||||
/* compute the scaled predicted reduction. */
|
||||
wa3 = R.template triangularView<Upper>()*wa1 + qtf;
|
||||
temp = wa3.stableNorm();
|
||||
prered = 0.;
|
||||
if (temp < fnorm) /* Computing 2nd power */
|
||||
prered = 1. - internal::abs2(temp / fnorm);
|
||||
prered = 1. - numext::abs2(temp / fnorm);
|
||||
|
||||
/* compute the ratio of the actual to the predicted reduction. */
|
||||
ratio = 0.;
|
||||
|
||||
@@ -285,13 +285,13 @@ LevenbergMarquardt<FunctorType,Scalar>::minimizeOneStep(FVectorType &x)
|
||||
/* compute the scaled actual reduction. */
|
||||
actred = -1.;
|
||||
if (Scalar(.1) * fnorm1 < fnorm)
|
||||
actred = 1. - internal::abs2(fnorm1 / fnorm);
|
||||
actred = 1. - numext::abs2(fnorm1 / fnorm);
|
||||
|
||||
/* compute the scaled predicted reduction and */
|
||||
/* the scaled directional derivative. */
|
||||
wa3 = fjac.template triangularView<Upper>() * (qrfac.colsPermutation().inverse() *wa1);
|
||||
temp1 = internal::abs2(wa3.stableNorm() / fnorm);
|
||||
temp2 = internal::abs2(sqrt(par) * pnorm / fnorm);
|
||||
temp1 = numext::abs2(wa3.stableNorm() / fnorm);
|
||||
temp2 = numext::abs2(sqrt(par) * pnorm / fnorm);
|
||||
prered = temp1 + temp2 / Scalar(.5);
|
||||
dirder = -(temp1 + temp2);
|
||||
|
||||
@@ -535,13 +535,13 @@ LevenbergMarquardt<FunctorType,Scalar>::minimizeOptimumStorageOneStep(FVectorTyp
|
||||
/* compute the scaled actual reduction. */
|
||||
actred = -1.;
|
||||
if (Scalar(.1) * fnorm1 < fnorm)
|
||||
actred = 1. - internal::abs2(fnorm1 / fnorm);
|
||||
actred = 1. - numext::abs2(fnorm1 / fnorm);
|
||||
|
||||
/* compute the scaled predicted reduction and */
|
||||
/* the scaled directional derivative. */
|
||||
wa3 = fjac.topLeftCorner(n,n).template triangularView<Upper>() * (permutation.inverse() * wa1);
|
||||
temp1 = internal::abs2(wa3.stableNorm() / fnorm);
|
||||
temp2 = internal::abs2(sqrt(par) * pnorm / fnorm);
|
||||
temp1 = numext::abs2(wa3.stableNorm() / fnorm);
|
||||
temp2 = numext::abs2(sqrt(par) * pnorm / fnorm);
|
||||
prered = temp1 + temp2 / Scalar(.5);
|
||||
dirder = -(temp1 + temp2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user