|
| template<typename Function > |
| LineSearchResult | MathUtils::ArmijoBacktrack (Function &theFunc, const math_Vector &theX, const math_Vector &theDir, const math_Vector &theGrad, double theFx, double theAlphaInit=1.0, double theC1=1.0e-4, double theRho=0.5, int theMaxIter=50) |
| | Backtracking line search with Armijo condition. Finds alpha such that f(x + alpha*d) <= f(x) + c1*alpha*grad(f).d (sufficient decrease condition)
|
| |
| template<typename Function > |
| LineSearchResult | MathUtils::WolfeSearch (Function &theFunc, const math_Vector &theX, const math_Vector &theDir, const math_Vector &theGrad, double theFx, double theAlphaInit=1.0, double theC1=1.0e-4, double theC2=0.9, int theMaxIter=20) |
| | Strong Wolfe line search. Finds alpha satisfying both:
|
| |
| template<typename Function > |
| LineSearchResult | MathUtils::ExactLineSearch (Function &theFunc, const math_Vector &theX, const math_Vector &theDir, double theAlphaMax=10.0, double theTolerance=1.0e-6, int theMaxIter=100) |
| | Exact line search using Brent's method. Minimizes f(x + alpha*d) over alpha in [-alpha_max, alpha_max]. First brackets the minimum by exploring both directions. More expensive than inexact line search but can be more robust.
|
| |
| double | MathUtils::QuadraticInterpolation (double thePhi0, double thePhi0Prime, double theAlpha1, double thePhi1) |
| | Quadratic interpolation step for line search. Given phi(0), phi'(0), and phi(alpha1), finds minimum of quadratic fit.
|
| |
| template<typename Function > |
| bool | MathUtils::BrentAlongCoordinate (Function &theFunc, math_Vector &thePoint, int theDimIdx, double theLoBound, double theUpBound, double &theFx, double theTolerance, int theMaxIter, int &theEvalCount) |
| | Brent's method for 1D minimization along a single coordinate axis. Operates in-place on one coordinate of thePoint, avoiding vector allocations. Unlike ExactLineSearch which works with arbitrary direction vectors and allocates internal temporaries, this function modifies only thePoint(theDimIdx) during the search and restores it if no improvement is found.
|
| |