NewtonMethodOptimizer.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. /*!
  13. class for the newton method
  14. Note: your objective function has to have analytical Hessian computation implemented!
  15. HowToUse:
  16. * use setStepSize to specify the initial stepsize to compute the numerical gradient
  17. * use setParameters() to set the start point
  18. * call init()
  19. * call optimize()
  20. Implemented Abort criteria:
  21. * maximum number of iterations
  22. * time limit
  23. * parameter bounds
  24. * function value tolerance
  25. * parameter tolerance
  26. Additional return reason:
  27. */
  28. class NewtonMethodOptimizer : public MatrixIterativeOptimizer
  29. {
  30. public:
  31. typedef MatrixIterativeOptimizer SuperClass;
  32. typedef SuperClass::matrix_type matrix_type;
  33. ///
  34. /// Constructor.
  35. /// \param loger : OptLogBase * to existing log class
  36. ///
  37. NewtonMethodOptimizer(OptLogBase *loger);
  38. ///
  39. /// Copy constructor
  40. /// \param opt .. optimizer to copy
  41. ///
  42. NewtonMethodOptimizer( const NewtonMethodOptimizer &opt);
  43. ///
  44. /// operator =
  45. ///
  46. NewtonMethodOptimizer & operator=(const NewtonMethodOptimizer &opt);
  47. ///
  48. /// Destructor.
  49. ///
  50. virtual ~NewtonMethodOptimizer();
  51. ///
  52. /// internal initializations
  53. ///
  54. void init();
  55. protected:
  56. /*!
  57. \brief update the Iteration Matrix
  58. */
  59. void updateIterationMatrix() ;
  60. };
  61. #endif