Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/home/coinadmin/Update/COIN/Clp/include/ClpDynamicExampleMatrix.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2004, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 #ifndef ClpDynamicExampleMatrix_H
00004 #define ClpDynamicExampleMatrix_H
00005 
00006 
00007 #include "CoinPragma.hpp"
00008 
00009 #include "ClpDynamicMatrix.hpp"
00010 class ClpSimplex;
00030 class ClpDynamicExampleMatrix : public ClpDynamicMatrix {
00031   
00032 public:
00034   virtual void partialPricing(ClpSimplex * model, double start, double end,
00035                       int & bestSequence, int & numberWanted);
00036   
00040   virtual void createVariable(ClpSimplex * model, int & bestSequence);
00045   virtual void packDown(const int * in, int numberToPack);
00047 
00048 
00049 
00053    ClpDynamicExampleMatrix();
00060   ClpDynamicExampleMatrix(ClpSimplex * model, int numberSets,
00061                           int numberColumns, const int * starts,
00062                           const double * lower, const double * upper,
00063                           const int * startColumn, const int * row,
00064                           const double * element, const double * cost,
00065                           const double * columnLower=NULL, const double * columnUpper=NULL,
00066                           const unsigned char * status=NULL,
00067                           const unsigned char * dynamicStatus=NULL,
00068                           int numberIds=0,const int *ids=NULL);
00070   ClpDynamicExampleMatrix(ClpSimplex * model, int numberSets,
00071                           int numberColumns, int * starts,
00072                           const double * lower, const double * upper,
00073                           int * startColumn, int * row,
00074                           float * element, float * cost,
00075                           float * columnLower=NULL, float * columnUpper=NULL,
00076                           const unsigned char * status=NULL,
00077                           const unsigned char * dynamicStatus=NULL,
00078                           int numberIds=0,const int *ids=NULL);
00079   
00081    virtual ~ClpDynamicExampleMatrix();
00083 
00087    ClpDynamicExampleMatrix(const ClpDynamicExampleMatrix&);
00088    ClpDynamicExampleMatrix& operator=(const ClpDynamicExampleMatrix&);
00090   virtual ClpMatrixBase * clone() const ;
00092 
00094 
00095   inline CoinBigIndex * startColumnGen() const
00096   { return startColumnGen_;};
00098   inline int * rowGen() const
00099   { return rowGen_;};
00101   inline float * elementGen() const
00102   { return elementGen_;};
00104   inline float * costGen() const
00105   { return costGen_;};
00107   inline int * fullStartGen() const
00108   { return fullStartGen_;};
00110   inline int * idGen() const
00111   { return idGen_;};
00113   inline float * columnLowerGen() const
00114   { return columnLowerGen_;};
00116   inline float * columnUpperGen() const
00117   { return columnUpperGen_;};
00119   inline int numberColumns() const
00120   { return numberColumns_;};
00121   inline void setDynamicStatusGen(int sequence, DynamicStatus status)
00122   {
00123     unsigned char & st_byte = dynamicStatusGen_[sequence];
00124     st_byte &= ~7;
00125     st_byte |= status;
00126   };
00127   inline DynamicStatus getDynamicStatusGen(int sequence) const
00128   {return static_cast<DynamicStatus> (dynamicStatusGen_[sequence]&7);};
00130   inline bool flaggedGen(int i) const {
00131     return (dynamicStatusGen_[i]&8)!=0;
00132   };
00133   inline void setFlaggedGen(int i) {
00134     dynamicStatusGen_[i] |= 8;
00135   };
00136   inline void unsetFlagged(int i) {
00137     dynamicStatusGen_[i]  &= ~8;;
00138   };
00140    
00141     
00142 protected:
00146 
00147   int numberColumns_;
00149   CoinBigIndex * startColumnGen_;
00151   int * rowGen_;
00153   float * elementGen_;
00155   float * costGen_;
00157   int * fullStartGen_;
00159   unsigned char * dynamicStatusGen_;
00163   int * idGen_;
00165   float * columnLowerGen_;
00167   float * columnUpperGen_;
00169 };
00170 
00171 #endif

Generated on Fri Aug 6 02:01:31 2004 by doxygen1.3-rc2