CoinUtils 2.11.4
Loading...
Searching...
No Matches
CoinPresolveDupcol.hpp
Go to the documentation of this file.
1/* $Id$ */
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
10
15#define DUPCOL 10
16
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,
56 , nactions_(nactions)
57 , actions_(actions)
58 {
59 }
60
61public:
62 const char *name() const;
63
66
67 void postsolve(CoinPostsolveMatrix *prob) const;
68
69 virtual ~dupcol_action();
70};
71
88 struct action {
89 int row;
90 double lbound;
91 double ubound;
92 };
93
94 const int nactions_;
95 const action *const actions_;
96
98 : CoinPresolveAction(NULL)
99 , nactions_(0)
100 , actions_(NULL)
101 {
102 }
103 duprow_action(int nactions,
104 const action *actions,
107 , nactions_(nactions)
108 , actions_(actions)
109 {
110 }
111
112public:
113 const char *name() const;
114
116 const CoinPresolveAction *next);
117
119
120 //~duprow_action() { delete[]actions_; }
121};
122
124 struct action {
125 int row;
126 double lbound;
127 double ubound;
128 };
129
130 const int nactions_;
131 const action *const actions_;
132
134 : CoinPresolveAction(NULL)
135 , nactions_(0)
136 , actions_(NULL)
137 {
138 }
139 duprow3_action(int nactions,
140 const action *actions,
143 , nactions_(nactions)
144 , actions_(actions)
145 {
146 }
147
148public:
149 const char *name() const;
150
152 const CoinPresolveAction *next);
153
155
156 //~duprow_action() { delete[]actions_; }
157};
158
170 struct action {
171 double rhs;
172 // last is row itself
174 double *rowels;
175 int *indices; // indices in gub row
176 int nDrop;
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,
188 , nactions_(nactions)
189 , actions_(actions)
190 {
191 }
192
193public:
194 const char *name() const;
195
197 const CoinPresolveAction *next);
198
200
201 virtual ~gubrow_action();
202};
203
215 struct action {
220 double cost_col;
222 int row;
223 int col;
225 };
226
227 const int nactions_;
228 const action *const actions_;
229
231 : CoinPresolveAction(NULL)
232 , nactions_(0)
233 , actions_(NULL)
234 {
235 }
236 twoxtwo_action(int nactions,
237 const action *actions,
240 , nactions_(nactions)
241 , actions_(actions)
242 {
243 }
244
245public:
246 const char *name() const;
247
249 const CoinPresolveAction *next);
250
252
253 ~twoxtwo_action() { delete[] actions_; }
254};
255
256#endif
257
258/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
259*/
Declarations for CoinPresolveMatrix and CoinPostsolveMatrix and their common base class CoinPrePostso...
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during postsol...
Abstract base class of all presolve routines.
const CoinPresolveAction * next
The next presolve transformation.
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during presolv...
Detect and remove duplicate columns.
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
const action *const actions_
const char * name() const
A name for debug printing.
dupcol_action & operator=(const dupcol_action &rhs)
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
dupcol_action(int nactions, const action *actions, const CoinPresolveAction *next)
dupcol_action(const dupcol_action &rhs)
virtual ~dupcol_action()
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
duprow3_action(int nactions, const action *actions, const CoinPresolveAction *next)
const action *const actions_
const char * name() const
A name for debug printing.
Detect and remove duplicate rows.
const action *const actions_
duprow_action(int nactions, const action *actions, const CoinPresolveAction *next)
const char * name() const
A name for debug printing.
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
Detect and remove entries whose sum is known.
const action *const actions_
virtual ~gubrow_action()
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
const char * name() const
A name for debug printing.
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
gubrow_action(int nactions, const action *actions, const CoinPresolveAction *next)
Detect interesting 2 by 2 blocks.
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
const action *const actions_
twoxtwo_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.