LinearEquation.h
00001 #ifndef LinearEquation_h
00002 #define LinearEquation_h
00003
00004
00005 #include "LinearConstraint.h"
00006
00015
00016
00017
00018
00019 namespace OPTPP {
00020
00021 class LinearEquation: public LinearConstraint {
00022
00023 protected:
00025 NEWMAT::ColumnVector b_;
00027 NEWMAT::ColumnVector ctype_;
00028
00029 public:
00030
00035 LinearEquation();
00041 LinearEquation(const NEWMAT::Matrix& A, const NEWMAT::ColumnVector& rhs);
00042
00046 virtual ~LinearEquation(){}
00047
00051 virtual NEWMAT::ColumnVector getConstraintType() const { return ctype_;};
00052
00056 NEWMAT::ColumnVector getB() const {return b_;}
00057
00063 virtual NEWMAT::ColumnVector evalAx(const NEWMAT::ColumnVector& xc) const;
00064
00071 virtual NEWMAT::ColumnVector evalResidual(const NEWMAT::ColumnVector& xc) const;
00072 virtual void evalCFGH(const NEWMAT::ColumnVector& xc) const;
00073
00080 virtual NEWMAT::Matrix evalGradient(const NEWMAT::ColumnVector& xc) const;
00081
00088 virtual bool amIFeasible(const NEWMAT::ColumnVector& xc, double epsilon) const;
00089 };
00090
00091 }
00092 #endif