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

- File List
- File Members

# /home/coin/SVN-release/Alps-1.2.1/CoinUtils/src/CoinPresolveSingleton.hpp

Go to the documentation of this file.

    00001 /* $Id: CoinPresolveSingleton.hpp 1316 2010-08-31 09:39:29Z forrest $ */
    00002 // Copyright (C) 2002, International Business Machines
    00003 // Corporation and others.  All Rights Reserved.
    00004
    00005 #ifndef CoinPresolveSingleton_H
    00006 #define CoinPresolveSingleton_H
    00007 #define SLACK_DOUBLETON 2
    00008 #define SLACK_SINGLETON 8
    00009
    00014 //const int MAX_SLACK_DOUBLETONS        = 1000;
    00015
    00023 class slack_doubleton_action : public CoinPresolveAction {
    00024   struct action {
    00025     double clo;
    00026     double cup;
    00027
    00028     double rlo;
    00029     double rup;
    00030
    00031     double coeff;
    00032
    00033     int col;
    00034     int row;
    00035   };
    00036
    00037   const int nactions_;
    00038   const action *const actions_;
    00039
    00040   slack_doubleton_action(int nactions,
    00041                          const action *actions,
    00042                          const CoinPresolveAction *next) :
    00043     CoinPresolveAction(next),
    00044     nactions_(nactions),
    00045     actions_(actions)
    00046 {}
    00047
    00048  public:
    00049   const char *name() const { return ("slack_doubleton_action"); }
    00050
    00057   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00058                                            const CoinPresolveAction *next,
    00059                                         bool &notFinished);
    00060
    00061   void postsolve(CoinPostsolveMatrix *prob) const;
    00062
    00063
    00064   ~slack_doubleton_action() { deleteAction(actions_,action*); }
    00065 };
    00074 class slack_singleton_action : public CoinPresolveAction {
    00075   struct action {
    00076     double clo;
    00077     double cup;
    00078
    00079     double rlo;
    00080     double rup;
    00081
    00082     double coeff;
    00083
    00084     int col;
    00085     int row;
    00086   };
    00087
    00088   const int nactions_;
    00089   const action *const actions_;
    00090
    00091   slack_singleton_action(int nactions,
    00092                          const action *actions,
    00093                          const CoinPresolveAction *next) :
    00094     CoinPresolveAction(next),
    00095     nactions_(nactions),
    00096     actions_(actions)
    00097 {}
    00098
    00099  public:
    00100   const char *name() const { return ("slack_singleton_action"); }
    00101
    00102   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00103                                             const CoinPresolveAction *next,
    00104                                             double * rowObjective);
    00105
    00106   void postsolve(CoinPostsolveMatrix *prob) const;
    00107
    00108
    00109   ~slack_singleton_action() { deleteAction(actions_,action*); }
    00110 };
    00111 #endif