00001 // Copyright (C) 2002, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef ClpDualRowSteepest_H 00004 #define ClpDualRowSteepest_H 00005 00006 #include "ClpDualRowPivot.hpp" 00007 00008 //############################################################################# 00009 00016 class CoinIndexedVector; 00017 00018 class ClpDualRowSteepest : public ClpDualRowPivot { 00019 00020 public: 00021 00023 00024 00026 virtual int pivotRow(); 00027 00029 virtual double updateWeights(CoinIndexedVector * input, 00030 CoinIndexedVector * spare, 00031 CoinIndexedVector * updatedColumn); 00032 00037 virtual void updatePrimalSolution(CoinIndexedVector * input, 00038 double theta, 00039 double & changeInObjective); 00040 00051 virtual void saveWeights(ClpSimplex * model, int mode); 00053 virtual void unrollWeights(); 00055 virtual void clearArrays(); 00057 virtual bool looksOptimal() const; 00059 00062 enum Persistence { 00063 normal = 0x00, // create (if necessary) and destroy 00064 keep = 0x01 // create (if necessary) and leave 00065 }; 00066 00068 00069 00076 ClpDualRowSteepest(int mode=3); 00077 00079 ClpDualRowSteepest(const ClpDualRowSteepest &); 00080 00082 ClpDualRowSteepest & operator=(const ClpDualRowSteepest& rhs); 00083 00085 virtual ~ClpDualRowSteepest (); 00086 00088 virtual ClpDualRowPivot * clone(bool copyData = true) const; 00089 00091 00093 00094 inline int mode() const 00095 { return mode_;}; 00097 inline void setPersistence(Persistence life) 00098 { persistence_ = life;}; 00099 inline Persistence persistence() const 00100 { return persistence_ ;}; 00102 00103 //--------------------------------------------------------------------------- 00104 00105 private: 00107 00112 int state_; 00115 int mode_; 00117 Persistence persistence_; 00119 double * weights_; 00121 CoinIndexedVector * infeasible_; 00123 CoinIndexedVector * alternateWeights_; 00125 CoinIndexedVector * savedWeights_; 00127 int * dubiousWeights_; 00129 }; 00130 00131 #endif