00001 // Copyright (C) 2004, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef CglDuplicateRow_H 00004 #define CglDuplicateRow_H 00005 00006 #include <string> 00007 00008 #include "CglCutGenerator.hpp" 00009 class CglStored; 00010 00012 class CglDuplicateRow : public CglCutGenerator { 00013 00014 public: 00015 00016 00037 virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs, 00038 const CglTreeInfo info = CglTreeInfo()) const; 00058 CglStored * outDuplicates( OsiSolverInterface * solver); 00059 00061 00064 00065 inline const int * duplicate() const 00066 { return duplicate_;} 00068 inline int sizeDynamic() const 00069 { return sizeDynamic_;} 00071 inline int numberOriginalRows() const 00072 { return matrix_.getNumRows();} 00074 00077 00078 inline int logLevel() const 00079 { return logLevel_;} 00080 inline void setLogLevel(int value) 00081 { logLevel_ = value;} 00083 00084 00087 00088 inline int maximumRhs() const 00089 { return maximumRhs_;} 00091 inline void setMaximumRhs(int value) 00092 { maximumRhs_=value;} 00094 00097 00098 inline int maximumDominated() const 00099 { return maximumDominated_;} 00101 inline void setMaximumDominated(int value) 00102 { maximumDominated_=value;} 00104 00106 00107 inline int mode() const 00108 { return mode_;} 00110 inline void setMode(int value) 00111 { mode_=value;} 00113 00116 00117 CglDuplicateRow (); 00118 00120 CglDuplicateRow (OsiSolverInterface * solver); 00121 00123 CglDuplicateRow ( 00124 const CglDuplicateRow & rhs); 00125 00127 virtual CglCutGenerator * clone() const; 00128 00130 CglDuplicateRow & 00131 operator=( 00132 const CglDuplicateRow& rhs); 00133 00135 virtual 00136 ~CglDuplicateRow (); 00138 virtual std::string generateCpp( FILE * fp); 00139 00141 virtual void refreshSolver(OsiSolverInterface * solver); 00143 00144 protected: 00145 00146 00147 // Protected member data 00148 00151 00152 CoinPackedMatrix matrix_; 00154 CoinPackedMatrix matrixByRow_; 00156 int * rhs_; 00158 mutable int * duplicate_; 00160 int * lower_; 00162 mutable CglStored * storedCuts_; 00164 int maximumDominated_; 00166 int maximumRhs_; 00168 mutable int sizeDynamic_; 00170 int mode_; 00172 int logLevel_; 00174 }; 00175 #endif