00001 /* $Id: ClpPrimalColumnPivot.hpp 1525 2010-02-26 17:27:59Z mjs $ */ 00002 // Copyright (C) 2002, International Business Machines 00003 // Corporation and others. All Rights Reserved. 00004 #ifndef ClpPrimalcolumnPivot_H 00005 #define ClpPrimalcolumnPivot_H 00006 00007 class ClpSimplex; 00008 class CoinIndexedVector; 00009 00010 //############################################################################# 00011 00023 class ClpPrimalColumnPivot { 00024 00025 public: 00026 00028 00029 00048 virtual int pivotColumn(CoinIndexedVector * updates, 00049 CoinIndexedVector * spareRow1, 00050 CoinIndexedVector * spareRow2, 00051 CoinIndexedVector * spareColumn1, 00052 CoinIndexedVector * spareColumn2) = 0; 00053 00055 virtual void updateWeights(CoinIndexedVector * input); 00056 00068 virtual void saveWeights(ClpSimplex * model, int mode) = 0; 00074 virtual int pivotRow(double & way) { 00075 way = 0; 00076 return -2; 00077 } 00079 virtual void clearArrays(); 00081 virtual bool looksOptimal() const { 00082 return looksOptimal_; 00083 } 00085 virtual void setLooksOptimal(bool flag) { 00086 looksOptimal_ = flag; 00087 } 00089 00090 00092 00093 00094 ClpPrimalColumnPivot(); 00095 00097 ClpPrimalColumnPivot(const ClpPrimalColumnPivot &); 00098 00100 ClpPrimalColumnPivot & operator=(const ClpPrimalColumnPivot& rhs); 00101 00103 virtual ~ClpPrimalColumnPivot (); 00104 00106 virtual ClpPrimalColumnPivot * clone(bool copyData = true) const = 0; 00107 00109 00111 00112 00113 inline ClpSimplex * model() { 00114 return model_; 00115 } 00117 inline void setModel(ClpSimplex * newmodel) { 00118 model_ = newmodel; 00119 } 00120 00122 inline int type() { 00123 return type_; 00124 } 00125 00129 virtual int numberSprintColumns(int & numberIterations) const; 00131 virtual void switchOffSprint(); 00133 virtual void maximumPivotsChanged() {} 00134 00136 00137 //--------------------------------------------------------------------------- 00138 00139 protected: 00141 00142 00143 ClpSimplex * model_; 00145 int type_; 00147 bool looksOptimal_; 00149 }; 00150 00151 #endif