NOMAD Source  Version 4.0.0 Beta
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NM.hpp
Go to the documentation of this file.
1 #ifndef __NOMAD400_NM__
2 #define __NOMAD400_NM__
3 
4 
5 #include "../../Algos/Algorithm.hpp"
6 #include "../../Algos/AlgoStopReasons.hpp"
7 
8 #include "../../nomad_nsbegin.hpp"
9 
10 /// Class for implementation of Nelder Mead non-linear simplex algorithm.
11 class NM: public Algorithm
12 {
13 private:
14 
15 public:
16  /// Constructor
17  /**
18  \param parentStep The parent of this Step -- \b IN.
19  \param stopReasons The stop reasons for NM -- \b IN.
20  \param runParams The run parameters that control NM -- \b IN.
21  \param pbParams The problem parameters that control NM -- \b IN.
22  */
23  explicit NM(const Step* parentStep,
24  std::shared_ptr<AlgoStopReasons<NMStopType>> stopReasons ,
25  const std::shared_ptr<RunParameters> & runParams,
26  const std::shared_ptr<PbParameters> & pbParams )
27  : Algorithm(parentStep, stopReasons, runParams, pbParams)
28  {
29  init();
30  }
31  ~NM() {}
32 
33 
34  /// Algorithm execution for single-objective.
35  /**
36  \return \c true
37  */
38  virtual bool run() override; // Overrides Algorithm's run
39  virtual void start() override;
40  virtual void end() override;
41 
42  virtual void readInformationForHotRestart() override ;
43 
44 private:
45 
46  /// Helper for constructor
47  void init();
48 
49 };
50 
51 #include "../../nomad_nsend.hpp"
52 
53 #endif // __NOMAD400_NM__
virtual void start() override
Start step of the algorithm.
Class for implementation of Nelder Mead non-linear simplex algorithm.
Definition: NM.hpp:11
virtual bool run() override
Algorithm execution for single-objective.
~NM()
Definition: NM.hpp:31
virtual void end() override
End step of the algorithm.
Template class for algorithm stop reasons.
Generic class for any direct search optimizer algorithm.
Definition: Algorithm.hpp:28
Base class of all types of steps (Iteration, Termination, Initialization, Poll, Mads,...).
Definition: Step.hpp:24
NM(const Step *parentStep, std::shared_ptr< AlgoStopReasons< NMStopType >> stopReasons, const std::shared_ptr< RunParameters > &runParams, const std::shared_ptr< PbParameters > &pbParams)
Constructor.
Definition: NM.hpp:23
virtual void readInformationForHotRestart() override
Helper for start() when doing a hot restart.
void init()
Helper for constructor.