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

- File List
- File Members

# /home/coin/svn-release/Blis-0.93.2/CoinUtils/src/CoinPresolveDupcol.hpp

Go to the documentation of this file.

    00001 /* $Id: CoinPresolveDupcol.hpp 1372 2011-01-03 23:31:00Z lou $ */
    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   ~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
    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   //~gubrow_action() { delete[]actions_; }
    00151 };
    00152
    00153 #endif
    00154