Constraint.h

00001 #ifndef Constraint_h
00002 #define Constraint_h
00003 
00004 /*----------------------------------------------------------------------
00005  Copyright (c) 2001, Sandia Corporation.   Under the terms of Contract 
00006  DE-AC04-94AL85000, there is a non-exclusive license for use of this 
00007  work by or on behalf of the U.S. Government.
00008 
00009  P.J. Williams, Sandia National Laboratories, pwillia@sandia.gov
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 } // namespace OPTPP
00115 #endif
Generated on Mon Jan 24 12:04:37 2011 for FASTlib by  doxygen 1.6.3