| 1 | /* $Id: CoinPresolveTripleton.hpp 1372 2011-01-03 23:31:00Z lou $ */ |
| 2 | // Copyright (C) 2003, 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 CoinPresolveTripleton_H |
| 7 | #define CoinPresolveTripleton_H |
| 8 | #define TRIPLETON 11 |
| 9 | /** We are only going to do this if it does not increase number of elements?. |
| 10 | It could be generalized to more than three but it seems unlikely it would |
| 11 | help. |
| 12 | |
| 13 | As it is adapted from doubleton icoly is one dropped. |
| 14 | */ |
| 15 | class tripleton_action : public CoinPresolveAction { |
| 16 | public: |
| 17 | struct action { |
| 18 | int icolx; |
| 19 | int icolz; |
| 20 | int row; |
| 21 | |
| 22 | int icoly; |
| 23 | double cloy; |
| 24 | double cupy; |
| 25 | double costy; |
| 26 | double clox; |
| 27 | double cupx; |
| 28 | double costx; |
| 29 | |
| 30 | double rlo; |
| 31 | double rup; |
| 32 | |
| 33 | double coeffx; |
| 34 | double coeffy; |
| 35 | double coeffz; |
| 36 | |
| 37 | double *colel; |
| 38 | |
| 39 | int ncolx; |
| 40 | int ncoly; |
| 41 | }; |
| 42 | |
| 43 | const int nactions_; |
| 44 | const action *const actions_; |
| 45 | |
| 46 | private: |
| 47 | tripleton_action(int nactions, |
| 48 | const action *actions, |
| 49 | const CoinPresolveAction *next) : |
| 50 | CoinPresolveAction(next), |
| 51 | nactions_(nactions), actions_(actions) |
| 52 | {} |
| 53 | |
| 54 | public: |
| 55 | const char *name() const { return ("tripleton_action" ); } |
| 56 | |
| 57 | static const CoinPresolveAction *presolve(CoinPresolveMatrix *, |
| 58 | const CoinPresolveAction *next); |
| 59 | |
| 60 | void postsolve(CoinPostsolveMatrix *prob) const; |
| 61 | |
| 62 | ~tripleton_action(); |
| 63 | }; |
| 64 | #endif |
| 65 | |