Lines Matching full:scalar

45 template<typename FunctorType, typename Scalar=double>
48 static Scalar sqrt_epsilon() in sqrt_epsilon()
51 return sqrt(NumTraits<Scalar>::epsilon()); in sqrt_epsilon()
62 : factor(Scalar(100.)) in Parameters()
66 , gtol(Scalar(0.)) in Parameters()
67 , epsfcn(Scalar(0.)) {} in Parameters()
68 Scalar factor;
70 Scalar ftol;
71 Scalar xtol;
72 Scalar gtol;
73 Scalar epsfcn;
76 typedef Matrix< Scalar, Dynamic, 1 > FVectorType;
77 typedef Matrix< Scalar, Dynamic, Dynamic > JacobianType;
81 const Scalar tol = sqrt_epsilon()
92 const Scalar tol = sqrt_epsilon()
97 const Scalar tol = sqrt_epsilon()
113 Scalar fnorm, gnorm;
116 Scalar lm_param(void) { return par; } in lm_param()
124 Scalar par, sum;
125 Scalar temp, temp1, temp2;
126 Scalar delta;
127 Scalar ratio;
128 Scalar pnorm, xnorm, fnorm1, actred, dirder, prered;
133 template<typename FunctorType, typename Scalar>
135 LevenbergMarquardt<FunctorType,Scalar>::lmder1( in lmder1()
137 const Scalar tol in lmder1()
156 template<typename FunctorType, typename Scalar>
158 LevenbergMarquardt<FunctorType,Scalar>::minimize(FVectorType &x) in minimize()
169 template<typename FunctorType, typename Scalar>
171 LevenbergMarquardt<FunctorType,Scalar>::minimizeInit(FVectorType &x) in minimizeInit()
212 template<typename FunctorType, typename Scalar>
214 LevenbergMarquardt<FunctorType,Scalar>::minimizeOneStep(FVectorType &x) in minimizeOneStep()
275 internal::lmpar2<Scalar>(qrfac, diag, qtf, delta, par, wa1); in minimizeOneStep()
294 if (Scalar(.1) * fnorm1 < fnorm) in minimizeOneStep()
302 prered = temp1 + temp2 / Scalar(.5); in minimizeOneStep()
312 if (ratio <= Scalar(.25)) { in minimizeOneStep()
314 temp = Scalar(.5); in minimizeOneStep()
316 temp = Scalar(.5) * dirder / (dirder + Scalar(.5) * actred); in minimizeOneStep()
317 if (Scalar(.1) * fnorm1 >= fnorm || temp < Scalar(.1)) in minimizeOneStep()
318 temp = Scalar(.1); in minimizeOneStep()
320 delta = temp * (std::min)(delta, pnorm / Scalar(.1)); in minimizeOneStep()
322 } else if (!(par != 0. && ratio < Scalar(.75))) { in minimizeOneStep()
323 delta = pnorm / Scalar(.5); in minimizeOneStep()
324 par = Scalar(.5) * par; in minimizeOneStep()
328 if (ratio >= Scalar(1e-4)) { in minimizeOneStep()
339 …if (abs(actred) <= parameters.ftol && prered <= parameters.ftol && Scalar(.5) * ratio <= 1. && del… in minimizeOneStep()
341 if (abs(actred) <= parameters.ftol && prered <= parameters.ftol && Scalar(.5) * ratio <= 1.) in minimizeOneStep()
349 …if (abs(actred) <= NumTraits<Scalar>::epsilon() && prered <= NumTraits<Scalar>::epsilon() && Scala… in minimizeOneStep()
351 if (delta <= NumTraits<Scalar>::epsilon() * xnorm) in minimizeOneStep()
353 if (gnorm <= NumTraits<Scalar>::epsilon()) in minimizeOneStep()
356 } while (ratio < Scalar(1e-4)); in minimizeOneStep()
361 template<typename FunctorType, typename Scalar>
363 LevenbergMarquardt<FunctorType,Scalar>::lmstr1( in lmstr1()
365 const Scalar tol in lmstr1()
383 template<typename FunctorType, typename Scalar>
385 LevenbergMarquardt<FunctorType,Scalar>::minimizeOptimumStorageInit(FVectorType &x) in minimizeOptimumStorageInit()
432 template<typename FunctorType, typename Scalar>
434 LevenbergMarquardt<FunctorType,Scalar>::minimizeOptimumStorageOneStep(FVectorType &x) in minimizeOptimumStorageOneStep()
453 internal::rwupdt<Scalar>(fjac, wa3, qtf, fvec[i]); in minimizeOptimumStorageOneStep()
525 internal::lmpar<Scalar>(fjac, permutation.indices(), diag, qtf, delta, par, wa1); in minimizeOptimumStorageOneStep()
544 if (Scalar(.1) * fnorm1 < fnorm) in minimizeOptimumStorageOneStep()
552 prered = temp1 + temp2 / Scalar(.5); in minimizeOptimumStorageOneStep()
562 if (ratio <= Scalar(.25)) { in minimizeOptimumStorageOneStep()
564 temp = Scalar(.5); in minimizeOptimumStorageOneStep()
566 temp = Scalar(.5) * dirder / (dirder + Scalar(.5) * actred); in minimizeOptimumStorageOneStep()
567 if (Scalar(.1) * fnorm1 >= fnorm || temp < Scalar(.1)) in minimizeOptimumStorageOneStep()
568 temp = Scalar(.1); in minimizeOptimumStorageOneStep()
570 delta = temp * (std::min)(delta, pnorm / Scalar(.1)); in minimizeOptimumStorageOneStep()
572 } else if (!(par != 0. && ratio < Scalar(.75))) { in minimizeOptimumStorageOneStep()
573 delta = pnorm / Scalar(.5); in minimizeOptimumStorageOneStep()
574 par = Scalar(.5) * par; in minimizeOptimumStorageOneStep()
578 if (ratio >= Scalar(1e-4)) { in minimizeOptimumStorageOneStep()
589 …if (abs(actred) <= parameters.ftol && prered <= parameters.ftol && Scalar(.5) * ratio <= 1. && del… in minimizeOptimumStorageOneStep()
591 if (abs(actred) <= parameters.ftol && prered <= parameters.ftol && Scalar(.5) * ratio <= 1.) in minimizeOptimumStorageOneStep()
599 …if (abs(actred) <= NumTraits<Scalar>::epsilon() && prered <= NumTraits<Scalar>::epsilon() && Scala… in minimizeOptimumStorageOneStep()
601 if (delta <= NumTraits<Scalar>::epsilon() * xnorm) in minimizeOptimumStorageOneStep()
603 if (gnorm <= NumTraits<Scalar>::epsilon()) in minimizeOptimumStorageOneStep()
606 } while (ratio < Scalar(1e-4)); in minimizeOptimumStorageOneStep()
611 template<typename FunctorType, typename Scalar>
613 LevenbergMarquardt<FunctorType,Scalar>::minimizeOptimumStorage(FVectorType &x) in minimizeOptimumStorage()
624 template<typename FunctorType, typename Scalar>
626 LevenbergMarquardt<FunctorType,Scalar>::lmdif1( in lmdif1()
630 const Scalar tol in lmdif1()
642 LevenbergMarquardt<NumericalDiff<FunctorType>, Scalar > lm(numDiff); in lmdif1()