BFGSOptimizer.h 1.7 KB

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