00001 /* $Id: ClpDualRowPivot.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 ClpDualRowPivot_H 00005 #define ClpDualRowPivot_H 00006 00007 class ClpSimplex; 00008 class CoinIndexedVector; 00009 00010 //############################################################################# 00011 00020 class ClpDualRowPivot { 00021 00022 public: 00023 00025 00026 00028 virtual int pivotRow() = 0; 00029 00032 virtual double updateWeights(CoinIndexedVector * input, 00033 CoinIndexedVector * spare, 00034 CoinIndexedVector * spare2, 00035 CoinIndexedVector * updatedColumn) = 0; 00036 00043 /* FIXME: this was pure virtul (=0). Why? */ 00044 virtual void updatePrimalSolution(CoinIndexedVector * input, 00045 double theta, 00046 double & changeInObjective) = 0; 00057 virtual void saveWeights(ClpSimplex * model, int mode); 00059 virtual void checkAccuracy(); 00061 virtual void unrollWeights(); 00063 virtual void clearArrays(); 00065 virtual bool looksOptimal() const { 00066 return false; 00067 } 00069 virtual void maximumPivotsChanged() {} 00071 00072 00074 00075 00076 ClpDualRowPivot(); 00077 00079 ClpDualRowPivot(const ClpDualRowPivot &); 00080 00082 ClpDualRowPivot & operator=(const ClpDualRowPivot& rhs); 00083 00085 virtual ~ClpDualRowPivot (); 00086 00088 virtual ClpDualRowPivot * clone(bool copyData = true) const = 0; 00089 00091 00093 00094 00095 inline ClpSimplex * model() { 00096 return model_; 00097 } 00098 00100 inline void setModel(ClpSimplex * newmodel) { 00101 model_ = newmodel; 00102 } 00103 00105 inline int type() { 00106 return type_; 00107 } 00108 00110 00111 //--------------------------------------------------------------------------- 00112 00113 protected: 00115 00116 00117 ClpSimplex * model_; 00119 int type_; 00121 }; 00122 00123 #endif