123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- //////////////////////////////////////////////////////////////////////
- //
- // 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 <cmath>
- #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
|