/home/coin/SVN-release/Cgl-0.54.1/CoinUtils/src/CoinPresolveDupcol.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2002, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 
00004 #ifndef CoinPresolveDupcol_H
00005 #define CoinPresolveDupcol_H
00006 
00007 #include "CoinPresolveMatrix.hpp"
00008 
00013 #define DUPCOL  10
00014 
00030 class dupcol_action : public CoinPresolveAction {
00031   dupcol_action();
00032   dupcol_action(const dupcol_action& rhs);
00033   dupcol_action& operator=(const dupcol_action& rhs);
00034 
00035   struct action {
00036     double thislo;
00037     double thisup;
00038     double lastlo;
00039     double lastup;
00040     int ithis;
00041     int ilast;
00042 
00043     double *colels;
00044     int nincol;
00045   };
00046 
00047   const int nactions_;
00048   // actions_ is owned by the class and must be deleted at destruction
00049   const action *const actions_;
00050 
00051   dupcol_action(int nactions, const action *actions,
00052                 const CoinPresolveAction *next) :
00053       CoinPresolveAction(next),
00054       nactions_(nactions),
00055       actions_(actions) {}
00056 
00057  public:
00058   const char *name() const;
00059 
00060   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
00061                                          const CoinPresolveAction *next);
00062 
00063   void postsolve(CoinPostsolveMatrix *prob) const;
00064 
00065   ~dupcol_action();
00066 
00067 };
00068 
00069 
00085 class duprow_action : public CoinPresolveAction {
00086   struct action {
00087     int row;
00088     double lbound;
00089     double ubound;
00090   };
00091 
00092   const int nactions_;
00093   const action *const actions_;
00094 
00095   duprow_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
00096   duprow_action(int nactions,
00097                       const action *actions,
00098                       const CoinPresolveAction *next) :
00099     CoinPresolveAction(next),
00100     nactions_(nactions), actions_(actions) {}
00101 
00102  public:
00103   const char *name() const;
00104 
00105   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
00106                                          const CoinPresolveAction *next);
00107 
00108   void postsolve(CoinPostsolveMatrix *prob) const;
00109 
00110   //~duprow_action() { delete[]actions_; }
00111 };
00112 
00123 class gubrow_action : public CoinPresolveAction {
00124   struct action {
00125     int row;
00126     double lbound;
00127     double ubound;
00128   };
00129 
00130   const int nactions_;
00131   const action *const actions_;
00132 
00133   gubrow_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
00134   gubrow_action(int nactions,
00135                       const action *actions,
00136                       const CoinPresolveAction *next) :
00137     CoinPresolveAction(next),
00138     nactions_(nactions), actions_(actions) {}
00139 
00140  public:
00141   const char *name() const;
00142 
00143   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
00144                                          const CoinPresolveAction *next);
00145 
00146   void postsolve(CoinPostsolveMatrix *prob) const;
00147 
00148   //~gubrow_action() { delete[]actions_; }
00149 };
00150 
00151 #endif
00152 

Generated on Mon Sep 14 03:09:21 2009 for coin-Cgl by  doxygen 1.4.7