NLP.h

00001 #ifndef NLP_h
00002 #define NLP_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 "NLPBase.h"
00014 #include "OptppSmartPtr.h"
00015 
00016 using std::ostream;
00017 
00018 namespace OPTPP {
00019 
00029 class NLP{
00030 
00031 private:
00032   SmartPtr<NLPBase> ptr_;  
00033 
00034 public:
00038   NLP();
00042   NLP(NLPBase* base); 
00043 
00045   void setX(const int i, const real& x);
00046 
00048   void setX(const NEWMAT::ColumnVector& x);
00049 
00051   void setF(const real& fx);
00052 
00058   void setIsExpensive(const int e);
00059 
00061   void setFcnAccrcy(const int i, const real& accrcy);
00062 
00064   void setFcnAccrcy(const NEWMAT::ColumnVector& accrcy);
00065 
00069   int  getDim()         const;
00070 
00074   int  getFevals()      const;
00075 
00081   int  getIsExpensive() const;
00082 
00086   real getF()           const;
00087 
00091   NEWMAT::ColumnVector getFcnAccrcy()   const;
00092 
00096   NEWMAT::ColumnVector getXc()  const;
00097 
00101   real getFcnTime()     const;
00102 
00106   int getNumOfCons() const; 
00107 
00111   int getNumOfNLCons() const; 
00112 
00118   bool hasConstraints() ; 
00119 
00121   void printConstraints(); 
00122 
00124   void setDebug();
00125 
00131   bool getDebug() const;
00132 
00134   void reset();                         
00135 
00137   void initFcn();                       
00138 
00140   real evalF();                         
00141 
00143   real evalF(const NEWMAT::ColumnVector& x);    
00144 
00146   NEWMAT::ColumnVector evalG();                 
00147 
00149   NEWMAT::ColumnVector evalG(const NEWMAT::ColumnVector& x);
00150 
00152   NEWMAT::SymmetricMatrix evalH();              
00153 
00155   NEWMAT::SymmetricMatrix evalH(NEWMAT::ColumnVector& x);
00156 
00158   void eval();                          
00159 
00161   NEWMAT::ColumnVector evalCF(const NEWMAT::ColumnVector& x); 
00162 
00164   NEWMAT::Matrix evalCG(const NEWMAT::ColumnVector& x);  
00165 
00167   NEWMAT::SymmetricMatrix evalCH(NEWMAT::ColumnVector& x);   
00168 
00170   OptppArray<NEWMAT::SymmetricMatrix> evalCH(NEWMAT::ColumnVector& x, int darg);   
00171   void evalC(const NEWMAT::ColumnVector& x); 
00172 
00174   void printState(char *); 
00176   void fPrintState(ostream *, char *); 
00177 
00178 };
00179 
00180 } // namespace OPTPP
00181 #endif
00182 
Generated on Mon Jan 24 12:04:37 2011 for FASTlib by  doxygen 1.6.3