123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- #ifndef _CONSTRAINTS_H_
- #define _CONSTRAINTS_H_
- #include "core/optimization/blackbox/Definitions_core_opt.h"
- namespace opt=OPTIMIZATION;
- class Constraints
- {
- public:
- typedef OPTIMIZATION::matrix_type matrix_type;
-
- Constraints();
-
- Constraints(unsigned int numOfParameters, unsigned int numOfConstraints);
-
-
- Constraints(const Constraints &con);
-
- virtual ~Constraints();
-
- inline unsigned int getNumOfParameters(){return m_numOfParameters;};
-
- inline unsigned int getNumOfConstraints(){return m_numOfConstraints;};
-
-
- inline bool hasAnalyticGradient(){return m_hasAnalyticGradient;};
-
- virtual const matrix_type getAnalyticGradient(const matrix_type &x);
-
-
-
- inline bool hasAnalyticHessian(){return m_hasAnalyticHessian;};
-
- virtual const matrix_type getAnalyticHessian(const matrix_type & x);
-
- bool setWeightVector(const matrix_type weights);
-
- inline matrix_type getWeightVector(){return m_weights;};
-
- virtual void init() = 0;
-
- virtual matrix_type evaluate(const matrix_type & x) = 0;
-
- bool setX0(const matrix_type &x0);
-
- bool setH0(const matrix_type &H0);
-
- matrix_type evaluateSub(double lambda);
- protected:
-
- unsigned int m_numOfParameters;
-
- unsigned int m_numOfConstraints;
-
- bool m_hasAnalyticGradient;
-
-
- bool m_hasAnalyticHessian;
-
- matrix_type m_weights;
-
- matrix_type m_x_0;
-
- matrix_type m_h_0;
- };
- #endif
|