Appl_Data.h

00001 #ifndef Appl_Data_h
00002 #define Appl_Data_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 
00010 #ifdef HAVE_CONFIG_H
00011 #include "OPT++_config.h"
00012 #endif
00013 
00014 #ifdef HAVE_STD
00015 #include <cstring>
00016 #else
00017 #include <string.h>
00018 #endif
00019 
00020 #include "globals.h"
00021 #include "OptppArray.h"
00022 
00028 namespace OPTPP {
00029 
00030 class Appl_Data {
00031 private :
00033   int                   dimension;              
00035   NEWMAT::ColumnVector    *xparm;               
00037   double          function_value;               
00039   NEWMAT::ColumnVector    *gradient;            
00041   NEWMAT::SymmetricMatrix *Hessian;             
00043   NEWMAT::ColumnVector    *constraint_value;    
00045   NEWMAT::Matrix          *constraint_gradient; 
00047   OptppArray<NEWMAT::SymmetricMatrix> *constraint_Hessian; 
00049   NEWMAT::ColumnVector    *lsq_residuals;       
00051   NEWMAT::Matrix          *lsq_jacobian;        
00053   bool            function_current;             
00055   bool            gradient_current;             
00057   bool            Hessian_current;              
00058 
00059 public:
00063   Appl_Data();
00064 
00068   ~Appl_Data();
00069 
00070   void reset();
00071 
00072   bool Compare(const NEWMAT::ColumnVector&);
00073   bool getF(const NEWMAT::ColumnVector&, real&);
00074   bool getGrad(const NEWMAT::ColumnVector&, NEWMAT::ColumnVector&);
00075   bool getHess(const NEWMAT::ColumnVector&, NEWMAT::SymmetricMatrix&);
00076 
00077   bool getCF(const NEWMAT::ColumnVector&, NEWMAT::ColumnVector&);
00078   bool getCGrad(const NEWMAT::ColumnVector&, NEWMAT::Matrix&);
00079   bool getCHess(const NEWMAT::ColumnVector&, OptppArray<NEWMAT::SymmetricMatrix>&);
00080 
00081   bool getLSQF(const NEWMAT::ColumnVector&, NEWMAT::ColumnVector&);
00082   bool getLSQJac(const NEWMAT::ColumnVector&, NEWMAT::Matrix&);
00083   
00084 
00086   void update(int,int,const NEWMAT::ColumnVector&,real);
00088   void update(int,int,const NEWMAT::ColumnVector&,real,NEWMAT::ColumnVector&);
00090   void update(int,int,const NEWMAT::ColumnVector&,real,
00091     NEWMAT::ColumnVector&,NEWMAT::SymmetricMatrix&);
00092 
00094   void constraint_update(int,int,int,const NEWMAT::ColumnVector&,
00095     NEWMAT::ColumnVector&);
00097   void constraint_update(int,int,int,const NEWMAT::ColumnVector&,
00098     NEWMAT::ColumnVector&,NEWMAT::Matrix&);
00100   void constraint_update(int,int,int,const NEWMAT::ColumnVector&,
00101     NEWMAT::ColumnVector&,NEWMAT::Matrix&,OptppArray<NEWMAT::SymmetricMatrix>&);
00102 
00104   void lsq_update(int,int,int,const NEWMAT::ColumnVector&,NEWMAT::ColumnVector&);
00105 
00107   void lsq_update(int,int,int,const NEWMAT::ColumnVector&,
00108     NEWMAT::ColumnVector&,NEWMAT::Matrix&);
00109 };
00110 
00111 } // namespace OPTPP
00112 
00113 #endif
Generated on Mon Jan 24 12:04:37 2011 for FASTlib by  doxygen 1.6.3