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

- File List
- File Members

# /home/coin/SVN-release/Osi-0.98.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
    00084 class duprow_action : public CoinPresolveAction {
    00085   struct action {
    00086     int row;
    00087     double lbound;
    00088     double ubound;
    00089   };
    00090
    00091   const int nactions_;
    00092   const action *const actions_;
    00093
    00094   duprow_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
    00095   duprow_action(int nactions,
    00096                       const action *actions,
    00097                       const CoinPresolveAction *next) :
    00098     CoinPresolveAction(next),
    00099     nactions_(nactions), actions_(actions) {}
    00100
    00101  public:
    00102   const char *name() const;
    00103
    00104   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00105                                          const CoinPresolveAction *next);
    00106
    00107   void postsolve(CoinPostsolveMatrix *prob) const;
    00108
    00109   //~duprow_action() { delete[]actions_; }
    00110 };
    00111
    00112 #endif
    00113