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

- File List
- File Members

# /home/coin/SVN-release/Osi-0.98.1/CoinUtils/src/CoinPresolveEmpty.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 CoinPresolveEmpty_H
    00005 #define CoinPresolveEmpty_H
    00006
    00012 const int DROP_ROW = 3;
    00013 const int DROP_COL = 4;
    00014
    00032 class drop_empty_cols_action : public CoinPresolveAction {
    00033 private:
    00034   const int nactions_;
    00035
    00036   struct action {
    00037     double clo;
    00038     double cup;
    00039     double cost;
    00040     double sol;
    00041     int jcol;
    00042   };
    00043   const action *const actions_;
    00044
    00045   drop_empty_cols_action(int nactions,
    00046                          const action *const actions,
    00047                          const CoinPresolveAction *next) :
    00048     CoinPresolveAction(next),
    00049     nactions_(nactions),
    00050     actions_(actions)
    00051   {}
    00052
    00053  public:
    00054   const char *name() const { return ("drop_empty_cols_action"); }
    00055
    00056   static const CoinPresolveAction *presolve(CoinPresolveMatrix *,
    00057                                          int *ecols,
    00058                                          int necols,
    00059                                          const CoinPresolveAction*);
    00060
    00061   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00062                                          const CoinPresolveAction *next);
    00063
    00064   void postsolve(CoinPostsolveMatrix *prob) const;
    00065
    00066   ~drop_empty_cols_action() { deleteAction(actions_,action*); }
    00067 };
    00068
    00069
    00084 class drop_empty_rows_action : public CoinPresolveAction {
    00085 private:
    00086   struct action {
    00087     double rlo;
    00088     double rup;
    00089     int row;
    00090     int fill_row;       // which row was moved into position row to fill it
    00091   };
    00092
    00093   const int nactions_;
    00094   const action *const actions_;
    00095
    00096   drop_empty_rows_action(int nactions,
    00097                          const action *actions,
    00098                          const CoinPresolveAction *next) :
    00099     CoinPresolveAction(next),
    00100     nactions_(nactions), actions_(actions)
    00101 {}
    00102
    00103  public:
    00104   const char *name() const { return ("drop_empty_rows_action"); }
    00105
    00106   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00107                                             const CoinPresolveAction *next);
    00108
    00109   void postsolve(CoinPostsolveMatrix *prob) const;
    00110
    00111   ~drop_empty_rows_action() { deleteAction(actions_,action*); }
    00112 };
    00113 #endif
    00114