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

- File List
- File Members

# /home/coin/SVN-release/Clp-1.5.0/Clp/src/ClpGubDynamicMatrix.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2003, International Business Machines
    00002 // Corporation and others.  All Rights Reserved.
    00003 #ifndef ClpGubDynamicMatrix_H
    00004 #define ClpGubDynamicMatrix_H
    00005
    00006
    00007 #include "CoinPragma.hpp"
    00008
    00009 #include "ClpGubMatrix.hpp"
    00017 class ClpGubDynamicMatrix : public ClpGubMatrix {
    00018
    00019 public:
    00022
    00023   virtual void partialPricing(ClpSimplex * model, double start, double end,
    00024                               int & bestSequence, int & numberWanted);
    00035   virtual int synchronize(ClpSimplex * model,int mode);
    00037   virtual void useEffectiveRhs(ClpSimplex * model,bool cheapest=true);
    00041   virtual int updatePivot(ClpSimplex * model,double oldInValue, double oldOutValue);
    00043   void insertNonBasic(int sequence, int iSet);
    00047   virtual double * rhsOffset(ClpSimplex * model,bool forceRefresh=false,
    00048                                 bool check=false);
    00049
    00053   virtual void times(double scalar,
    00054                        const double * x, double * y) const;
    00058   virtual int checkFeasible(ClpSimplex * model,double & sum) const;
    00060   void cleanData(ClpSimplex * model);
    00062
    00063
    00064
    00068   ClpGubDynamicMatrix();
    00070   virtual ~ClpGubDynamicMatrix();
    00072
    00076   ClpGubDynamicMatrix(const ClpGubDynamicMatrix&);
    00081   ClpGubDynamicMatrix(ClpSimplex * model, int numberSets,
    00082                       int numberColumns, const int * starts,
    00083                       const double * lower, const double * upper,
    00084                       const int * startColumn, const int * row,
    00085                       const double * element, const double * cost,
    00086                       const double * lowerColumn=NULL, const double * upperColumn=NULL,
    00087                       const unsigned char * status=NULL);
    00088
    00089   ClpGubDynamicMatrix& operator=(const ClpGubDynamicMatrix&);
    00091   virtual ClpMatrixBase * clone() const ;
    00093
    00095
    00096   enum DynamicStatus {
    00097     inSmall = 0x01,
    00098     atUpperBound = 0x02,
    00099     atLowerBound = 0x03
    00100   };
    00102   inline bool flagged(int i) const {
    00103     return (dynamicStatus_[i]&8)!=0;
    00104   }
    00105   inline void setFlagged(int i) {
    00106     dynamicStatus_[i] |= 8;
    00107   }
    00108   inline void unsetFlagged(int i) {
    00109     dynamicStatus_[i]  &= ~8;;
    00110   }
    00111   inline void setDynamicStatus(int sequence, DynamicStatus status)
    00112   {
    00113     unsigned char & st_byte = dynamicStatus_[sequence];
    00114     st_byte &= ~7;
    00115     st_byte |= status;
    00116   }
    00117   inline DynamicStatus getDynamicStatus(int sequence) const
    00118   {return static_cast<DynamicStatus> (dynamicStatus_[sequence]&7);}
    00120   inline double objectiveOffset() const
    00121   { return objectiveOffset_;}
    00123   inline CoinBigIndex * startColumn() const
    00124   { return startColumn_;}
    00126   inline int * row() const
    00127   { return row_;}
    00129   inline double * element() const
    00130   { return element_;}
    00132   inline double * cost() const
    00133   { return cost_;}
    00135   inline int * fullStart() const
    00136   { return fullStart_;}
    00138   inline int * id() const
    00139   { return id_;}
    00141   inline double * lowerColumn() const
    00142   { return lowerColumn_;}
    00144   inline double * upperColumn() const
    00145   { return upperColumn_;}
    00147   inline double * lowerSet() const
    00148   { return lowerSet_;}
    00150   inline double * upperSet() const
    00151   { return upperSet_;}
    00153   inline int numberGubColumns() const
    00154   { return numberGubColumns_;}
    00156   inline int firstAvailable() const
    00157   { return firstAvailable_;}
    00159   inline void setFirstAvailable(int value)
    00160   { firstAvailable_ = value;}
    00162   inline int firstDynamic() const
    00163   { return firstDynamic_;}
    00165   inline int lastDynamic() const
    00166   { return lastDynamic_;}
    00168   inline int numberElements() const
    00169   { return numberElements_;}
    00171   inline unsigned char * gubRowStatus() const
    00172   { return status_;}
    00174   inline unsigned char * dynamicStatus() const
    00175   { return dynamicStatus_;}
    00177   int whichSet (int sequence) const;
    00179
    00180
    00181 protected:
    00185
    00186   double objectiveOffset_;
    00188   CoinBigIndex * startColumn_;
    00190   int * row_;
    00192   double * element_;
    00194   double * cost_;
    00196   int * fullStart_;
    00198   int * id_;
    00200   unsigned char * dynamicStatus_;
    00202   double * lowerColumn_;
    00204   double * upperColumn_;
    00206   double * lowerSet_;
    00208   double * upperSet_;
    00210   int numberGubColumns_;
    00212   int firstAvailable_;
    00214   int savedFirstAvailable_;
    00216   int firstDynamic_;
    00218   int lastDynamic_;
    00220   int numberElements_;
    00222 };
    00223
    00224 #endif