InequalityConstraints.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //////////////////////////////////////////////////////////////////////
  2. //
  3. // InequalityConstraints.h: interface of the InequalityConstaints class.
  4. //
  5. // Written By: Matthias Wacker
  6. //
  7. //
  8. // Constraints of the form: G(x) \le 0 (less or equal)
  9. // where G is the vector of all
  10. // inequality constraints
  11. //
  12. //////////////////////////////////////////////////////////////////////
  13. #ifndef _INEQUALITYCONSTRAINTS_H_
  14. #define _INEQUALITYCONSTRAINTS_H_
  15. #include "optimization/Constraints.h"
  16. /*!
  17. class Abstract base class for all equality constraints.
  18. */
  19. class InequalityConstraints : public Constraints
  20. {
  21. public:
  22. typedef Constraints SuperClass;
  23. typedef SuperClass::matrix_type matrix_type;
  24. /*!
  25. default constructor
  26. */
  27. InequalityConstraints() : SuperClass(){};
  28. /*!
  29. Constructor.
  30. \param numOfParameters
  31. \param numOfConstraints
  32. */
  33. InequalityConstraints(unsigned int numOfParameters, unsigned int numOfConstraints): SuperClass(numOfParameters,numOfConstraints){};
  34. /*!
  35. Copy constructor
  36. */
  37. InequalityConstraints(const Constraints &con):SuperClass(con){};
  38. /*!
  39. Destructor.
  40. */
  41. ~InequalityConstraints(){};
  42. /*!
  43. Initialization for the cost function
  44. */
  45. virtual void init() = 0;
  46. /*!
  47. evaluate the constraints
  48. \param x =^ position
  49. \return matrix_type containing the i-th constraint result in the i-th component
  50. */
  51. virtual matrix_type evaluate(const matrix_type & x) = 0;
  52. protected:
  53. };
  54. #endif