NewtonMethodOptimizer.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //////////////////////////////////////////////////////////////////////
  2. //
  3. // AxA3dNUMNewtonMethodOptimizer.h: interface for MatrixItertiveMethods class
  4. //
  5. // Written by: Matthias Wacker
  6. //
  7. //
  8. //////////////////////////////////////////////////////////////////////
  9. #ifndef _NEWTON_METHOD_OPTIMIZER_H_
  10. #define _NEWTON_METHOD_OPTIMIZER_H_
  11. #include "optimization/MatrixIterativeOptimizer.h"
  12. namespace OPTIMIZATION
  13. {
  14. /*!
  15. class for the newton method
  16. Note: your objective function has to have analytical Hessian computation implemented!
  17. HowToUse:
  18. * use setStepSize to specify the initial stepsize to compute the numerical gradient
  19. * use setParameters() to set the start point
  20. * call init()
  21. * call optimize()
  22. Implemented Abort criteria:
  23. * maximum number of iterations
  24. * time limit
  25. * parameter bounds
  26. * function value tolerance
  27. * parameter tolerance
  28. Additional return reason:
  29. */
  30. class NewtonMethodOptimizer : public MatrixIterativeOptimizer
  31. {
  32. public:
  33. typedef MatrixIterativeOptimizer SuperClass;
  34. typedef SuperClass::matrix_type matrix_type;
  35. ///
  36. /// Constructor.
  37. /// \param loger : OptLogBase * to existing log class
  38. ///
  39. NewtonMethodOptimizer(OptLogBase *loger);
  40. ///
  41. /// Copy constructor
  42. /// \param opt .. optimizer to copy
  43. ///
  44. NewtonMethodOptimizer( const NewtonMethodOptimizer &opt);
  45. ///
  46. /// operator =
  47. ///
  48. NewtonMethodOptimizer & operator=(const NewtonMethodOptimizer &opt);
  49. ///
  50. /// Destructor.
  51. ///
  52. virtual ~NewtonMethodOptimizer();
  53. ///
  54. /// internal initializations
  55. ///
  56. void init();
  57. protected:
  58. /*!
  59. \brief update the Iteration Matrix
  60. */
  61. void updateIterationMatrix() ;
  62. }; //class
  63. }//namespace
  64. #endif