4 #ifndef ClpPackedMatrix_H
5 #define ClpPackedMatrix_H
7 #include "CoinPragma.hpp"
34 return matrix_->getNumElements();
54 return matrix_->getMutableElements();
66 return matrix_->getVectorStarts();
70 return matrix_->getVectorLengths();
74 return matrix_->getVectorSize(index);
78 virtual void deleteCols(
const int numDel,
const int * indDel);
80 virtual void deleteRows(
const int numDel,
const int * indDel);
82 virtual void appendCols(
int number,
const CoinPackedVectorBase *
const * columns);
85 virtual void appendRows(
int number,
const CoinPackedVectorBase *
const * rows);
92 const CoinBigIndex * starts,
const int * index,
93 const double * element,
int numberOther = -1);
99 const int numReplace,
const double * newElements) {
100 matrix_->replaceVector(index, numReplace, newElements);
106 bool keepZero =
false) {
107 matrix_->modifyCoefficient(row, column, newElement, keepZero);
112 virtual CoinBigIndex
countBasis(
const int * whichColumn,
113 int & numberColumnBasic);
116 const int * whichColumn,
117 int & numberColumnBasic,
118 int * row,
int * start,
119 int * rowCount,
int * columnCount,
120 CoinFactorizationDouble * element);
144 double smallest,
double largest,
149 virtual void rangeOfElements(
double & smallestNegative,
double & largestNegative,
150 double & smallestPositive,
double & largestPositive);
161 CoinIndexedVector * rowArray,
165 virtual void add(
const ClpSimplex * model, CoinIndexedVector * rowArray,
166 int column,
double multiplier)
const ;
169 int column,
double multiplier)
const;
181 int & bestSequence,
int & numberWanted);
185 virtual void reallyScale(
const double * rowScale,
const double * columnScale);
199 virtual void times(
double scalar,
200 const double * x,
double * y)
const;
202 virtual void times(
double scalar,
203 const double * x,
double * y,
204 const double * rowScale,
205 const double * columnScale)
const;
210 const double * x,
double * y)
const;
213 const double * x,
double * y,
214 const double * rowScale,
215 const double * columnScale,
216 double * spare = NULL)
const;
223 const double * pi,
double * y,
224 const double * rowScale,
225 const double * columnScale,
226 double * spare = NULL)
const;
232 const CoinIndexedVector * x,
233 CoinIndexedVector * y,
234 CoinIndexedVector * z)
const;
240 const CoinIndexedVector * x,
241 CoinIndexedVector * y,
242 CoinIndexedVector * z)
const;
249 const CoinIndexedVector * x,
250 CoinIndexedVector * y,
251 CoinIndexedVector * z)
const;
256 const CoinIndexedVector * x,
257 const CoinIndexedVector * y,
258 CoinIndexedVector * z)
const;
262 const CoinIndexedVector * pi)
const;
265 const CoinIndexedVector * pi1, CoinIndexedVector * dj1,
266 const CoinIndexedVector * pi2,
267 CoinIndexedVector * spare,
268 double referenceIn,
double devex,
270 unsigned int * reference,
271 double * weights,
double scaleFactor);
274 CoinIndexedVector * dj1,
275 const CoinIndexedVector * pi2, CoinIndexedVector * dj2,
276 double referenceIn,
double devex,
278 unsigned int * reference,
279 double * weights,
double scaleFactor);
284 virtual void times(CoinWorkDouble scalar,
285 const CoinWorkDouble * x, CoinWorkDouble * y)
const ;
287 const CoinWorkDouble * x, CoinWorkDouble * y)
const ;
293 inline CoinPackedMatrix *
matrix()
const {
311 return ((
flags_ & 1) != 0);
315 return ((
flags_ & 16) != 0);
345 int numberRows,
const int * whichRows,
346 int numberColumns,
const int * whichColumns);
348 int numberRows,
const int * whichRows,
349 int numberColumns,
const int * whichColumns);
362 int numberRows,
const int * whichRows,
363 int numberColumns,
const int * whichColumns)
const ;
374 int * COIN_RESTRICT index,
375 double * COIN_RESTRICT array,
376 const double tolerance)
const;
379 const double * COIN_RESTRICT columnScale,
380 int * COIN_RESTRICT index,
381 double * COIN_RESTRICT array,
382 const double tolerance)
const;
385 int * COIN_RESTRICT index,
386 double * COIN_RESTRICT array,
387 const unsigned char * status,
388 const double tolerance)
const;
392 int * COIN_RESTRICT index,
393 double * COIN_RESTRICT array,
394 const unsigned char * status,
395 int * COIN_RESTRICT spareIndex,
396 double * COIN_RESTRICT spareArray,
399 double & bestPossible,
400 double acceptablePivot,
401 double dualTolerance,
402 int & numberRemaining,
403 const double zeroTolerance)
const;
406 const double * COIN_RESTRICT columnScale,
407 int * COIN_RESTRICT index,
408 double * COIN_RESTRICT array,
409 const unsigned char * status,
410 const double tolerance)
const;
413 int * COIN_RESTRICT index,
414 double * COIN_RESTRICT output,
416 const double tolerance,
417 const double scalar)
const;
420 int * COIN_RESTRICT index,
421 double * COIN_RESTRICT output,
422 int * COIN_RESTRICT lookup,
423 char * COIN_RESTRICT marked,
424 const double tolerance,
425 const double scalar)
const;
428 CoinIndexedVector * spareVector,
const double tolerance,
const double scalar)
const;
431 const double tolerance,
const double scalar)
const;
463 double acceptablePivot;
470 double * bestPossiblePtr;
471 double * upperThetaPtr;
473 double * freePivotPtr;
475 const unsigned short * count;
477 const CoinBigIndex * rowStart;
478 const double * element;
479 const unsigned short * column;
481 int numberInRowArray;
494 const CoinPackedMatrix * rowCopy,
495 const CoinIndexedVector * x,
496 CoinIndexedVector * spareArray,
497 CoinIndexedVector * z)
const;
542 pthread_t * threadId_;
543 dualColumn0Struct * info_;
564 CoinIndexedVector * output)
const;
567 const double * pi, CoinIndexedVector * dj1,
568 const double * piWeight,
569 double referenceIn,
double devex,
571 unsigned int * reference,
572 double * weights,
double scaleFactor);