- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# /home/coin/SVN-release/Osi-0.98.1/Clp/src/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:
    00035
    00036   virtual void partialPricing(ClpSimplex * model, double start, double end,
    00037                       int & bestSequence, int & numberWanted);
    00038
    00042   virtual void createVariable(ClpSimplex * model, int & bestSequence);
    00047   virtual void packDown(const int * in, int numberToPack);
    00049
    00050
    00051
    00055    ClpDynamicExampleMatrix();
    00062   ClpDynamicExampleMatrix(ClpSimplex * model, int numberSets,
    00063                           int numberColumns, const int * starts,
    00064                           const double * lower, const double * upper,
    00065                           const int * startColumn, const int * row,
    00066                           const double * element, const double * cost,
    00067                           const double * columnLower=NULL, const double * columnUpper=NULL,
    00068                           const unsigned char * status=NULL,
    00069                           const unsigned char * dynamicStatus=NULL,
    00070                           int numberIds=0,const int *ids=NULL);
    00072   ClpDynamicExampleMatrix(ClpSimplex * model, int numberSets,
    00073                           int numberColumns, int * starts,
    00074                           const double * lower, const double * upper,
    00075                           int * startColumn, int * row,
    00076                           double * element, double * cost,
    00077                           double * columnLower=NULL, double * columnUpper=NULL,
    00078                           const unsigned char * status=NULL,
    00079                           const unsigned char * dynamicStatus=NULL,
    00080                           int numberIds=0,const int *ids=NULL);
    00081
    00083    virtual ~ClpDynamicExampleMatrix();
    00085
    00089    ClpDynamicExampleMatrix(const ClpDynamicExampleMatrix&);
    00090    ClpDynamicExampleMatrix& operator=(const ClpDynamicExampleMatrix&);
    00092   virtual ClpMatrixBase * clone() const ;
    00094
    00096
    00097   inline CoinBigIndex * startColumnGen() const
    00098   { return startColumnGen_;}
    00100   inline int * rowGen() const
    00101   { return rowGen_;}
    00103   inline double * elementGen() const
    00104   { return elementGen_;}
    00106   inline double * costGen() const
    00107   { return costGen_;}
    00109   inline int * fullStartGen() const
    00110   { return fullStartGen_;}
    00112   inline int * idGen() const
    00113   { return idGen_;}
    00115   inline double * columnLowerGen() const
    00116   { return columnLowerGen_;}
    00118   inline double * columnUpperGen() const
    00119   { return columnUpperGen_;}
    00121   inline int numberColumns() const
    00122   { return numberColumns_;}
    00123   inline void setDynamicStatusGen(int sequence, DynamicStatus status)
    00124   {
    00125     unsigned char & st_byte = dynamicStatusGen_[sequence];
    00126     st_byte &= ~7;
    00127     st_byte |= status;
    00128   }
    00129   inline DynamicStatus getDynamicStatusGen(int sequence) const
    00130   {return static_cast<DynamicStatus> (dynamicStatusGen_[sequence]&7);}
    00132   inline bool flaggedGen(int i) const {
    00133     return (dynamicStatusGen_[i]&8)!=0;
    00134   }
    00135   inline void setFlaggedGen(int i) {
    00136     dynamicStatusGen_[i] |= 8;
    00137   }
    00138   inline void unsetFlagged(int i) {
    00139     dynamicStatusGen_[i]  &= ~8;;
    00140   }
    00142
    00143
    00144 protected:
    00148
    00149   int numberColumns_;
    00151   CoinBigIndex * startColumnGen_;
    00153   int * rowGen_;
    00155   double * elementGen_;
    00157   double * costGen_;
    00159   int * fullStartGen_;
    00161   unsigned char * dynamicStatusGen_;
    00165   int * idGen_;
    00167   double * columnLowerGen_;
    00169   double * columnUpperGen_;
    00171 };
    00172
    00173 #endif