GenSetBox2d.h

00001 #ifndef GenSetBox2d_h
00002 #define GenSetBox2d_h
00003 //------------------------------------------------------------------------
00004 // Generating Set Classes - for use with OptGSS
00005 //------------------------------------------------------------------------
00006 
00007 /*------------------------------------------------------------------------
00008  Copyright (c) 2003,
00009  Ricardo Oliva (raoliva@lbl.gov)
00010  Lawrence Berkeley National Laboratory
00011  ------------------------------------------------------------------------*/
00012 
00013 #include "GenSetBase.h"
00014 
00015 using std::string;
00016 
00017 namespace OPTPP {
00018 
00019 //------------------------------------------------------------------------
00020 // Standard Basis with 2*n vectors
00021 //------------------------------------------------------------------------
00022 class GenSetBox2d : public GenSetBase {  // Standard with 2*n vectors
00023 
00024  public:
00025   virtual string classnm() { return "GenSetBox2d";}
00026 
00027   // default constructor;
00028   GenSetBox2d(){};
00029 
00030   // Vsize specific constructor
00031   GenSetBox2d(int n) : GenSetBase(n) { 
00032     setSize(2*n+4);
00033     initActive();
00034   };
00035 
00036   void generate(int i, double a, NEWMAT::ColumnVector &x, NEWMAT::ColumnVector &y);
00038 
00039   // overloaded pruning methods - virtual in base
00040   int init(){ return 0;}    
00041   int init(NEWMAT::ColumnVector& pV);  
00042   int update(){ return 0;}    
00043   int update(NEWMAT::ColumnVector& pV);   
00044   bool prunes() { return true; }
00045 
00046  
00048   virtual ~GenSetBox2d() {;}  
00049 };
00050 
00051 } // namespace OPTPP
00052 #endif
Generated on Mon Jan 24 12:04:37 2011 for FASTlib by  doxygen 1.6.3