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

- File List
- File Members

# /home/coin/SVN-release/Alps-1.2.1/Clp/src/ClpDynamicExampleMatrix.hpp

Go to the documentation of this file.

    00001 /* $Id: ClpDynamicExampleMatrix.hpp 1525 2010-02-26 17:27:59Z mjs $ */
    00002 // Copyright (C) 2004, International Business Machines
    00003 // Corporation and others.  All Rights Reserved.
    00004 #ifndef ClpDynamicExampleMatrix_H
    00005 #define ClpDynamicExampleMatrix_H
    00006
    00007
    00008 #include "CoinPragma.hpp"
    00009
    00010 #include "ClpDynamicMatrix.hpp"
    00011 class ClpSimplex;
    00031 class ClpDynamicExampleMatrix : public ClpDynamicMatrix {
    00032
    00033 public:
    00036
    00037      virtual void partialPricing(ClpSimplex * model, double start, double end,
    00038                                  int & bestSequence, int & numberWanted);
    00039
    00043      virtual void createVariable(ClpSimplex * model, int & bestSequence);
    00048      virtual void packDown(const int * in, int numberToPack);
    00050
    00051
    00052
    00056      ClpDynamicExampleMatrix();
    00063      ClpDynamicExampleMatrix(ClpSimplex * model, int numberSets,
    00064                              int numberColumns, const int * starts,
    00065                              const double * lower, const double * upper,
    00066                              const int * startColumn, const int * row,
    00067                              const double * element, const double * cost,
    00068                              const double * columnLower = NULL, const double * columnUpper = NULL,
    00069                              const unsigned char * status = NULL,
    00070                              const unsigned char * dynamicStatus = NULL,
    00071                              int numberIds = 0, const int *ids = NULL);
    00073      ClpDynamicExampleMatrix(ClpSimplex * model, int numberSets,
    00074                              int numberColumns, int * starts,
    00075                              const double * lower, const double * upper,
    00076                              int * startColumn, int * row,
    00077                              double * element, double * cost,
    00078                              double * columnLower = NULL, double * columnUpper = NULL,
    00079                              const unsigned char * status = NULL,
    00080                              const unsigned char * dynamicStatus = NULL,
    00081                              int numberIds = 0, const int *ids = NULL);
    00082
    00084      virtual ~ClpDynamicExampleMatrix();
    00086
    00090      ClpDynamicExampleMatrix(const ClpDynamicExampleMatrix&);
    00091      ClpDynamicExampleMatrix& operator=(const ClpDynamicExampleMatrix&);
    00093      virtual ClpMatrixBase * clone() const ;
    00095
    00097
    00098      inline CoinBigIndex * startColumnGen() const {
    00099           return startColumnGen_;
    00100      }
    00102      inline int * rowGen() const {
    00103           return rowGen_;
    00104      }
    00106      inline double * elementGen() const {
    00107           return elementGen_;
    00108      }
    00110      inline double * costGen() const {
    00111           return costGen_;
    00112      }
    00114      inline int * fullStartGen() const {
    00115           return fullStartGen_;
    00116      }
    00118      inline int * idGen() const {
    00119           return idGen_;
    00120      }
    00122      inline double * columnLowerGen() const {
    00123           return columnLowerGen_;
    00124      }
    00126      inline double * columnUpperGen() const {
    00127           return columnUpperGen_;
    00128      }
    00130      inline int numberColumns() const {
    00131           return numberColumns_;
    00132      }
    00133      inline void setDynamicStatusGen(int sequence, DynamicStatus status) {
    00134           unsigned char & st_byte = dynamicStatusGen_[sequence];
    00135           st_byte = static_cast<unsigned char>(st_byte & ~7);
    00136           st_byte = static_cast<unsigned char>(st_byte | status);
    00137      }
    00138      inline DynamicStatus getDynamicStatusGen(int sequence) const {
    00139           return static_cast<DynamicStatus> (dynamicStatusGen_[sequence] & 7);
    00140      }
    00142      inline bool flaggedGen(int i) const {
    00143           return (dynamicStatusGen_[i] & 8) != 0;
    00144      }
    00145      inline void setFlaggedGen(int i) {
    00146           dynamicStatusGen_[i] = static_cast<unsigned char>(dynamicStatusGen_[i] | 8);
    00147      }
    00148      inline void unsetFlagged(int i) {
    00149           dynamicStatusGen_[i] = static_cast<unsigned char>(dynamicStatusGen_[i] & ~8);
    00150      }
    00152
    00153
    00154 protected:
    00158
    00159      int numberColumns_;
    00161      CoinBigIndex * startColumnGen_;
    00163      int * rowGen_;
    00165      double * elementGen_;
    00167      double * costGen_;
    00169      int * fullStartGen_;
    00171      unsigned char * dynamicStatusGen_;
    00175      int * idGen_;
    00177      double * columnLowerGen_;
    00179      double * columnUpperGen_;
    00181 };
    00182
    00183 #endif