Cgl 0.59.7

- 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
ClpDynamicExampleMatrix.hpp
Go to the documentation of this file.
1 /* $Id: ClpDynamicExampleMatrix.hpp 1936 2013-04-09 10:29:27Z forrest $ */
2 // Copyright (C) 2004, 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 ClpDynamicExampleMatrix_H
7 #define ClpDynamicExampleMatrix_H
8
9
10 #include "CoinPragma.hpp"
11
12 #include "ClpDynamicMatrix.hpp"
13 class ClpSimplex;
33 class ClpDynamicExampleMatrix : public ClpDynamicMatrix {
34
35 public:
38 virtual void partialPricing(ClpSimplex * model, double start, double end,
40 int & bestSequence, int & numberWanted);
41
45 virtual void createVariable(ClpSimplex * model, int & bestSequence);
50 virtual void packDown(const int * in, int numberToPack);
52
53
54
58 ClpDynamicExampleMatrix();
65 ClpDynamicExampleMatrix(ClpSimplex * model, int numberSets,
66 int numberColumns, const int * starts,
67 const double * lower, const double * upper,
68 const int * startColumn, const int * row,
69 const double * element, const double * cost,
70 const double * columnLower = NULL, const double * columnUpper = NULL,
71 const unsigned char * status = NULL,
72 const unsigned char * dynamicStatus = NULL,
73 int numberIds = 0, const int *ids = NULL);
74 #if 0
75 ClpDynamicExampleMatrix(ClpSimplex * model, int numberSets,
77 int numberColumns, int * starts,
78 const double * lower, const double * upper,
79 int * startColumn, int * row,
80 double * element, double * cost,
81 double * columnLower = NULL, double * columnUpper = NULL,
82 const unsigned char * status = NULL,
83 const unsigned char * dynamicStatus = NULL,
84 int numberIds = 0, const int *ids = NULL);
85 #endif
86
87 virtual ~ClpDynamicExampleMatrix();
89
93 ClpDynamicExampleMatrix(const ClpDynamicExampleMatrix&);
94 ClpDynamicExampleMatrix& operator=(const ClpDynamicExampleMatrix&);
96 virtual ClpMatrixBase * clone() const ;
98
100 inline CoinBigIndex * startColumnGen() const {
102 return startColumnGen_;
103 }
105 inline int * rowGen() const {
106 return rowGen_;
107 }
109 inline double * elementGen() const {
110 return elementGen_;
111 }
113 inline double * costGen() const {
114 return costGen_;
115 }
117 inline int * fullStartGen() const {
118 return fullStartGen_;
119 }
121 inline int * idGen() const {
122 return idGen_;
123 }
125 inline double * columnLowerGen() const {
126 return columnLowerGen_;
127 }
129 inline double * columnUpperGen() const {
130 return columnUpperGen_;
131 }
133 inline int numberColumns() const {
134 return numberColumns_;
135 }
136 inline void setDynamicStatusGen(int sequence, DynamicStatus status) {
137 unsigned char & st_byte = dynamicStatusGen_[sequence];
138 st_byte = static_cast<unsigned char>(st_byte & ~7);
139 st_byte = static_cast<unsigned char>(st_byte | status);
140 }
141 inline DynamicStatus getDynamicStatusGen(int sequence) const {
142 return static_cast<DynamicStatus> (dynamicStatusGen_[sequence] & 7);
143 }
145 inline bool flaggedGen(int i) const {
146 return (dynamicStatusGen_[i] & 8) != 0;
147 }
148 inline void setFlaggedGen(int i) {
149 dynamicStatusGen_[i] = static_cast<unsigned char>(dynamicStatusGen_[i] | 8);
150 }
151 inline void unsetFlagged(int i) {
152 dynamicStatusGen_[i] = static_cast<unsigned char>(dynamicStatusGen_[i] & ~8);
153 }
155
156
157 protected:
161 int numberColumns_;
164 CoinBigIndex * startColumnGen_;
166 int * rowGen_;
168 double * elementGen_;
170 double * costGen_;
172 int * fullStartGen_;
174 unsigned char * dynamicStatusGen_;
178 int * idGen_;
180 double * columnLowerGen_;
182 double * columnUpperGen_;
184 };
185
186 #endif
ClpDynamicExampleMatrix::columnUpperGen
double * columnUpperGen() const
Optional upper bounds on columns.
Definition: ClpDynamicExampleMatrix.hpp:129
ClpDynamicExampleMatrix::idGen
int * idGen() const
ids in next level matrix
Definition: ClpDynamicExampleMatrix.hpp:121
ClpDynamicMatrix::cost
double * cost() const
costs
Definition: ClpDynamicMatrix.hpp:225
ClpDynamicExampleMatrix::partialPricing
virtual void partialPricing(ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted)
Partial pricing.
ClpMatrixBase
Abstract base class for Clp Matrices.
Definition: ClpMatrixBase.hpp:38
ClpDynamicMatrix::DynamicStatus
DynamicStatus
enums for status of various sorts
Definition: ClpDynamicMatrix.hpp:24
ClpDynamicExampleMatrix::setFlaggedGen
void setFlaggedGen(int i)
Definition: ClpDynamicExampleMatrix.hpp:148
ClpDynamicExampleMatrix
This implements a dynamic matrix when we have a limit on the number of &quot;interesting rows&quot;...
Definition: ClpDynamicExampleMatrix.hpp:33
ClpDynamicExampleMatrix::clone
virtual ClpMatrixBase * clone() const
Clone.
ClpDynamicExampleMatrix::elementGen_
double * elementGen_
elements
Definition: ClpDynamicExampleMatrix.hpp:168
ClpDynamicExampleMatrix::unsetFlagged
void unsetFlagged(int i)
Definition: ClpDynamicExampleMatrix.hpp:151
ClpDynamicExampleMatrix::columnLowerGen_
double * columnLowerGen_
Optional lower bounds on columns.
Definition: ClpDynamicExampleMatrix.hpp:180
ClpDynamicExampleMatrix::setDynamicStatusGen
void setDynamicStatusGen(int sequence, DynamicStatus status)
Definition: ClpDynamicExampleMatrix.hpp:136
ClpDynamicExampleMatrix::rowGen
int * rowGen() const
rows
Definition: ClpDynamicExampleMatrix.hpp:105
ClpDynamicExampleMatrix::rowGen_
int * rowGen_
rows
Definition: ClpDynamicExampleMatrix.hpp:166
ClpDynamicExampleMatrix::ClpDynamicExampleMatrix
ClpDynamicExampleMatrix()
Default constructor.
ClpDynamicExampleMatrix::getDynamicStatusGen
DynamicStatus getDynamicStatusGen(int sequence) const
Definition: ClpDynamicExampleMatrix.hpp:141
ClpDynamicExampleMatrix::fullStartGen_
int * fullStartGen_
start of each set
Definition: ClpDynamicExampleMatrix.hpp:172
ClpDynamicExampleMatrix::elementGen
double * elementGen() const
elements
Definition: ClpDynamicExampleMatrix.hpp:109
ClpDynamicExampleMatrix::operator=
ClpDynamicExampleMatrix & operator=(const ClpDynamicExampleMatrix &)
ClpDynamicMatrix.hpp
ClpDynamicExampleMatrix::fullStartGen
int * fullStartGen() const
full starts
Definition: ClpDynamicExampleMatrix.hpp:117
ClpDynamicMatrix::columnUpper
double * columnUpper() const
Optional upper bounds on columns.
Definition: ClpDynamicMatrix.hpp:237
ClpDynamicExampleMatrix::flaggedGen
bool flaggedGen(int i) const
Whether flagged.
Definition: ClpDynamicExampleMatrix.hpp:145
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:70
ClpDynamicExampleMatrix::dynamicStatusGen_
unsigned char * dynamicStatusGen_
for status and which bound
Definition: ClpDynamicExampleMatrix.hpp:174
CoinPragma.hpp
ClpDynamicMatrix::dynamicStatus
unsigned char * dynamicStatus() const
Status region for gub variables.
Definition: ClpDynamicMatrix.hpp:282
ClpDynamicMatrix::numberSets
int numberSets() const
Number of sets (dynamic rows)
Definition: ClpDynamicMatrix.hpp:181
ClpDynamicExampleMatrix::numberColumns_
int numberColumns_
size
Definition: ClpDynamicExampleMatrix.hpp:162
ClpDynamicExampleMatrix::costGen_
double * costGen_
costs
Definition: ClpDynamicExampleMatrix.hpp:170
ClpDynamicExampleMatrix::packDown
virtual void packDown(const int *in, int numberToPack)
If addColumn forces compression then this allows descendant to know what to do.
ClpDynamicMatrix::columnLower
double * columnLower() const
Optional lower bounds on columns.
Definition: ClpDynamicMatrix.hpp:233
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:105
ClpDynamicMatrix
This implements a dynamic matrix when we have a limit on the number of &quot;interesting rows&quot;...
Definition: ClpDynamicMatrix.hpp:20
ClpDynamicMatrix::startColumn
CoinBigIndex * startColumn() const
Starts of each column.
Definition: ClpDynamicMatrix.hpp:213
ClpDynamicExampleMatrix::createVariable
virtual void createVariable(ClpSimplex *model, int &bestSequence)
Creates a variable.
ClpDynamicExampleMatrix::startColumnGen
CoinBigIndex * startColumnGen() const
Starts of each column.
Definition: ClpDynamicExampleMatrix.hpp:101
ClpDynamicExampleMatrix::~ClpDynamicExampleMatrix
virtual ~ClpDynamicExampleMatrix()
Destructor.
ClpDynamicExampleMatrix::costGen
double * costGen() const
costs
Definition: ClpDynamicExampleMatrix.hpp:113
ClpDynamicExampleMatrix::idGen_
int * idGen_
identifier for each variable up one level (startColumn_, etc).
Definition: ClpDynamicExampleMatrix.hpp:178
ClpDynamicExampleMatrix::columnUpperGen_
double * columnUpperGen_
Optional upper bounds on columns.
Definition: ClpDynamicExampleMatrix.hpp:182
ClpDynamicMatrix::element
double * element() const
elements
Definition: ClpDynamicMatrix.hpp:221
ClpDynamicExampleMatrix::numberColumns
int numberColumns() const
size
Definition: ClpDynamicExampleMatrix.hpp:133
ClpDynamicExampleMatrix::columnLowerGen
double * columnLowerGen() const
Optional lower bounds on columns.
Definition: ClpDynamicExampleMatrix.hpp:125
ClpDynamicMatrix::row
int * row() const
rows
Definition: ClpDynamicMatrix.hpp:217
ClpDynamicExampleMatrix::startColumnGen_
CoinBigIndex * startColumnGen_
Starts of each column.
Definition: ClpDynamicExampleMatrix.hpp:164