Clp 1.17.6

- 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
ClpPlusMinusOneMatrix.hpp
Go to the documentation of this file.
1 /* $Id: ClpPlusMinusOneMatrix.hpp 2385 2019-01-06 19:43:06Z unxusr $ */
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 ClpPlusMinusOneMatrix_H
7 #define ClpPlusMinusOneMatrix_H
8
9 #include "CoinPragma.hpp"
10
11 #include "ClpMatrixBase.hpp"
12
17 class ClpPlusMinusOneMatrix : public ClpMatrixBase {
18
19 public:
22 virtual CoinPackedMatrix *getPackedMatrix() const;
25 virtual bool isColOrdered() const;
27 virtual CoinBigIndex getNumElements() const;
29 virtual int getNumCols() const
30 {
31 return numberColumns_;
32 }
34 virtual int getNumRows() const
35 {
36 return numberRows_;
37 }
38
43 virtual const double *getElements() const;
49 virtual const int *getIndices() const
50 {
51 return indices_;
52 }
53 // and for advanced use
54 int *getMutableIndices() const
55 {
56 return indices_;
57 }
58
59 virtual const CoinBigIndex *getVectorStarts() const;
61 virtual const int *getVectorLengths() const;
62
64 virtual void deleteCols(const int numDel, const int *indDel);
66 virtual void deleteRows(const int numDel, const int *indDel);
68 virtual void appendCols(int number, const CoinPackedVectorBase *const *columns);
70 virtual void appendRows(int number, const CoinPackedVectorBase *const *rows);
71 #ifndef SLIM_CLP
72
76 virtual int appendMatrix(int number, int type,
77 const CoinBigIndex *starts, const int *index,
78 const double *element, int numberOther = -1);
79 #endif
80
81 virtual ClpMatrixBase *reverseOrderedCopy() const;
83 virtual int countBasis(
84 const int *whichColumn,
85 int &numberColumnBasic);
87 virtual void fillBasis(ClpSimplex *model,
88 const int *whichColumn,
89 int &numberColumnBasic,
90 int *row, int *start,
91 int *rowCount, int *columnCount,
92 CoinFactorizationDouble *element);
97 virtual CoinBigIndex *dubiousWeights(const ClpSimplex *model, int *inputWeights) const;
101 virtual void rangeOfElements(double &smallestNegative, double &largestNegative,
102 double &smallestPositive, double &largestPositive);
105 virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray,
106 int column) const;
111 virtual void unpackPacked(ClpSimplex *model,
112 CoinIndexedVector *rowArray,
113 int column) const;
116 virtual void add(const ClpSimplex *model, CoinIndexedVector *rowArray,
117 int column, double multiplier) const;
119 virtual void add(const ClpSimplex *model, double *array,
120 int column, double multiplier) const;
122 virtual void releasePackedMatrix() const;
128 virtual void setDimensions(int numrows, int numcols);
130 void checkValid(bool detail) const;
132
138 virtual void times(double scalar,
139 const double *x, double *y) const;
141 virtual void times(double scalar,
142 const double *x, double *y,
143 const double *rowScale,
144 const double *columnScale) const;
148 virtual void transposeTimes(double scalar,
149 const double *x, double *y) const;
151 virtual void transposeTimes(double scalar,
152 const double *x, double *y,
153 const double *rowScale,
154 const double *columnScale, double *spare = NULL) const;
159 virtual void transposeTimes(const ClpSimplex *model, double scalar,
160 const CoinIndexedVector *x,
161 CoinIndexedVector *y,
162 CoinIndexedVector *z) const;
168 virtual void transposeTimesByRow(const ClpSimplex *model, double scalar,
169 const CoinIndexedVector *x,
170 CoinIndexedVector *y,
171 CoinIndexedVector *z) const;
175 virtual void subsetTransposeTimes(const ClpSimplex *model,
176 const CoinIndexedVector *x,
177 const CoinIndexedVector *y,
178 CoinIndexedVector *z) const;
181 virtual bool canCombine(const ClpSimplex *model,
182 const CoinIndexedVector *pi) const;
186 virtual int transposeTimes2(const ClpSimplex *model,
187 const CoinIndexedVector *pi1, CoinIndexedVector *dj1,
188 const CoinIndexedVector *pi2,
189 CoinIndexedVector *spare,
190 double *infeas, double *reducedCost,
191 double referenceIn, double devex,
192 // Array for exact devex to say what is in reference framework
193 unsigned int *reference,
194 double *weights, double scaleFactor);
196 virtual void subsetTimes2(const ClpSimplex *model,
197 CoinIndexedVector *dj1,
198 const CoinIndexedVector *pi2, CoinIndexedVector *dj2,
199 double referenceIn, double devex,
200 // Array for exact devex to say what is in reference framework
201 unsigned int *reference,
202 double *weights, double scaleFactor);
204
207 inline CoinBigIndex *startPositive() const
209 {
210 return startPositive_;
211 }
213 inline CoinBigIndex *startNegative() const
214 {
215 return startNegative_;
216 }
218
222 ClpPlusMinusOneMatrix();
224 virtual ~ClpPlusMinusOneMatrix();
226
230 ClpPlusMinusOneMatrix(const ClpPlusMinusOneMatrix &);
237 ClpPlusMinusOneMatrix(const CoinPackedMatrix &);
239 ClpPlusMinusOneMatrix(int numberRows, int numberColumns,
240 bool columnOrdered, const int *indices,
241 const CoinBigIndex *startPositive, const CoinBigIndex *startNegative);
244 ClpPlusMinusOneMatrix(const ClpPlusMinusOneMatrix &wholeModel,
245 int numberRows, const int *whichRows,
246 int numberColumns, const int *whichColumns);
247
248 ClpPlusMinusOneMatrix &operator=(const ClpPlusMinusOneMatrix &);
250 virtual ClpMatrixBase *clone() const;
253 virtual ClpMatrixBase *subsetClone(
254 int numberRows, const int *whichRows,
255 int numberColumns, const int *whichColumns) const;
257 void passInCopy(int numberRows, int numberColumns,
258 bool columnOrdered, int *indices,
259 CoinBigIndex *startPositive, CoinBigIndex *startNegative);
261 virtual bool canDoPartialPricing() const;
263 virtual void partialPricing(ClpSimplex *model, double start, double end,
264 int &bestSequence, int &numberWanted);
266
267 protected:
271 mutable CoinPackedMatrix *matrix_;
273 mutable int *lengths_;
275 CoinBigIndex *COIN_RESTRICT startPositive_;
277 CoinBigIndex *COIN_RESTRICT startNegative_;
279 int *COIN_RESTRICT indices_;
281 int numberRows_;
283 int numberColumns_;
284 #ifdef CLP_PLUS_ONE_MATRIX
285
288 mutable int otherFlags_;
289 #endif
290 bool columnOrdered_;
292
294 };
295 #if CLP_POOL_MATRIX
296
299 #define CLP_POOL_SIZE 32 - CLP_POOL_MATRIX
300 #if CLP_POOL_MATRIX == 16
301 typedef struct {
302 unsigned short row_;
303 unsigned short pool_;
304 } poolInfo;
305 #else
306 typedef struct {
307 unsigned int row_ : CLP_POOL_MATRIX;
308 unsigned short pool_ : CLP_POOL_SIZE;
309 } poolInfo;
310 #endif
311 #include "ClpPackedMatrix.hpp"
312 class ClpPoolMatrix : public ClpMatrixBase {
313
314 public:
317 virtual CoinPackedMatrix *getPackedMatrix() const;
320 virtual bool isColOrdered() const;
322 virtual CoinBigIndex getNumElements() const;
324 inline int getNumDifferentElements() const
325 {
326 return numberDifferent_;
327 }
329 virtual int getNumCols() const
330 {
331 return numberColumns_;
332 }
334 virtual int getNumRows() const
335 {
336 return numberRows_;
337 }
338
343 virtual const double *getElements() const;
349 virtual const int *getIndices() const;
350 // and for advanced use
351 int *getMutableIndices() const;
352
353 virtual const CoinBigIndex *getVectorStarts() const;
355 virtual const int *getVectorLengths() const;
357 virtual int getVectorLength(int index) const;
359 virtual void deleteCols(const int numDel, const int *indDel);
361 virtual void deleteRows(const int numDel, const int *indDel);
363 virtual ClpMatrixBase *reverseOrderedCopy() const;
365 virtual int countBasis(
366 const int *whichColumn,
367 int &numberColumnBasic);
369 virtual void fillBasis(ClpSimplex *model,
370 const int *whichColumn,
371 int &numberColumnBasic,
372 int *row, int *start,
373 int *rowCount, int *columnCount,
374 CoinFactorizationDouble *element);
378 virtual void rangeOfElements(double &smallestNegative, double &largestNegative,
379 double &smallestPositive, double &largestPositive);
382 virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray,
383 int column) const;
388 virtual void unpackPacked(ClpSimplex *model,
389 CoinIndexedVector *rowArray,
390 int column) const;
393 virtual void add(const ClpSimplex *model, CoinIndexedVector *rowArray,
394 int column, double multiplier) const;
396 virtual void add(const ClpSimplex *model, double *array,
397 int column, double multiplier) const;
399 virtual void releasePackedMatrix() const;
405 virtual void setDimensions(int numrows, int numcols);
407 void checkValid(bool detail) const;
409
415 virtual void times(double scalar,
416 const double *x, double *y) const;
418 virtual void times(double scalar,
419 const double *x, double *y,
420 const double *rowScale,
421 const double *columnScale) const;
425 virtual void transposeTimes(double scalar,
426 const double *x, double *y) const;
428 virtual void transposeTimes(double scalar,
429 const double *x, double *y,
430 const double *rowScale,
431 const double *columnScale, double *spare = NULL) const;
436 virtual void transposeTimes(const ClpSimplex *model, double scalar,
437 const CoinIndexedVector *x,
438 CoinIndexedVector *y,
439 CoinIndexedVector *z) const;
445 virtual void transposeTimesByRow(const ClpSimplex *model, double scalar,
446 const CoinIndexedVector *x,
447 CoinIndexedVector *y,
448 CoinIndexedVector *z) const;
452 virtual void subsetTransposeTimes(const ClpSimplex *model,
453 const CoinIndexedVector *x,
454 const CoinIndexedVector *y,
455 CoinIndexedVector *z) const;
458 virtual bool canCombine(const ClpSimplex *model,
459 const CoinIndexedVector *pi) const
460 {
461 return true;
462 }
466 virtual int transposeTimes2(const ClpSimplex *model,
467 const CoinIndexedVector *pi1, CoinIndexedVector *dj1,
468 const CoinIndexedVector *pi2,
469 CoinIndexedVector *spare,
470 double *infeas, double *reducedCost,
471 double referenceIn, double devex,
472 // Array for exact devex to say what is in reference framework
473 unsigned int *reference,
474 double *weights, double scaleFactor);
476 virtual void subsetTimes2(const ClpSimplex *model,
477 CoinIndexedVector *dj1,
478 const CoinIndexedVector *pi2, CoinIndexedVector *dj2,
479 double referenceIn, double devex,
480 // Array for exact devex to say what is in reference framework
481 unsigned int *reference,
482 double *weights, double scaleFactor);
484
487 inline CoinBigIndex *columnStart() const
489 {
490 return columnStart_;
491 }
493
497 ClpPoolMatrix();
499 virtual ~ClpPoolMatrix();
501
505 ClpPoolMatrix(const ClpPoolMatrix &);
508 ClpPoolMatrix(const CoinPackedMatrix &);
510 ClpPoolMatrix(int numberRows, int numberColumns,
511 const int *indices, const double *elements,
512 const CoinBigIndex *columnStart);
514 ClpPoolMatrix(int numberColumns, CoinBigIndex *columnStart,
515 poolInfo *stuff, double *elements);
518 ClpPoolMatrix(const ClpPoolMatrix &wholeModel,
519 int numberRows, const int *whichRows,
520 int numberColumns, const int *whichColumns);
521
522 ClpPoolMatrix &operator=(const ClpPoolMatrix &);
524 virtual ClpMatrixBase *clone() const;
527 virtual ClpMatrixBase *subsetClone(
528 int numberRows, const int *whichRows,
529 int numberColumns, const int *whichColumns) const;
531 virtual bool canDoPartialPricing() const;
533 virtual void partialPricing(ClpSimplex *model, double start, double end,
534 int &bestSequence, int &numberWanted);
536
537 protected:
539 ClpPackedMatrix *createMatrix() const;
543 mutable ClpPackedMatrix *matrix_;
545 mutable int *lengths_;
547 double *COIN_RESTRICT elements_;
549 CoinBigIndex *COIN_RESTRICT columnStart_;
551 poolInfo *COIN_RESTRICT stuff_;
553 int numberRows_;
555 int numberColumns_;
557 int numberDifferent_;
558
560 };
561 #endif
562 #endif
563
564 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
565 */
ClpPlusMinusOneMatrix::rangeOfElements
virtual void rangeOfElements(double &smallestNegative, double &largestNegative, double &smallestPositive, double &largestPositive)
Returns largest and smallest elements of both signs.
ClpMatrixBase::getElements
virtual const double * getElements() const =0
A vector containing the elements in the packed matrix.
ClpMatrixBase::canCombine
virtual bool canCombine(const ClpSimplex *, const CoinIndexedVector *) const
Returns true if can combine transposeTimes and subsetTransposeTimes and if it would be faster...
Definition: ClpMatrixBase.hpp:328
ClpMatrixBase::type
int type() const
Returns type.
Definition: ClpMatrixBase.hpp:383
ClpMatrixBase::getVectorStarts
virtual const CoinBigIndex * getVectorStarts() const =0
ClpPlusMinusOneMatrix::partialPricing
virtual void partialPricing(ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted)
Partial pricing.
ClpPlusMinusOneMatrix::dubiousWeights
virtual CoinBigIndex * dubiousWeights(const ClpSimplex *model, int *inputWeights) const
Given positive integer weights for each row fills in sum of weights for each column (and slack)...
ClpMatrixBase::rangeOfElements
virtual void rangeOfElements(double &smallestNegative, double &largestNegative, double &smallestPositive, double &largestPositive)
Returns largest and smallest elements of both signs.
ClpMatrixBase::countBasis
virtual int countBasis(const int *whichColumn, int &numberColumnBasic)=0
Returns number of elements in column part of basis.
ClpPlusMinusOneMatrix::canDoPartialPricing
virtual bool canDoPartialPricing() const
Says whether it can do partial pricing.
ClpPlusMinusOneMatrix::getNumRows
virtual int getNumRows() const
Number of rows.
Definition: ClpPlusMinusOneMatrix.hpp:34
ClpMatrixBase::getNumRows
virtual int getNumRows() const =0
Number of rows.
ClpMatrixBase::isColOrdered
virtual bool isColOrdered() const =0
Whether the packed matrix is column major ordered or not.
ClpMatrixBase
Abstract base class for Clp Matrices.
Definition: ClpMatrixBase.hpp:38
ClpMatrixBase::canDoPartialPricing
virtual bool canDoPartialPricing() const
Says whether it can do partial pricing.
ClpMatrixBase::deleteRows
virtual void deleteRows(const int numDel, const int *indDel)=0
Delete the rows whose indices are listed in indDel.
ClpMatrixBase::getNumCols
virtual int getNumCols() const =0
Number of columns.
ClpPlusMinusOneMatrix::getNumElements
virtual CoinBigIndex getNumElements() const
Number of entries in the packed matrix.
ClpPlusMinusOneMatrix::deleteRows
virtual void deleteRows(const int numDel, const int *indDel)
Delete the rows whose indices are listed in indDel.
ClpPlusMinusOneMatrix::clone
virtual ClpMatrixBase * clone() const
Clone.
ClpPlusMinusOneMatrix::matrix_
CoinPackedMatrix * matrix_
For fake CoinPackedMatrix.
Definition: ClpPlusMinusOneMatrix.hpp:272
ClpPlusMinusOneMatrix::lengths_
int * lengths_
Definition: ClpPlusMinusOneMatrix.hpp:273
ClpPackedMatrix
Definition: ClpPackedMatrix.hpp:23
ClpPlusMinusOneMatrix::transposeTimesByRow
virtual void transposeTimesByRow(const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
Return x * scalar * A + y in z.
ClpMatrixBase::reducedCost
double reducedCost(ClpSimplex *model, int sequence) const
Returns reduced cost of a variable.
ClpMatrixBase::fillBasis
virtual void fillBasis(ClpSimplex *model, const int *whichColumn, int &numberColumnBasic, int *row, int *start, int *rowCount, int *columnCount, CoinFactorizationDouble *element)=0
Fills in column part of basis.
ClpPlusMinusOneMatrix::setDimensions
virtual void setDimensions(int numrows, int numcols)
Set the dimensions of the matrix.
ClpPlusMinusOneMatrix::getVectorLengths
virtual const int * getVectorLengths() const
The lengths of the major-dimension vectors.
ClpPlusMinusOneMatrix::deleteCols
virtual void deleteCols(const int numDel, const int *indDel)
Delete the columns whose indices are listed in indDel.
ClpMatrixBase.hpp
ClpMatrixBase::add
virtual void add(const ClpSimplex *model, CoinIndexedVector *rowArray, int column, double multiplier) const =0
Adds multiple of a column into an CoinIndexedvector You can use quickAdd to add to vector...
ClpMatrixBase::getPackedMatrix
virtual CoinPackedMatrix * getPackedMatrix() const =0
Return a complete CoinPackedMatrix.
ClpMatrixBase::unpack
virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray, int column) const =0
Unpacks a column into an CoinIndexedvector.
ClpMatrixBase::subsetTimes2
virtual void subsetTimes2(const ClpSimplex *model, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *dj2, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor)
Updates second array for steepest and does devex weights (need not be coded)
COIN_RESTRICT
#define COIN_RESTRICT
Definition: ClpMatrixBase.hpp:21
CoinPackedVectorBase
Abstract base class for various sparse vectors.
Definition: CoinPackedVectorBase.hpp:23
ClpPlusMinusOneMatrix::getMutableIndices
int * getMutableIndices() const
Definition: ClpPlusMinusOneMatrix.hpp:54
ClpMatrixBase::transposeTimes
virtual void transposeTimes(double scalar, const double *COIN_RESTRICT x, double *COIN_RESTRICT y) const =0
Return y + x * scalar * A in y.
ClpPlusMinusOneMatrix::transposeTimes2
virtual int transposeTimes2(const ClpSimplex *model, const CoinIndexedVector *pi1, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *spare, double *infeas, double *reducedCost, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor)
Updates two arrays for steepest and does devex weights Returns nonzero if updates reduced cost and in...
ClpPlusMinusOneMatrix::countBasis
virtual int countBasis(const int *whichColumn, int &numberColumnBasic)
Returns number of elements in column part of basis.
ClpPlusMinusOneMatrix::reverseOrderedCopy
virtual ClpMatrixBase * reverseOrderedCopy() const
Returns a new matrix in reverse order without gaps.
CoinFactorizationDouble
double CoinFactorizationDouble
Definition: CoinTypes.hpp:57
ClpPlusMinusOneMatrix
This implements a simple +- one matrix as derived from ClpMatrixBase.
Definition: ClpPlusMinusOneMatrix.hpp:17
ClpMatrixBase::unpackPacked
virtual void unpackPacked(ClpSimplex *model, CoinIndexedVector *rowArray, int column) const =0
Unpacks a column into an CoinIndexedvector in packed format Note that model is NOT const...
ClpPlusMinusOneMatrix::transposeTimes
virtual void transposeTimes(double scalar, const double *x, double *y) const
Return y + x * scalar * A in y.
ClpPlusMinusOneMatrix::times
virtual void times(double scalar, const double *x, double *y) const
Return y + A * scalar *x in y.
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:106
ClpPlusMinusOneMatrix::getIndices
virtual const int * getIndices() const
A vector containing the minor indices of the elements in the packed matrix.
Definition: ClpPlusMinusOneMatrix.hpp:49
ClpPlusMinusOneMatrix::checkValid
void checkValid(bool detail) const
Just checks matrix valid - will say if dimensions not quite right if detail.
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
CoinPragma.hpp
ClpMatrixBase::transposeTimes2
virtual int transposeTimes2(const ClpSimplex *model, const CoinIndexedVector *pi1, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *spare, double *infeas, double *reducedCost, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor)
Updates two arrays for steepest and does devex weights (need not be coded) Returns nonzero if updates...
ClpPlusMinusOneMatrix::ClpPlusMinusOneMatrix
ClpPlusMinusOneMatrix()
Default constructor.
ClpMatrixBase::subsetTransposeTimes
virtual void subsetTransposeTimes(const ClpSimplex *model, const CoinIndexedVector *x, const CoinIndexedVector *y, CoinIndexedVector *z) const =0
Return x *A in z but just for indices in y.
ClpMatrixBase::setDimensions
virtual void setDimensions(int numrows, int numcols)
Set the dimensions of the matrix.
ClpPlusMinusOneMatrix::indices_
int *COIN_RESTRICT indices_
Data -1, then +1 rows in pairs (row==-1 if one entry)
Definition: ClpPlusMinusOneMatrix.hpp:279
ClpPlusMinusOneMatrix::add
virtual void add(const ClpSimplex *model, CoinIndexedVector *rowArray, int column, double multiplier) const
Adds multiple of a column into an CoinIndexedvector You can use quickAdd to add to vector...
ClpPlusMinusOneMatrix::numberRows_
int numberRows_
Number of rows.
Definition: ClpPlusMinusOneMatrix.hpp:281
ClpPlusMinusOneMatrix::canCombine
virtual bool canCombine(const ClpSimplex *model, const CoinIndexedVector *pi) const
Returns true if can combine transposeTimes and subsetTransposeTimes and if it would be faster...
ClpPlusMinusOneMatrix::numberColumns_
int numberColumns_
Number of columns.
Definition: ClpPlusMinusOneMatrix.hpp:283
ClpPlusMinusOneMatrix::getVectorStarts
virtual const CoinBigIndex * getVectorStarts() const
ClpPlusMinusOneMatrix::~ClpPlusMinusOneMatrix
virtual ~ClpPlusMinusOneMatrix()
Destructor.
ClpMatrixBase::getNumElements
virtual CoinBigIndex getNumElements() const =0
Number of entries in the packed matrix.
ClpPlusMinusOneMatrix::fillBasis
virtual void fillBasis(ClpSimplex *model, const int *whichColumn, int &numberColumnBasic, int *row, int *start, int *rowCount, int *columnCount, CoinFactorizationDouble *element)
Fills in column part of basis.
ClpPlusMinusOneMatrix::unpackPacked
virtual void unpackPacked(ClpSimplex *model, CoinIndexedVector *rowArray, int column) const
Unpacks a column into an CoinIndexedvector in packed foramt Note that model is NOT const...
ClpPlusMinusOneMatrix::startNegative_
CoinBigIndex *COIN_RESTRICT startNegative_
Start of -1&#39;s for each.
Definition: ClpPlusMinusOneMatrix.hpp:277
ClpMatrixBase::reverseOrderedCopy
virtual ClpMatrixBase * reverseOrderedCopy() const
Returns a new matrix in reverse order without gaps Is allowed to return NULL if doesn&#39;t want to have ...
Definition: ClpMatrixBase.hpp:96
ClpPlusMinusOneMatrix::isColOrdered
virtual bool isColOrdered() const
Whether the packed matrix is column major ordered or not.
CoinPackedMatrix
Sparse Matrix Base Class.
Definition: CoinPackedMatrix.hpp:79
ClpPlusMinusOneMatrix::unpack
virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray, int column) const
Unpacks a column into an CoinIndexedvector.
ClpPlusMinusOneMatrix::appendRows
virtual void appendRows(int number, const CoinPackedVectorBase *const *rows)
Append Rows.
ClpPlusMinusOneMatrix::getElements
virtual const double * getElements() const
A vector containing the elements in the packed matrix.
ClpPlusMinusOneMatrix::startNegative
CoinBigIndex * startNegative() const
Return starts of -1s.
Definition: ClpPlusMinusOneMatrix.hpp:213
ClpPlusMinusOneMatrix::startPositive_
CoinBigIndex *COIN_RESTRICT startPositive_
Start of +1&#39;s for each.
Definition: ClpPlusMinusOneMatrix.hpp:275
ClpMatrixBase::operator=
ClpMatrixBase & operator=(const ClpMatrixBase &)
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:136
ClpMatrixBase::clone
virtual ClpMatrixBase * clone() const =0
ClpPlusMinusOneMatrix::subsetClone
virtual ClpMatrixBase * subsetClone(int numberRows, const int *whichRows, int numberColumns, const int *whichColumns) const
Subset clone (without gaps).
ClpMatrixBase::times
virtual void times(double scalar, const double *COIN_RESTRICT x, double *COIN_RESTRICT y) const =0
Return y + A * x * scalar in y.
ClpMatrixBase::getIndices
virtual const int * getIndices() const =0
A vector containing the minor indices of the elements in the packed matrix.
ClpPackedMatrix.hpp
ClpMatrixBase::getVectorLength
virtual int getVectorLength(int index) const
The length of a single major-dimension vector.
ClpPlusMinusOneMatrix::getNumCols
virtual int getNumCols() const
Number of columns.
Definition: ClpPlusMinusOneMatrix.hpp:29
ClpPlusMinusOneMatrix::releasePackedMatrix
virtual void releasePackedMatrix() const
Allow any parts of a created CoinMatrix to be deleted.
ClpPlusMinusOneMatrix::appendCols
virtual void appendCols(int number, const CoinPackedVectorBase *const *columns)
Append Columns.
ClpPlusMinusOneMatrix::getPackedMatrix
virtual CoinPackedMatrix * getPackedMatrix() const
Return a complete CoinPackedMatrix.
ClpPlusMinusOneMatrix::startPositive
CoinBigIndex * startPositive() const
Return starts of +1s.
Definition: ClpPlusMinusOneMatrix.hpp:208
ClpMatrixBase::subsetClone
virtual ClpMatrixBase * subsetClone(int numberRows, const int *whichRows, int numberColumns, const int *whichColumns) const
Subset clone (without gaps).
ClpMatrixBase::getVectorLengths
virtual const int * getVectorLengths() const =0
The lengths of the major-dimension vectors.
ClpPlusMinusOneMatrix::subsetTransposeTimes
virtual void subsetTransposeTimes(const ClpSimplex *model, const CoinIndexedVector *x, const CoinIndexedVector *y, CoinIndexedVector *z) const
Return x *A in z but just for indices in y.
ClpMatrixBase::releasePackedMatrix
virtual void releasePackedMatrix() const =0
Allow any parts of a created CoinPackedMatrix to be deleted.
ClpPlusMinusOneMatrix::subsetTimes2
virtual void subsetTimes2(const ClpSimplex *model, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *dj2, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor)
Updates second array for steepest and does devex weights.
ClpMatrixBase::partialPricing
virtual void partialPricing(ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted)
Partial pricing.
ClpPlusMinusOneMatrix::operator=
ClpPlusMinusOneMatrix & operator=(const ClpPlusMinusOneMatrix &)
ClpMatrixBase::deleteCols
virtual void deleteCols(const int numDel, const int *indDel)=0
Delete the columns whose indices are listed in indDel.
ClpPlusMinusOneMatrix::columnOrdered_
bool columnOrdered_
True if column ordered.
Definition: ClpPlusMinusOneMatrix.hpp:291
ClpPlusMinusOneMatrix::appendMatrix
virtual int appendMatrix(int number, int type, const CoinBigIndex *starts, const int *index, const double *element, int numberOther=-1)
Append a set of rows/columns to the end of the matrix.
ClpPlusMinusOneMatrix::passInCopy
void passInCopy(int numberRows, int numberColumns, bool columnOrdered, int *indices, CoinBigIndex *startPositive, CoinBigIndex *startNegative)
pass in copy (object takes ownership)