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

- File List
- File Members

# /home/coin/svn-release/Smi-0.93.1/CoinUtils/src/CoinPresolveSingleton.hpp

Go to the documentation of this file.

    00001 /* $Id: CoinPresolveSingleton.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 CoinPresolveSingleton_H
    00007 #define CoinPresolveSingleton_H
    00008 #define SLACK_DOUBLETON 2
    00009 #define SLACK_SINGLETON 8
    00010
    00015 //const int MAX_SLACK_DOUBLETONS        = 1000;
    00016
    00024 class slack_doubleton_action : public CoinPresolveAction {
    00025   struct action {
    00026     double clo;
    00027     double cup;
    00028
    00029     double rlo;
    00030     double rup;
    00031
    00032     double coeff;
    00033
    00034     int col;
    00035     int row;
    00036   };
    00037
    00038   const int nactions_;
    00039   const action *const actions_;
    00040
    00041   slack_doubleton_action(int nactions,
    00042                          const action *actions,
    00043                          const CoinPresolveAction *next) :
    00044     CoinPresolveAction(next),
    00045     nactions_(nactions),
    00046     actions_(actions)
    00047 {}
    00048
    00049  public:
    00050   const char *name() const { return ("slack_doubleton_action"); }
    00051
    00058   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00059                                            const CoinPresolveAction *next,
    00060                                         bool &notFinished);
    00061
    00062   void postsolve(CoinPostsolveMatrix *prob) const;
    00063
    00064
    00065   ~slack_doubleton_action() { deleteAction(actions_,action*); }
    00066 };
    00075 class slack_singleton_action : public CoinPresolveAction {
    00076   struct action {
    00077     double clo;
    00078     double cup;
    00079
    00080     double rlo;
    00081     double rup;
    00082
    00083     double coeff;
    00084
    00085     int col;
    00086     int row;
    00087   };
    00088
    00089   const int nactions_;
    00090   const action *const actions_;
    00091
    00092   slack_singleton_action(int nactions,
    00093                          const action *actions,
    00094                          const CoinPresolveAction *next) :
    00095     CoinPresolveAction(next),
    00096     nactions_(nactions),
    00097     actions_(actions)
    00098 {}
    00099
    00100  public:
    00101   const char *name() const { return ("slack_singleton_action"); }
    00102
    00103   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00104                                             const CoinPresolveAction *next,
    00105                                             double * rowObjective);
    00106
    00107   void postsolve(CoinPostsolveMatrix *prob) const;
    00108
    00109
    00110   ~slack_singleton_action() { deleteAction(actions_,action*); }
    00111 };
    00112 #endif