BFGSOptimizer.h 1.4 KB

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