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

- File List
- File Members

# /home/coin/SVN-release/CoinUtils-2.6.1/CoinUtils/src/CoinPresolveEmpty.hpp

Go to the documentation of this file.

    00001 /* $Id: CoinPresolveEmpty.hpp 1215 2009-11-05 11:03:04Z forrest $ */
    00002 // Copyright (C) 2002, International Business Machines
    00003 // Corporation and others.  All Rights Reserved.
    00004
    00005 #ifndef CoinPresolveEmpty_H
    00006 #define CoinPresolveEmpty_H
    00007
    00013 const int DROP_ROW = 3;
    00014 const int DROP_COL = 4;
    00015
    00033 class drop_empty_cols_action : public CoinPresolveAction {
    00034 private:
    00035   const int nactions_;
    00036
    00037   struct action {
    00038     double clo;
    00039     double cup;
    00040     double cost;
    00041     double sol;
    00042     int jcol;
    00043   };
    00044   const action *const actions_;
    00045
    00046   drop_empty_cols_action(int nactions,
    00047                          const action *const actions,
    00048                          const CoinPresolveAction *next) :
    00049     CoinPresolveAction(next),
    00050     nactions_(nactions),
    00051     actions_(actions)
    00052   {}
    00053
    00054  public:
    00055   const char *name() const { return ("drop_empty_cols_action"); }
    00056
    00057   static const CoinPresolveAction *presolve(CoinPresolveMatrix *,
    00058                                          int *ecols,
    00059                                          int necols,
    00060                                          const CoinPresolveAction*);
    00061
    00062   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00063                                          const CoinPresolveAction *next);
    00064
    00065   void postsolve(CoinPostsolveMatrix *prob) const;
    00066
    00067   ~drop_empty_cols_action() { deleteAction(actions_,action*); }
    00068 };
    00069
    00070
    00085 class drop_empty_rows_action : public CoinPresolveAction {
    00086 private:
    00087   struct action {
    00088     double rlo;
    00089     double rup;
    00090     int row;
    00091     int fill_row;       // which row was moved into position row to fill it
    00092   };
    00093
    00094   const int nactions_;
    00095   const action *const actions_;
    00096
    00097   drop_empty_rows_action(int nactions,
    00098                          const action *actions,
    00099                          const CoinPresolveAction *next) :
    00100     CoinPresolveAction(next),
    00101     nactions_(nactions), actions_(actions)
    00102 {}
    00103
    00104  public:
    00105   const char *name() const { return ("drop_empty_rows_action"); }
    00106
    00107   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00108                                             const CoinPresolveAction *next);
    00109
    00110   void postsolve(CoinPostsolveMatrix *prob) const;
    00111
    00112   ~drop_empty_rows_action() { deleteAction(actions_,action*); }
    00113 };
    00114 #endif
    00115