Constraint.h
00001 #ifndef Constraint_h
00002 #define Constraint_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "ConstraintBase.h"
00014 #include "OptppSmartPtr.h"
00015
00023 namespace OPTPP {
00024
00025 class Constraint{
00026
00027 private:
00029 SmartPtr<ConstraintBase> ptr_;
00030
00031 public:
00036 Constraint();
00041 Constraint(ConstraintBase* base);
00042
00043
00047 int getNumOfCons() const;
00051 int getNumOfVars() const;
00055 NEWMAT::ColumnVector getLower() const;
00059 NEWMAT::ColumnVector getUpper() const;
00063 NEWMAT::ColumnVector getConstraintType() const;
00067 NEWMAT::ColumnVector getConstraintViolation() const;
00071 NEWMAT::ColumnVector getConstraintValue() const;
00075 OptppArray<int> getConstraintMappingIndices() const;
00076
00082 NEWMAT::ColumnVector evalResidual(const NEWMAT::ColumnVector& xcurrent) const;
00083 void evalCFGH(const NEWMAT::ColumnVector& xcurrent) const;
00089 NEWMAT::Matrix evalGradient(const NEWMAT::ColumnVector& xcurrent) const;
00095 NEWMAT::SymmetricMatrix evalHessian(NEWMAT::ColumnVector& xcurrent) const;
00102 OptppArray<NEWMAT::SymmetricMatrix> evalHessian(NEWMAT::ColumnVector& xcurrent, int darg) const;
00103
00110 bool amIFeasible(const NEWMAT::ColumnVector& xcurrent, double epsilon) const ;
00111
00112 };
00113
00114 }
00115 #endif