UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hj_optim.hpp
1 /* hj_optim.hpp */
2 /* $Id$ */
3 #ifndef __hj_optim_hpp
4 #define __hj_optim_hpp
5 
6 #include <cstring>
7 #ifdef GE_BUILD
8 #include <optim.hpp>
9 #else
10 #include <mth/optim.hpp>
11 #endif
12 
14 class HJOptim : public AbstractOptim
15 {
16 public:
17 
19  HJOptim(const AbstractOptim::Space &space, size_t iters_num):
20  AbstractOptim(space), m_iters_num(iters_num){};
21 
22  virtual ~HJOptim(){};
23 
24  void setItersNum(unsigned iters_num) {m_iters_num = iters_num;}
25 
26  unsigned getItersNum() {return m_iters_num;}
27 
29  virtual bool minimize(const AbstractResidual &res, std::vector<double> &x) const;
30 
31 protected:
32 
34  unsigned m_iters_num;
35 
37  void step(double a,
38  const std::vector<double> &start_value,
39  const std::vector<double> &min_lim,
40  const std::vector<double> &max_lim,
41  std::vector<double> &y,
42  std::vector<double> &z) const;
43 
45  double conf(double F0,
46  const AbstractResidual &res,
47  const std::vector<double> &h,
48  const std::vector<double> &min_lim,
49  const std::vector<double> &max_lim,
50  std::vector<double> &z,
51  std::vector<double> &y) const;
52 };
53 
54 
55 #endif /* hj_optim.hpp */
Definition: residual.hpp:9
HJOptim(const AbstractOptim::Space &space, size_t iters_num)
Definition: hj_optim.hpp:19
std::vector< SpaceElem > Space
Definition: optim.hpp:30
Definition: optim.hpp:14
Definition: hj_optim.hpp:14
void step(double a, const std::vector< double > &start_value, const std::vector< double > &min_lim, const std::vector< double > &max_lim, std::vector< double > &y, std::vector< double > &z) const
virtual bool minimize(const AbstractResidual &res, std::vector< double > &x) const
double conf(double F0, const AbstractResidual &res, const std::vector< double > &h, const std::vector< double > &min_lim, const std::vector< double > &max_lim, std::vector< double > &z, std::vector< double > &y) const
unsigned m_iters_num
Definition: hj_optim.hpp:34
Space & space()
Definition: optim.hpp:43