////////////////////////////////////////////////////////////////////// // // EqualityConstraints.h: interface of the EqualityConstaints class. // // Written By: Matthias Wacker // // Constraints of the form: H(x) = 0 // where H is the vector of all equality constraints // ////////////////////////////////////////////////////////////////////// #ifndef _EQUALITYCONSTRAINTS_H_ #define _EQUALITYCONSTRAINTS_H_ #include "optimization/Constraints.h" /*! class Abstract base class for all equality constraints. */ class EqualityConstraints : public Constraints { public: typedef Constraints SuperClass; typedef SuperClass::matrix_type matrix_type; EqualityConstraints() : SuperClass() {}; /*! Constructor. \param numOfParameters \param numOfConstraints */ EqualityConstraints(unsigned int numOfParameters, unsigned int numOfConstraints): SuperClass(numOfParameters,numOfConstraints){}; /* Copy constructor */ EqualityConstraints(const Constraints &con):SuperClass(con){}; /*! Destructor. */ ~EqualityConstraints(){}; /*! Initialization for the cost function */ virtual void init() = 0; /*! evaluate the constraints \param x =^ position \return matrix_type containing the i-th constraint result in the i-th component */ virtual matrix_type evaluate(const matrix_type & x) = 0; protected: }; #endif