- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# /home/coin/svn-release/Alps-1.5.2/CoinUtils/src/CoinPresolveDupcol.hpp

Go to the documentation of this file.

    00001 /* $Id: CoinPresolveDupcol.hpp 1817 2015-03-22 16:43:28Z 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     int row;
    00156     double lbound;
    00157     double ubound;
    00158   };
    00159
    00160   const int nactions_;
    00161   const action *const actions_;
    00162
    00163   gubrow_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
    00164   gubrow_action(int nactions,
    00165                       const action *actions,
    00166                       const CoinPresolveAction *next) :
    00167     CoinPresolveAction(next),
    00168     nactions_(nactions), actions_(actions) {}
    00169
    00170  public:
    00171   const char *name() const;
    00172
    00173   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00174                                          const CoinPresolveAction *next);
    00175
    00176   void postsolve(CoinPostsolveMatrix *prob) const;
    00177
    00178   //~gubrow_action() { delete[]actions_; }
    00179 };
    00180
    00191 class twoxtwo_action : public CoinPresolveAction {
    00192   struct action {
    00193     double lbound_row;
    00194     double ubound_row;
    00195     double lbound_col;
    00196     double ubound_col;
    00197     double cost_col;
    00198     double cost_othercol;
    00199     int row;
    00200     int col;
    00201     int othercol;
    00202   };
    00203
    00204   const int nactions_;
    00205   const action *const actions_;
    00206
    00207   twoxtwo_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
    00208   twoxtwo_action(int nactions,
    00209                       const action *actions,
    00210                       const CoinPresolveAction *next) :
    00211     CoinPresolveAction(next),
    00212     nactions_(nactions), actions_(actions) {}
    00213
    00214  public:
    00215   const char *name() const;
    00216
    00217   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00218                                          const CoinPresolveAction *next);
    00219
    00220   void postsolve(CoinPostsolveMatrix *prob) const;
    00221
    00222   ~twoxtwo_action() { delete [] actions_; }
    00223 };
    00224
    00225 #endif
    00226