• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/build/buildd/coinutils-2.6.4/CoinUtils/src/CoinPresolveDupcol.hpp

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

Generated on Fri Oct 15 2010 18:21:02 by  doxygen 1.7.1