CoinPresolveEmpty.hpp
Go to the documentation of this file.
1 /* $Id: CoinPresolveEmpty.hpp 1215 2009-11-05 11:03:04Z forrest $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 
5 #ifndef CoinPresolveEmpty_H
6 #define CoinPresolveEmpty_H
7 
13 const int DROP_ROW = 3;
14 const int DROP_COL = 4;
15 
34 private:
35  const int nactions_;
36 
37  struct action {
38  double clo;
39  double cup;
40  double cost;
41  double sol;
42  int jcol;
43  };
44  const action *const actions_;
45 
46  drop_empty_cols_action(int nactions,
47  const action *const actions,
48  const CoinPresolveAction *next) :
49  CoinPresolveAction(next),
50  nactions_(nactions),
51  actions_(actions)
52  {}
53 
54  public:
55  const char *name() const { return ("drop_empty_cols_action"); }
56 
58  int *ecols,
59  int necols,
60  const CoinPresolveAction*);
61 
63  const CoinPresolveAction *next);
64 
65  void postsolve(CoinPostsolveMatrix *prob) const;
66 
68 };
69 
70 
86 private:
87  struct action {
88  double rlo;
89  double rup;
90  int row;
91  int fill_row; // which row was moved into position row to fill it
92  };
93 
94  const int nactions_;
95  const action *const actions_;
96 
97  drop_empty_rows_action(int nactions,
98  const action *actions,
99  const CoinPresolveAction *next) :
100  CoinPresolveAction(next),
101  nactions_(nactions), actions_(actions)
102 {}
103 
104  public:
105  const char *name() const { return ("drop_empty_rows_action"); }
106 
107  static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
108  const CoinPresolveAction *next);
109 
110  void postsolve(CoinPostsolveMatrix *prob) const;
111 
113 };
114 #endif
115 
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
static const CoinPresolveAction * presolve(CoinPresolveMatrix *, int *ecols, int necols, const CoinPresolveAction *)
const action *const actions_
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during postsol...
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during presolv...
#define deleteAction(array, type)
drop_empty_cols_action(int nactions, const action *const actions, const CoinPresolveAction *next)
const int DROP_ROW
Abstract base class of all presolve routines.
const int DROP_COL
Physically removes empty columns in presolve, and reinserts empty columns in postsolve.
const char * name() const
A name for debug printing.
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
drop_empty_rows_action(int nactions, const action *actions, const CoinPresolveAction *next)
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
const char * name() const
A name for debug printing.
Physically removes empty rows in presolve, and reinserts empty rows in postsolve. ...
const action *const actions_
const CoinPresolveAction * next
The next presolve transformation.