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

- File List
- File Members

# /home/coin/svn-release/Bcps-0.93.11/Clp/src/ClpDynamicExampleMatrix.hpp

Go to the documentation of this file.

    00001 /* $Id: ClpDynamicExampleMatrix.hpp 1941 2013-04-10 16:52:27Z stefan $ */
    00002 // Copyright (C) 2004, International Business Machines
    00003 // Corporation and others.  All Rights Reserved.
    00004 // This code is licensed under the terms of the Eclipse Public License (EPL).
    00005
    00006 #ifndef ClpDynamicExampleMatrix_H
    00007 #define ClpDynamicExampleMatrix_H
    00008
    00009
    00010 #include "CoinPragma.hpp"
    00011
    00012 #include "ClpDynamicMatrix.hpp"
    00013 class ClpSimplex;
    00033 class ClpDynamicExampleMatrix : public ClpDynamicMatrix {
    00034
    00035 public:
    00038
    00039      virtual void partialPricing(ClpSimplex * model, double start, double end,
    00040                                  int & bestSequence, int & numberWanted);
    00041
    00045      virtual void createVariable(ClpSimplex * model, int & bestSequence);
    00050      virtual void packDown(const int * in, int numberToPack);
    00052
    00053
    00054
    00058      ClpDynamicExampleMatrix();
    00065      ClpDynamicExampleMatrix(ClpSimplex * model, int numberSets,
    00066                              int numberColumns, const int * starts,
    00067                              const double * lower, const double * upper,
    00068                              const int * startColumn, const int * row,
    00069                              const double * element, const double * cost,
    00070                              const double * columnLower = NULL, const double * columnUpper = NULL,
    00071                              const unsigned char * status = NULL,
    00072                              const unsigned char * dynamicStatus = NULL,
    00073                              int numberIds = 0, const int *ids = NULL);
    00074 #if 0
    00076      ClpDynamicExampleMatrix(ClpSimplex * model, int numberSets,
    00077                              int numberColumns, int * starts,
    00078                              const double * lower, const double * upper,
    00079                              int * startColumn, int * row,
    00080                              double * element, double * cost,
    00081                              double * columnLower = NULL, double * columnUpper = NULL,
    00082                              const unsigned char * status = NULL,
    00083                              const unsigned char * dynamicStatus = NULL,
    00084                              int numberIds = 0, const int *ids = NULL);
    00085 #endif
    00086
    00087      virtual ~ClpDynamicExampleMatrix();
    00089
    00093      ClpDynamicExampleMatrix(const ClpDynamicExampleMatrix&);
    00094      ClpDynamicExampleMatrix& operator=(const ClpDynamicExampleMatrix&);
    00096      virtual ClpMatrixBase * clone() const ;
    00098
    00100
    00101      inline CoinBigIndex * startColumnGen() const {
    00102           return startColumnGen_;
    00103      }
    00105      inline int * rowGen() const {
    00106           return rowGen_;
    00107      }
    00109      inline double * elementGen() const {
    00110           return elementGen_;
    00111      }
    00113      inline double * costGen() const {
    00114           return costGen_;
    00115      }
    00117      inline int * fullStartGen() const {
    00118           return fullStartGen_;
    00119      }
    00121      inline int * idGen() const {
    00122           return idGen_;
    00123      }
    00125      inline double * columnLowerGen() const {
    00126           return columnLowerGen_;
    00127      }
    00129      inline double * columnUpperGen() const {
    00130           return columnUpperGen_;
    00131      }
    00133      inline int numberColumns() const {
    00134           return numberColumns_;
    00135      }
    00136      inline void setDynamicStatusGen(int sequence, DynamicStatus status) {
    00137           unsigned char & st_byte = dynamicStatusGen_[sequence];
    00138           st_byte = static_cast<unsigned char>(st_byte & ~7);
    00139           st_byte = static_cast<unsigned char>(st_byte | status);
    00140      }
    00141      inline DynamicStatus getDynamicStatusGen(int sequence) const {
    00142           return static_cast<DynamicStatus> (dynamicStatusGen_[sequence] & 7);
    00143      }
    00145      inline bool flaggedGen(int i) const {
    00146           return (dynamicStatusGen_[i] & 8) != 0;
    00147      }
    00148      inline void setFlaggedGen(int i) {
    00149           dynamicStatusGen_[i] = static_cast<unsigned char>(dynamicStatusGen_[i] | 8);
    00150      }
    00151      inline void unsetFlagged(int i) {
    00152           dynamicStatusGen_[i] = static_cast<unsigned char>(dynamicStatusGen_[i] & ~8);
    00153      }
    00155
    00156
    00157 protected:
    00161
    00162      int numberColumns_;
    00164      CoinBigIndex * startColumnGen_;
    00166      int * rowGen_;
    00168      double * elementGen_;
    00170      double * costGen_;
    00172      int * fullStartGen_;
    00174      unsigned char * dynamicStatusGen_;
    00178      int * idGen_;
    00180      double * columnLowerGen_;
    00182      double * columnUpperGen_;
    00184 };
    00185
    00186 #endif