Clp 1.17.6

- 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
CoinPresolveDupcol.hpp
Go to the documentation of this file.
1 /* $Id: CoinPresolveDupcol.hpp 2083 2019-01-06 19:38:09Z unxusr $ */
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 }
60
61 public:
62 const char *name() const;
63
64 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
65 const CoinPresolveAction *next);
66
67 void postsolve(CoinPostsolveMatrix *prob) const;
68
69 virtual ~dupcol_action();
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()
98 : CoinPresolveAction(NULL)
99 , nactions_(0)
100 , actions_(NULL)
101 {
102 }
103 duprow_action(int nactions,
104 const action *actions,
105 const CoinPresolveAction *next)
106 : CoinPresolveAction(next)
107 , nactions_(nactions)
108 , actions_(actions)
109 {
110 }
111
112 public:
113 const char *name() const;
114
115 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
116 const CoinPresolveAction *next);
117
118 void postsolve(CoinPostsolveMatrix *prob) const;
119
120 //~duprow_action() { delete[]actions_; }
121 };
122
123 class duprow3_action : public CoinPresolveAction {
124 struct action {
125 int row;
126 double lbound;
127 double ubound;
128 };
129
130 const int nactions_;
131 const action *const actions_;
132
133 duprow3_action()
134 : CoinPresolveAction(NULL)
135 , nactions_(0)
136 , actions_(NULL)
137 {
138 }
139 duprow3_action(int nactions,
140 const action *actions,
141 const CoinPresolveAction *next)
142 : CoinPresolveAction(next)
143 , nactions_(nactions)
144 , actions_(actions)
145 {
146 }
147
148 public:
149 const char *name() const;
150
151 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
152 const CoinPresolveAction *next);
153
154 void postsolve(CoinPostsolveMatrix *prob) const;
155
156 //~duprow_action() { delete[]actions_; }
157 };
158
169 class gubrow_action : public CoinPresolveAction {
170 struct action {
171 double rhs;
172 // last is row itself
173 int *deletedRow;
174 double *rowels;
175 int *indices; // indices in gub row
176 int nDrop;
177 int ninrow;
178 };
179
180 const int nactions_;
181 const action *const actions_;
182
183 //gubrow_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
184 gubrow_action(int nactions,
185 const action *actions,
186 const CoinPresolveAction *next)
187 : CoinPresolveAction(next)
188 , nactions_(nactions)
189 , actions_(actions)
190 {
191 }
192
193 public:
194 const char *name() const;
195
196 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
197 const CoinPresolveAction *next);
198
199 void postsolve(CoinPostsolveMatrix *prob) const;
200
201 virtual ~gubrow_action();
202 };
203
214 class twoxtwo_action : public CoinPresolveAction {
215 struct action {
216 double lbound_row;
217 double ubound_row;
218 double lbound_col;
219 double ubound_col;
220 double cost_col;
221 double cost_othercol;
222 int row;
223 int col;
224 int othercol;
225 };
226
227 const int nactions_;
228 const action *const actions_;
229
230 twoxtwo_action()
231 : CoinPresolveAction(NULL)
232 , nactions_(0)
233 , actions_(NULL)
234 {
235 }
236 twoxtwo_action(int nactions,
237 const action *actions,
238 const CoinPresolveAction *next)
239 : CoinPresolveAction(next)
240 , nactions_(nactions)
241 , actions_(actions)
242 {
243 }
244
245 public:
246 const char *name() const;
247
248 static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
249 const CoinPresolveAction *next);
250
251 void postsolve(CoinPostsolveMatrix *prob) const;
252
253 ~twoxtwo_action() { delete[] actions_; }
254 };
255
256 #endif
257
258 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
259 */
gubrow_action::action::ninrow
int ninrow
Definition: CoinPresolveDupcol.hpp:177
dupcol_action::actions_
const action *const actions_
Definition: CoinPresolveDupcol.hpp:51
twoxtwo_action::action::col
int col
Definition: CoinPresolveDupcol.hpp:223
duprow3_action::action::row
int row
Definition: CoinPresolveDupcol.hpp:125
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:133
twoxtwo_action::twoxtwo_action
twoxtwo_action()
Definition: CoinPresolveDupcol.hpp:230
gubrow_action
Detect and remove entries whose sum is known.
Definition: CoinPresolveDupcol.hpp:169
dupcol_action::action::thisup
double thisup
Definition: CoinPresolveDupcol.hpp:39
duprow_action::action
Definition: CoinPresolveDupcol.hpp:88
twoxtwo_action::~twoxtwo_action
~twoxtwo_action()
Definition: CoinPresolveDupcol.hpp:253
duprow_action::nactions_
const int nactions_
Definition: CoinPresolveDupcol.hpp:94
duprow3_action::presolve
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
CoinPresolveAction
Abstract base class of all presolve routines.
Definition: CoinPresolveMatrix.hpp:163
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:236
dupcol_action::action::lastlo
double lastlo
Definition: CoinPresolveDupcol.hpp:40
dupcol_action::action::ithis
int ithis
Definition: CoinPresolveDupcol.hpp:42
twoxtwo_action::nactions_
const int nactions_
Definition: CoinPresolveDupcol.hpp:227
duprow3_action::action::ubound
double ubound
Definition: CoinPresolveDupcol.hpp:127
duprow3_action::postsolve
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
gubrow_action::action::nDrop
int nDrop
Definition: CoinPresolveDupcol.hpp:176
gubrow_action::name
const char * name() const
A name for debug printing.
duprow3_action::action
Definition: CoinPresolveDupcol.hpp:124
gubrow_action::nactions_
const int nactions_
Definition: CoinPresolveDupcol.hpp:180
dupcol_action::dupcol_action
dupcol_action()
dupcol_action::action
Definition: CoinPresolveDupcol.hpp:37
CoinPresolveMatrix.hpp
Declarations for CoinPresolveMatrix and CoinPostsolveMatrix and their common base class CoinPrePostso...
dupcol_action::nactions_
const int nactions_
Definition: CoinPresolveDupcol.hpp:49
duprow3_action
Definition: CoinPresolveDupcol.hpp:123
duprow3_action::nactions_
const int nactions_
Definition: CoinPresolveDupcol.hpp:130
twoxtwo_action::action::othercol
int othercol
Definition: CoinPresolveDupcol.hpp:224
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:126
twoxtwo_action::action::row
int row
Definition: CoinPresolveDupcol.hpp:222
duprow_action::action::row
int row
Definition: CoinPresolveDupcol.hpp:89
gubrow_action::~gubrow_action
virtual ~gubrow_action()
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:170
CoinPresolveAction::next
const CoinPresolveAction * next
The next presolve transformation.
Definition: CoinPresolveMatrix.hpp:180
CoinPostsolveMatrix
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during postsol...
Definition: CoinPresolveMatrix.hpp:1552
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:139
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:216
duprow_action
Detect and remove duplicate rows.
Definition: CoinPresolveDupcol.hpp:87
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:184
CoinPresolveMatrix
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during presolv...
Definition: CoinPresolveMatrix.hpp:905
twoxtwo_action::action::cost_othercol
double cost_othercol
Definition: CoinPresolveDupcol.hpp:221
dupcol_action::name
const char * name() const
A name for debug printing.
gubrow_action::action::deletedRow
int * deletedRow
Definition: CoinPresolveDupcol.hpp:173
dupcol_action::action::lastup
double lastup
Definition: CoinPresolveDupcol.hpp:41
duprow_action::presolve
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
gubrow_action::action::rhs
double rhs
Definition: CoinPresolveDupcol.hpp:171
gubrow_action::actions_
const action *const actions_
Definition: CoinPresolveDupcol.hpp:181
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:220
twoxtwo_action::action::ubound_row
double ubound_row
Definition: CoinPresolveDupcol.hpp:217
dupcol_action::action::ilast
int ilast
Definition: CoinPresolveDupcol.hpp:43
duprow3_action::actions_
const action *const actions_
Definition: CoinPresolveDupcol.hpp:131
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:218
twoxtwo_action::action::ubound_col
double ubound_col
Definition: CoinPresolveDupcol.hpp:219
gubrow_action::action::indices
int * indices
Definition: CoinPresolveDupcol.hpp:175
twoxtwo_action
Detect interesting 2 by 2 blocks.
Definition: CoinPresolveDupcol.hpp:214
duprow_action::action::ubound
double ubound
Definition: CoinPresolveDupcol.hpp:91
twoxtwo_action::actions_
const action *const actions_
Definition: CoinPresolveDupcol.hpp:228
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:103
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
gubrow_action::action::rowels
double * rowels
Definition: CoinPresolveDupcol.hpp:174
twoxtwo_action::action
Definition: CoinPresolveDupcol.hpp:215
duprow3_action::name
const char * name() const
A name for debug printing.