////////////////////////////////////////////////////////////////////// // // AxA3dNUMPowellBrentOptimizer.h: interface of the AxA3dNUMPowellBrentOptimizer // // Powells Method - modified in a way, that it doesn't focus on having 100% conjugate // directions, but having one direction in "valley" direction. // // Written by: Matthias Wacker // ////////////////////////////////////////////////////////////////////// #ifndef _POWELL_BRENT_OPTIMIZER_H_ #define _POWELL_BRENT_OPTIMIZER_H_ #include #include "core/optimization/blackbox/SimpleOptimizer.h" #include "optimization/BrentLineSearcher.h" namespace OPTIMIZATION { /*! class for the PowellBrentOptimizer HowToUse: * use setParameters() to set the start point * you may use m_scales to regulate the inner search interval (set it to a vector with 1/x as elements to divide it by x); * call init() * call optimize() Implemented Abort criteria: * maximum number of iterations * time limit * parameter bounds * function value tolerance Additional return reason: */ class PowellBrentOptimizer : public SimpleOptimizer { public: typedef SimpleOptimizer SuperClass; typedef SuperClass::matrix_type matrix_type; /*! Constructor. \param loger : OptLogBase * to existing log class */ PowellBrentOptimizer(OptLogBase *loger=NULL); /*! Copy constructor \param opt .. optimizer to copy */ PowellBrentOptimizer( const PowellBrentOptimizer &opt); /*! operator = */ PowellBrentOptimizer & operator=(const PowellBrentOptimizer &opt); /*! Destructor. */ ~PowellBrentOptimizer(); /// /// enumeration for the return reasons of an optimizer, /// has all elements of the SuperClass optimizer /// enum { SUCCESS_NO_BETTER_POINT = _to_continue_, _to_continue_ }; /*! \brief Do internal initializations */ void init(); /*! \brief start the optmization */ int optimize(); /*! \brief set options for the internal line searcher */ void setLineSearchOptions(double lower, double upper, double eps); private: /*! the direction set */ matrix_type xi; /*! the brent line searcher */ BrentLineSearcher m_lin; /*! parameter brent linesseracher */ double m_lin_Lower; double m_lin_Upper; double m_lin_Eps; }; //class }//namespace #endif