00001
00002
00003
00004
00005
00006 #ifndef CoinPresolveDupcol_H
00007 #define CoinPresolveDupcol_H
00008
00009 #include "CoinPresolveMatrix.hpp"
00010
00015 #define DUPCOL 10
00016
00032 class dupcol_action : public CoinPresolveAction {
00033 dupcol_action();
00034 dupcol_action(const dupcol_action& rhs);
00035 dupcol_action& operator=(const dupcol_action& rhs);
00036
00037 struct action {
00038 double thislo;
00039 double thisup;
00040 double lastlo;
00041 double lastup;
00042 int ithis;
00043 int ilast;
00044
00045 double *colels;
00046 int nincol;
00047 };
00048
00049 const int nactions_;
00050
00051 const action *const actions_;
00052
00053 dupcol_action(int nactions, const action *actions,
00054 const CoinPresolveAction *next) :
00055 CoinPresolveAction(next),
00056 nactions_(nactions),
00057 actions_(actions) {}
00058
00059 public:
00060 const char *name() const;
00061
00062 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
00063 const CoinPresolveAction *next);
00064
00065 void postsolve(CoinPostsolveMatrix *prob) const;
00066
00067 ~dupcol_action();
00068
00069 };
00070
00071
00087 class duprow_action : public CoinPresolveAction {
00088 struct action {
00089 int row;
00090 double lbound;
00091 double ubound;
00092 };
00093
00094 const int nactions_;
00095 const action *const actions_;
00096
00097 duprow_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
00098 duprow_action(int nactions,
00099 const action *actions,
00100 const CoinPresolveAction *next) :
00101 CoinPresolveAction(next),
00102 nactions_(nactions), actions_(actions) {}
00103
00104 public:
00105 const char *name() const;
00106
00107 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
00108 const CoinPresolveAction *next);
00109
00110 void postsolve(CoinPostsolveMatrix *prob) const;
00111
00112
00113 };
00114
00125 class gubrow_action : public CoinPresolveAction {
00126 struct action {
00127 int row;
00128 double lbound;
00129 double ubound;
00130 };
00131
00132 const int nactions_;
00133 const action *const actions_;
00134
00135 gubrow_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
00136 gubrow_action(int nactions,
00137 const action *actions,
00138 const CoinPresolveAction *next) :
00139 CoinPresolveAction(next),
00140 nactions_(nactions), actions_(actions) {}
00141
00142 public:
00143 const char *name() const;
00144
00145 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
00146 const CoinPresolveAction *next);
00147
00148 void postsolve(CoinPostsolveMatrix *prob) const;
00149
00150
00151 };
00152
00153 #endif
00154