Osi 0.107.7

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

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
34 class drop_empty_cols_action : public CoinPresolveAction {
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
58 static const CoinPresolveAction *presolve(CoinPresolveMatrix *,
59 const int *ecols,
60 int necols,
61 const CoinPresolveAction*);
62
63 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
64 const CoinPresolveAction *next);
65
66 void postsolve(CoinPostsolveMatrix *prob) const;
67
68 virtual ~drop_empty_cols_action() { deleteAction(actions_,action*); }
69 };
70
71
86 class drop_empty_rows_action : public CoinPresolveAction {
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
113 virtual ~drop_empty_rows_action() { deleteAction(actions_,action*); }
114 };
115 #endif
116
drop_empty_rows_action::action::row
int row
Definition: CoinPresolveEmpty.hpp:91
drop_empty_cols_action::postsolve
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
drop_empty_cols_action::action::jcol
int jcol
Definition: CoinPresolveEmpty.hpp:43
drop_empty_cols_action::~drop_empty_cols_action
virtual ~drop_empty_cols_action()
Definition: CoinPresolveEmpty.hpp:68
drop_empty_cols_action::actions_
const action *const actions_
Definition: CoinPresolveEmpty.hpp:45
drop_empty_cols_action::nactions_
const int nactions_
Definition: CoinPresolveEmpty.hpp:36
drop_empty_rows_action::action::rlo
double rlo
Definition: CoinPresolveEmpty.hpp:89
CoinPresolveAction
Abstract base class of all presolve routines.
Definition: CoinPresolveMatrix.hpp:155
drop_empty_cols_action::drop_empty_cols_action
drop_empty_cols_action(int nactions, const action *const actions, const CoinPresolveAction *next)
Definition: CoinPresolveEmpty.hpp:47
deleteAction
#define deleteAction(array, type)
Definition: CoinPresolveMatrix.hpp:38
drop_empty_rows_action::action::fill_row
int fill_row
Definition: CoinPresolveEmpty.hpp:92
drop_empty_cols_action::action::cost
double cost
Definition: CoinPresolveEmpty.hpp:41
DROP_COL
const int DROP_COL
Definition: CoinPresolveEmpty.hpp:15
drop_empty_cols_action::presolve
static const CoinPresolveAction * presolve(CoinPresolveMatrix *, const int *ecols, int necols, const CoinPresolveAction *)
DROP_ROW
const int DROP_ROW
Definition: CoinPresolveEmpty.hpp:14
CoinPresolveAction::next
const CoinPresolveAction * next
The next presolve transformation.
Definition: CoinPresolveMatrix.hpp:171
CoinPostsolveMatrix
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during postsol...
Definition: CoinPresolveMatrix.hpp:1421
drop_empty_cols_action
Physically removes empty columns in presolve, and reinserts empty columns in postsolve.
Definition: CoinPresolveEmpty.hpp:34
drop_empty_rows_action::action::rup
double rup
Definition: CoinPresolveEmpty.hpp:90
drop_empty_cols_action::action::cup
double cup
Definition: CoinPresolveEmpty.hpp:40
drop_empty_rows_action::name
const char * name() const
A name for debug printing.
Definition: CoinPresolveEmpty.hpp:106
CoinPresolveMatrix
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during presolv...
Definition: CoinPresolveMatrix.hpp:835
drop_empty_rows_action::presolve
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
drop_empty_cols_action::action::clo
double clo
Definition: CoinPresolveEmpty.hpp:39
drop_empty_rows_action::drop_empty_rows_action
drop_empty_rows_action(int nactions, const action *actions, const CoinPresolveAction *next)
Definition: CoinPresolveEmpty.hpp:98
drop_empty_rows_action::nactions_
const int nactions_
Definition: CoinPresolveEmpty.hpp:95
drop_empty_cols_action::action
Definition: CoinPresolveEmpty.hpp:38
drop_empty_rows_action::action
Definition: CoinPresolveEmpty.hpp:88
drop_empty_rows_action::postsolve
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
drop_empty_cols_action::name
const char * name() const
A name for debug printing.
Definition: CoinPresolveEmpty.hpp:56
drop_empty_cols_action::action::sol
double sol
Definition: CoinPresolveEmpty.hpp:42
drop_empty_rows_action
Physically removes empty rows in presolve, and reinserts empty rows in postsolve. ...
Definition: CoinPresolveEmpty.hpp:86
drop_empty_rows_action::~drop_empty_rows_action
virtual ~drop_empty_rows_action()
Definition: CoinPresolveEmpty.hpp:113
drop_empty_rows_action::actions_
const action *const actions_
Definition: CoinPresolveEmpty.hpp:96