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

- File List
- File Members

CoinPresolveDupcol.hpp
Go to the documentation of this file.
1 /* $Id: CoinPresolveDupcol.hpp 1817 2015-03-22 16:43:28Z forrest $ */
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 CoinPresolveDupcol_H
7 #define CoinPresolveDupcol_H
8
9 #include "CoinPresolveMatrix.hpp"
10
15 #define DUPCOL 10
16
32 class dupcol_action : public CoinPresolveAction {
33 dupcol_action();
34 dupcol_action(const dupcol_action& rhs);
35 dupcol_action& operator=(const dupcol_action& rhs);
36
37 struct action {
38 double thislo;
39 double thisup;
40 double lastlo;
41 double lastup;
42 int ithis;
43 int ilast;
44
45 double *colels;
46 int nincol;
47 };
48
49 const int nactions_;
50 // actions_ is owned by the class and must be deleted at destruction
51 const action *const actions_;
52
53 dupcol_action(int nactions, const action *actions,
54 const CoinPresolveAction *next) :
55 CoinPresolveAction(next),
56 nactions_(nactions),
57 actions_(actions) {}
58
59 public:
60 const char *name() const;
61
62 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
63 const CoinPresolveAction *next);
64
65 void postsolve(CoinPostsolveMatrix *prob) const;
66
67 virtual ~dupcol_action();
68
69 };
70
71
87 class duprow_action : public CoinPresolveAction {
88 struct action {
89 int row;
90 double lbound;
91 double ubound;
92 };
93
94 const int nactions_;
95 const action *const actions_;
96
97 duprow_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
98 duprow_action(int nactions,
99 const action *actions,
100 const CoinPresolveAction *next) :
101 CoinPresolveAction(next),
102 nactions_(nactions), actions_(actions) {}
103
104 public:
105 const char *name() const;
106
107 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
108 const CoinPresolveAction *next);
109
110 void postsolve(CoinPostsolveMatrix *prob) const;
111
112 //~duprow_action() { delete[]actions_; }
113 };
114
115 class duprow3_action : public CoinPresolveAction {
116 struct action {
117 int row;
118 double lbound;
119 double ubound;
120 };
121
122 const int nactions_;
123 const action *const actions_;
124
125 duprow3_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
126 duprow3_action(int nactions,
127 const action *actions,
128 const CoinPresolveAction *next) :
129 CoinPresolveAction(next),
130 nactions_(nactions), actions_(actions) {}
131
132 public:
133 const char *name() const;
134
135 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
136 const CoinPresolveAction *next);
137
138 void postsolve(CoinPostsolveMatrix *prob) const;
139
140 //~duprow_action() { delete[]actions_; }
141 };
142
153 class gubrow_action : public CoinPresolveAction {
154 struct action {
155 int row;
156 double lbound;
157 double ubound;
158 };
159
160 const int nactions_;
161 const action *const actions_;
162
163 gubrow_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
164 gubrow_action(int nactions,
165 const action *actions,
166 const CoinPresolveAction *next) :
167 CoinPresolveAction(next),
168 nactions_(nactions), actions_(actions) {}
169
170 public:
171 const char *name() const;
172
173 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
174 const CoinPresolveAction *next);
175
176 void postsolve(CoinPostsolveMatrix *prob) const;
177
178 //~gubrow_action() { delete[]actions_; }
179 };
180
191 class twoxtwo_action : public CoinPresolveAction {
192 struct action {
193 double lbound_row;
194 double ubound_row;
195 double lbound_col;
196 double ubound_col;
197 double cost_col;
198 double cost_othercol;
199 int row;
200 int col;
201 int othercol;
202 };
203
204 const int nactions_;
205 const action *const actions_;
206
207 twoxtwo_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
208 twoxtwo_action(int nactions,
209 const action *actions,
210 const CoinPresolveAction *next) :
211 CoinPresolveAction(next),
212 nactions_(nactions), actions_(actions) {}
213
214 public:
215 const char *name() const;
216
217 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
218 const CoinPresolveAction *next);
219
220 void postsolve(CoinPostsolveMatrix *prob) const;
221
222 ~twoxtwo_action() { delete [] actions_; }
223 };
224
225 #endif
226
dupcol_action::actions_
const action *const actions_
Definition: CoinPresolveDupcol.hpp:51
twoxtwo_action::action::col
int col
Definition: CoinPresolveDupcol.hpp:200
duprow3_action::action::row
int row
Definition: CoinPresolveDupcol.hpp:117
gubrow_action::action::ubound
double ubound
Definition: CoinPresolveDupcol.hpp:157
twoxtwo_action::presolve
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
dupcol_action::~dupcol_action
virtual ~dupcol_action()
duprow3_action::duprow3_action
duprow3_action()
Definition: CoinPresolveDupcol.hpp:125
twoxtwo_action::twoxtwo_action
twoxtwo_action()
Definition: CoinPresolveDupcol.hpp:207
gubrow_action
Detect and remove entries whose sum is known.
Definition: CoinPresolveDupcol.hpp:153
dupcol_action::action::thisup
double thisup
Definition: CoinPresolveDupcol.hpp:39
CoinPostsolveMatrix
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during postsol...
Definition: CoinPresolveMatrix.hpp:1421
CoinPresolveMatrix
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during presolv...
Definition: CoinPresolveMatrix.hpp:835
duprow_action::action
Definition: CoinPresolveDupcol.hpp:88
twoxtwo_action::~twoxtwo_action
~twoxtwo_action()
Definition: CoinPresolveDupcol.hpp:222
duprow_action::nactions_
const int nactions_
Definition: CoinPresolveDupcol.hpp:94
duprow3_action::presolve
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
dupcol_action::action::colels
double * colels
Definition: CoinPresolveDupcol.hpp:45
twoxtwo_action::twoxtwo_action
twoxtwo_action(int nactions, const action *actions, const CoinPresolveAction *next)
Definition: CoinPresolveDupcol.hpp:208
dupcol_action::action::lastlo
double lastlo
Definition: CoinPresolveDupcol.hpp:40
dupcol_action::action::ithis
int ithis
Definition: CoinPresolveDupcol.hpp:42
gubrow_action::action::row
int row
Definition: CoinPresolveDupcol.hpp:155
twoxtwo_action::nactions_
const int nactions_
Definition: CoinPresolveDupcol.hpp:204
duprow3_action::action::ubound
double ubound
Definition: CoinPresolveDupcol.hpp:119
duprow3_action::postsolve
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
gubrow_action::name
const char * name() const
A name for debug printing.
duprow3_action::action
Definition: CoinPresolveDupcol.hpp:116
gubrow_action::nactions_
const int nactions_
Definition: CoinPresolveDupcol.hpp:160
dupcol_action::dupcol_action
dupcol_action()
dupcol_action::action
Definition: CoinPresolveDupcol.hpp:37
dupcol_action::nactions_
const int nactions_
Definition: CoinPresolveDupcol.hpp:49
duprow3_action
Definition: CoinPresolveDupcol.hpp:115
duprow3_action::nactions_
const int nactions_
Definition: CoinPresolveDupcol.hpp:122
twoxtwo_action::action::othercol
int othercol
Definition: CoinPresolveDupcol.hpp:201
duprow_action::postsolve
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
gubrow_action::presolve
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
duprow3_action::action::lbound
double lbound
Definition: CoinPresolveDupcol.hpp:118
twoxtwo_action::action::row
int row
Definition: CoinPresolveDupcol.hpp:199
duprow_action::action::row
int row
Definition: CoinPresolveDupcol.hpp:89
gubrow_action::postsolve
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
duprow_action::actions_
const action *const actions_
Definition: CoinPresolveDupcol.hpp:95
gubrow_action::action
Definition: CoinPresolveDupcol.hpp:154
CoinPresolveAction
Abstract base class of all presolve routines.
Definition: CoinPresolveMatrix.hpp:155
dupcol_action
Detect and remove duplicate columns.
Definition: CoinPresolveDupcol.hpp:32
duprow3_action::duprow3_action
duprow3_action(int nactions, const action *actions, const CoinPresolveAction *next)
Definition: CoinPresolveDupcol.hpp:126
dupcol_action::postsolve
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
twoxtwo_action::action::lbound_row
double lbound_row
Definition: CoinPresolveDupcol.hpp:193
duprow_action
Detect and remove duplicate rows.
Definition: CoinPresolveDupcol.hpp:87
CoinPresolveMatrix.hpp
twoxtwo_action::postsolve
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
dupcol_action::operator=
dupcol_action & operator=(const dupcol_action &rhs)
gubrow_action::gubrow_action
gubrow_action(int nactions, const action *actions, const CoinPresolveAction *next)
Definition: CoinPresolveDupcol.hpp:164
twoxtwo_action::action::cost_othercol
double cost_othercol
Definition: CoinPresolveDupcol.hpp:198
dupcol_action::name
const char * name() const
A name for debug printing.
dupcol_action::action::lastup
double lastup
Definition: CoinPresolveDupcol.hpp:41
gubrow_action::action::lbound
double lbound
Definition: CoinPresolveDupcol.hpp:156
duprow_action::presolve
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
gubrow_action::actions_
const action *const actions_
Definition: CoinPresolveDupcol.hpp:161
dupcol_action::presolve
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
duprow_action::action::lbound
double lbound
Definition: CoinPresolveDupcol.hpp:90
dupcol_action::action::thislo
double thislo
Definition: CoinPresolveDupcol.hpp:38
twoxtwo_action::action::cost_col
double cost_col
Definition: CoinPresolveDupcol.hpp:197
twoxtwo_action::action::ubound_row
double ubound_row
Definition: CoinPresolveDupcol.hpp:194
dupcol_action::action::ilast
int ilast
Definition: CoinPresolveDupcol.hpp:43
duprow3_action::actions_
const action *const actions_
Definition: CoinPresolveDupcol.hpp:123
duprow_action::name
const char * name() const
A name for debug printing.
dupcol_action::action::nincol
int nincol
Definition: CoinPresolveDupcol.hpp:46
twoxtwo_action::action::lbound_col
double lbound_col
Definition: CoinPresolveDupcol.hpp:195
twoxtwo_action::action::ubound_col
double ubound_col
Definition: CoinPresolveDupcol.hpp:196
twoxtwo_action
Detect interesting 2 by 2 blocks.
Definition: CoinPresolveDupcol.hpp:191
duprow_action::action::ubound
double ubound
Definition: CoinPresolveDupcol.hpp:91
gubrow_action::gubrow_action
gubrow_action()
Definition: CoinPresolveDupcol.hpp:163
twoxtwo_action::actions_
const action *const actions_
Definition: CoinPresolveDupcol.hpp:205
duprow_action::duprow_action
duprow_action()
Definition: CoinPresolveDupcol.hpp:97
duprow_action::duprow_action
duprow_action(int nactions, const action *actions, const CoinPresolveAction *next)
Definition: CoinPresolveDupcol.hpp:98
twoxtwo_action::name
const char * name() const
A name for debug printing.
dupcol_action::dupcol_action
dupcol_action(int nactions, const action *actions, const CoinPresolveAction *next)
Definition: CoinPresolveDupcol.hpp:53
twoxtwo_action::action
Definition: CoinPresolveDupcol.hpp:192
CoinPresolveAction::next
const CoinPresolveAction * next
The next presolve transformation.
Definition: CoinPresolveMatrix.hpp:171
duprow3_action::name
const char * name() const
A name for debug printing.