00001 /* $Id: ClpDualRowSteepest.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 ClpDualRowSteepest_H 00005 #define ClpDualRowSteepest_H 00006 00007 #include "ClpDualRowPivot.hpp" 00008 class CoinIndexedVector; 00009 00010 00011 //############################################################################# 00012 00019 class ClpDualRowSteepest : public ClpDualRowPivot { 00020 00021 public: 00022 00024 00025 00027 virtual int pivotRow(); 00028 00031 virtual double updateWeights(CoinIndexedVector * input, 00032 CoinIndexedVector * spare, 00033 CoinIndexedVector * spare2, 00034 CoinIndexedVector * updatedColumn); 00035 00040 virtual void updatePrimalSolution(CoinIndexedVector * input, 00041 double theta, 00042 double & changeInObjective); 00043 00054 virtual void saveWeights(ClpSimplex * model, int mode); 00056 virtual void unrollWeights(); 00058 virtual void clearArrays(); 00060 virtual bool looksOptimal() const; 00062 virtual void maximumPivotsChanged(); 00064 00067 enum Persistence { 00068 normal = 0x00, // create (if necessary) and destroy 00069 keep = 0x01 // create (if necessary) and leave 00070 }; 00071 00073 00074 00081 ClpDualRowSteepest(int mode = 3); 00082 00084 ClpDualRowSteepest(const ClpDualRowSteepest &); 00085 00087 ClpDualRowSteepest & operator=(const ClpDualRowSteepest& rhs); 00088 00090 void fill(const ClpDualRowSteepest& rhs); 00091 00093 virtual ~ClpDualRowSteepest (); 00094 00096 virtual ClpDualRowPivot * clone(bool copyData = true) const; 00097 00099 00101 00102 inline int mode() const { 00103 return mode_; 00104 } 00106 inline void setPersistence(Persistence life) { 00107 persistence_ = life; 00108 } 00109 inline Persistence persistence() const { 00110 return persistence_ ; 00111 } 00113 00114 //--------------------------------------------------------------------------- 00115 00116 private: 00118 00123 int state_; 00126 int mode_; 00128 Persistence persistence_; 00130 double * weights_; 00132 CoinIndexedVector * infeasible_; 00134 CoinIndexedVector * alternateWeights_; 00136 CoinIndexedVector * savedWeights_; 00138 int * dubiousWeights_; 00140 }; 00141 00142 #endif