CoinPresolveDupcol.hpp

Go to the documentation of this file.
00001 /* $Id: CoinPresolveDupcol.hpp 1854 2015-12-18 14:18:54Z forrest $ */
00002 // Copyright (C) 2002, International Business Machines
00003 // Corporation and others.  All Rights Reserved.
00004 // This code is licensed under the terms of the Eclipse Public License (EPL).
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   // actions_ is owned by the class and must be deleted at destruction
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   virtual ~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   //~duprow_action() { delete[]actions_; }
00113 };
00114 
00115 class duprow3_action : public CoinPresolveAction {
00116   struct action {
00117     int row;
00118     double lbound;
00119     double ubound;
00120   };
00121 
00122   const int nactions_;
00123   const action *const actions_;
00124 
00125   duprow3_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
00126   duprow3_action(int nactions,
00127                       const action *actions,
00128                       const CoinPresolveAction *next) :
00129     CoinPresolveAction(next),
00130     nactions_(nactions), actions_(actions) {}
00131 
00132  public:
00133   const char *name() const;
00134 
00135   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
00136                                          const CoinPresolveAction *next);
00137 
00138   void postsolve(CoinPostsolveMatrix *prob) const;
00139 
00140   //~duprow_action() { delete[]actions_; }
00141 };
00142 
00153 class gubrow_action : public CoinPresolveAction {
00154   struct action {
00155     double rhs;
00156     // last is row itself
00157     int * deletedRow;
00158     double * rowels;
00159     int * indices; // indices in gub row
00160     int nDrop;
00161     int ninrow;
00162   };
00163 
00164   const int nactions_;
00165   const action *const actions_;
00166 
00167   //gubrow_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
00168   gubrow_action(int nactions,
00169                       const action *actions,
00170                       const CoinPresolveAction *next) :
00171     CoinPresolveAction(next),
00172     nactions_(nactions), actions_(actions) {}
00173 
00174  public:
00175   const char *name() const;
00176 
00177   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
00178                                          const CoinPresolveAction *next);
00179 
00180   void postsolve(CoinPostsolveMatrix *prob) const;
00181 
00182   virtual ~gubrow_action();
00183 };
00184 
00195 class twoxtwo_action : public CoinPresolveAction {
00196   struct action {
00197     double lbound_row;
00198     double ubound_row;
00199     double lbound_col;
00200     double ubound_col;
00201     double cost_col;
00202     double cost_othercol;
00203     int row;
00204     int col;
00205     int othercol;
00206   };
00207 
00208   const int nactions_;
00209   const action *const actions_;
00210 
00211   twoxtwo_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
00212   twoxtwo_action(int nactions,
00213                       const action *actions,
00214                       const CoinPresolveAction *next) :
00215     CoinPresolveAction(next),
00216     nactions_(nactions), actions_(actions) {}
00217 
00218  public:
00219   const char *name() const;
00220 
00221   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
00222                                          const CoinPresolveAction *next);
00223 
00224   void postsolve(CoinPostsolveMatrix *prob) const;
00225 
00226   ~twoxtwo_action() { delete [] actions_; }
00227 };
00228 
00229 #endif
00230 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 28 Aug 2016 for CoinUtils by  doxygen 1.6.1