SimpleOptimizer.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. ///
  2. /// @file SimpleSimpleOptimizer.h: interface of the SimpleOptimizer class.
  3. /// @author Matthias Wacker, Esther Platzer
  4. ///
  5. #ifndef _SIMPLEOPTIMIZER_H_
  6. #define _SIMPLEOPTIMIZER_H_
  7. #include "optimization/Optimizer.h"
  8. #include "optimization/SimpleOptProblem.h"
  9. #include "optimization/Opt_Namespace.h"
  10. namespace opt=optimization;
  11. /*!
  12. Abstract base class of all optimizers.
  13. */
  14. class SimpleOptimizer : public Optimizer
  15. {
  16. public:
  17. /// the SuperClass is Optimizer
  18. typedef Optimizer SuperClass;
  19. ///
  20. /// Constructor (also the default constructor)
  21. /// @param loger OptLogBase * to existing log class or NULL
  22. ///
  23. SimpleOptimizer(OptLogBase *loger=NULL);
  24. ///
  25. /// Copy constructor
  26. /// @param opt .. optimizer to copy
  27. ///
  28. SimpleOptimizer( const SimpleOptimizer &opt);
  29. ///
  30. /// assignment opterator
  31. /// @param opt optimizer to "copy"
  32. /// @return self-reference
  33. ///
  34. SimpleOptimizer &operator=(const SimpleOptimizer &opt);
  35. ///
  36. /// Destructor.
  37. ///
  38. virtual ~SimpleOptimizer();
  39. ///
  40. /// start the optimization for the simple optimization problem
  41. /// @param optProb the optimization problem to solve
  42. ///
  43. virtual int optimizeProb(SimpleOptProblem &optProb);
  44. protected:
  45. ///
  46. /// redeclaring the interface of opt
  47. ///
  48. virtual int optimize() = 0;
  49. ///
  50. /// do initializations (this is called from child class and calls superclass::init)
  51. ///
  52. void init();
  53. ///
  54. /// call after optimization to store the result in the optProblem
  55. ///
  56. /// @param optProb the optimization problem
  57. ///
  58. void setResult(SimpleOptProblem &optProb);
  59. ///
  60. /// get all settings from the optimization problem
  61. ///
  62. /// @param optProb the optimization problem
  63. ///
  64. void getSettings(SimpleOptProblem &optProb);
  65. };
  66. #endif