Cbc  2.9.9
 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 1854 2015-12-18 14:18:54Z 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 
33  dupcol_action();
34  dupcol_action(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 
63  const CoinPresolveAction *next);
64 
65  void postsolve(CoinPostsolveMatrix *prob) const;
66 
67  virtual ~dupcol_action();
68 
69 };
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  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 
116  struct action {
117  int row;
118  double lbound;
119  double ubound;
120  };
121 
122  const int nactions_;
123  const action *const actions_;
124 
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 
154  struct action {
155  double rhs;
156  // last is row itself
157  int * deletedRow;
158  double * rowels;
159  int * indices; // indices in gub row
160  int nDrop;
161  int ninrow;
162  };
163 
164  const int nactions_;
165  const action *const actions_;
166 
167  //gubrow_action():CoinPresolveAction(NULL),nactions_(0),actions_(NULL) {}
168  gubrow_action(int nactions,
169  const action *actions,
170  const CoinPresolveAction *next) :
171  CoinPresolveAction(next),
172  nactions_(nactions), actions_(actions) {}
173 
174  public:
175  const char *name() const;
176 
177  static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
178  const CoinPresolveAction *next);
179 
180  void postsolve(CoinPostsolveMatrix *prob) const;
181 
182  virtual ~gubrow_action();
183 };
184 
196  struct action {
197  double lbound_row;
198  double ubound_row;
199  double lbound_col;
200  double ubound_col;
201  double cost_col;
203  int row;
204  int col;
205  int othercol;
206  };
207 
208  const int nactions_;
209  const action *const actions_;
210 
212  twoxtwo_action(int nactions,
213  const action *actions,
214  const CoinPresolveAction *next) :
215  CoinPresolveAction(next),
216  nactions_(nactions), actions_(actions) {}
217 
218  public:
219  const char *name() const;
220 
221  static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
222  const CoinPresolveAction *next);
223 
224  void postsolve(CoinPostsolveMatrix *prob) const;
225 
226  ~twoxtwo_action() { delete [] actions_; }
227 };
228 
229 #endif
230 
const action *const actions_
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
virtual ~dupcol_action()
Detect and remove entries whose sum is known.
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
Abstract base class of all presolve routines.
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.
Declarations for CoinPresolveMatrix and CoinPostsolveMatrix and their common base class CoinPrePostso...
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
virtual ~gubrow_action()
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
const action *const actions_
const CoinPresolveAction * next
The next presolve transformation.
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during postsol...
Detect and remove duplicate columns.
duprow3_action(int nactions, const action *actions, const CoinPresolveAction *next)
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
Detect and remove duplicate rows.
void postsolve(CoinPostsolveMatrix *prob) const
Apply the postsolve transformation for this particular presolve action.
dupcol_action & operator=(const dupcol_action &rhs)
gubrow_action(int nactions, const action *actions, const CoinPresolveAction *next)
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during presolv...
const char * name() const
A name for debug printing.
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
const action *const actions_
static const CoinPresolveAction * presolve(CoinPresolveMatrix *prob, const CoinPresolveAction *next)
const action *const actions_
const char * name() const
A name for debug printing.
Detect interesting 2 by 2 blocks.
const action *const actions_
duprow_action(int nactions, const action *actions, const CoinPresolveAction *next)
const char * name() const
A name for debug printing.
dupcol_action(int nactions, const action *actions, const CoinPresolveAction *next)
const char * name() const
A name for debug printing.