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

- File List
- File Members

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