- Main Page
- Namespaces
- Classes
- Files
- Directories

- Search for |

- File List
- File Members

# CoinPresolveEmpty.hpp

Go to the documentation of this file.

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