123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- #ifndef _DERIVATIVE_BASED_OPTIMIZER_H_
- #define _DERIVATIVE_BASED_OPTIMIZER_H_
- #include "core/optimization/blackbox/SimpleOptimizer.h"
- #include "AdaptiveDirectionRandomSearchOptimizer.h"
- namespace OPTIMIZATION
- {
-
- class DerivativeBasedOptimizer : public SimpleOptimizer
- {
- public:
- typedef SimpleOptimizer SuperClass;
-
-
-
-
-
- DerivativeBasedOptimizer(OptLogBase *loger=NULL);
-
-
-
-
- DerivativeBasedOptimizer( const DerivativeBasedOptimizer &opt);
-
-
-
- virtual ~DerivativeBasedOptimizer();
-
-
-
-
- enum { SUCCESS_GRADIENTTOL = _to_continue_,
- _to_continue_
- };
-
-
-
-
-
-
-
-
-
-
- void setGradientTol(bool active, double norm);
-
-
-
-
-
- inline double getGradientTol();
-
-
-
-
-
-
-
-
-
-
-
-
- const OPTIMIZATION::matrix_type getNumericalGradient(const OPTIMIZATION::matrix_type & x , const OPTIMIZATION::matrix_type & maskWidth);
-
-
-
- const OPTIMIZATION::matrix_type getAnalyticalGradient(const OPTIMIZATION::matrix_type & x);
-
-
-
-
- void useAnalyticalGradients(bool useAnalyticalGradients);
-
-
-
-
- const OPTIMIZATION::matrix_type getAnalyticalHessian(const OPTIMIZATION::matrix_type & x);
-
- protected:
-
-
-
- void init();
-
-
-
- OPTIMIZATION::matrix_type m_gradient;
-
-
-
-
- double m_gradientTol;
-
-
-
- bool m_gradientTolActive;
-
-
-
- bool m_analyticalGradients;
-
- };
- }
- #endif
|