00001 // Copyright (C) 2002, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef ClpPrimalcolumnPivot_H 00004 #define ClpPrimalcolumnPivot_H 00005 00006 class ClpSimplex; 00007 class CoinIndexedVector; 00008 00009 //############################################################################# 00010 00022 class ClpPrimalColumnPivot { 00023 00024 public: 00025 00027 00028 00047 virtual int pivotColumn(CoinIndexedVector * updates, 00048 CoinIndexedVector * spareRow1, 00049 CoinIndexedVector * spareRow2, 00050 CoinIndexedVector * spareColumn1, 00051 CoinIndexedVector * spareColumn2) = 0; 00052 00054 virtual void updateWeights(CoinIndexedVector * input); 00055 00067 virtual void saveWeights(ClpSimplex * model,int mode)=0; 00073 virtual int pivotRow(double & way) 00074 {way=0;return -2;}; 00076 virtual void clearArrays(); 00078 virtual bool looksOptimal() const 00079 { return false;}; 00081 00082 00084 00085 00086 ClpPrimalColumnPivot(); 00087 00089 ClpPrimalColumnPivot(const ClpPrimalColumnPivot &); 00090 00092 ClpPrimalColumnPivot & operator=(const ClpPrimalColumnPivot& rhs); 00093 00095 virtual ~ClpPrimalColumnPivot (); 00096 00098 virtual ClpPrimalColumnPivot * clone(bool copyData = true) const = 0; 00099 00101 00103 00104 00105 inline ClpSimplex * model() 00106 { return model_;}; 00107 00109 inline int type() 00110 { return type_;}; 00111 00115 virtual int numberSprintColumns(int & numberIterations) const; 00117 virtual void switchOffSprint(); 00118 00120 00121 //--------------------------------------------------------------------------- 00122 00123 protected: 00125 00126 00127 ClpSimplex * model_; 00129 int type_; 00131 }; 00132 00133 #endif