CoinPresolveEmpty.hpp
Go to the documentation of this file.
1 /* $Id: CoinPresolveEmpty.hpp 1561 2012-11-24 00:32:16Z lou $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 #ifndef CoinPresolveEmpty_H
7 #define CoinPresolveEmpty_H
8 
14 const int DROP_ROW = 3;
15 const int DROP_COL = 4;
16 
35 private:
36  const int nactions_;
37 
38  struct action {
39  double clo;
40  double cup;
41  double cost;
42  double sol;
43  int jcol;
44  };
45  const action *const actions_;
46 
47  drop_empty_cols_action(int nactions,
48  const action *const actions,
49  const CoinPresolveAction *next) :
50  CoinPresolveAction(next),
51  nactions_(nactions),
52  actions_(actions)
53  {}
54 
55  public:
56  const char *name() const { return ("drop_empty_cols_action"); }
57 
59  const int *ecols,
60  int necols,
61  const CoinPresolveAction*);
62 
64  const CoinPresolveAction *next);
65 
66  void postsolve(CoinPostsolveMatrix *prob) const;
67 
69 };
70 
71 
87 private:
88  struct action {
89  double rlo;
90  double rup;
91  int row;
92  int fill_row; // which row was moved into position row to fill it
93  };
94 
95  const int nactions_;
96  const action *const actions_;
97 
98  drop_empty_rows_action(int nactions,
99  const action *actions,
100  const CoinPresolveAction *next) :
101  CoinPresolveAction(next),
102  nactions_(nactions), actions_(actions)
103 {}
104 
105  public:
106  const char *name() const { return ("drop_empty_rows_action"); }
107 
108  static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
109  const CoinPresolveAction *next);
110 
111  void postsolve(CoinPostsolveMatrix *prob) const;
112 
114 };
115 #endif
116 
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
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
static const CoinPresolveAction * presolve(CoinPresolveMatrix *, const int *ecols, int necols, const CoinPresolveAction *)
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.