- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

AbcMatrix.hpp
Go to the documentation of this file.
1 /* $Id: AbcMatrix.hpp 1910 2013-01-27 02:00:13Z stefan $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others, Copyright (C) 2012, FasterCoin. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5
6 #ifndef AbcMatrix_H
7 #define AbcMatrix_H
8
9 #include "CoinPragma.hpp"
10
11 #include "ClpMatrixBase.hpp"
12 #include "AbcSimplex.hpp"
13 #include "CoinAbcHelperFunctions.hpp"
20 class AbcMatrix2;
21 class AbcMatrix3;
22 class AbcMatrix {
23
24 public:
27 inline CoinPackedMatrix * getPackedMatrix() const {
29 return matrix_;
30 }
32 inline bool isColOrdered() const {
33 return true;
34 }
36 inline CoinBigIndex getNumElements() const {
37 return matrix_->getNumElements();
38 }
40 inline int getNumCols() const {
41 assert(matrix_->getNumCols()==model_->numberColumns());return matrix_->getNumCols();
42 }
44 inline int getNumRows() const {
45 assert(matrix_->getNumRows()==model_->numberRows());return matrix_->getNumRows();
46 }
48 void setModel(AbcSimplex * model);
50 inline const double * getElements() const {
51 return matrix_->getElements();
52 }
54 inline double * getMutableElements() const {
55 return matrix_->getMutableElements();
56 }
58 inline const int * getIndices() const {
59 return matrix_->getIndices();
60 }
62 inline int * getMutableIndices() const {
63 return matrix_->getMutableIndices();
64 }
66 inline const CoinBigIndex * getVectorStarts() const {
67 return matrix_->getVectorStarts();
68 }
69 inline CoinBigIndex * getMutableVectorStarts() const {
70 return matrix_->getMutableVectorStarts();
71 }
73 inline const int * getVectorLengths() const {
74 return matrix_->getVectorLengths();
75 }
77 inline int * getMutableVectorLengths() const {
78 return matrix_->getMutableVectorLengths();
79 }
81 CoinBigIndex * rowStart() const;
83 CoinBigIndex * rowEnd() const;
85 double * rowElements() const;
87 CoinSimplexInt * rowColumns() const;
89 CoinPackedMatrix * reverseOrderedCopy() const;
91 CoinBigIndex countBasis(const int * whichColumn,
92 int & numberColumnBasic);
94 void fillBasis(const int * whichColumn,
95 int & numberColumnBasic,
96 int * row, int * start,
97 int * rowCount, int * columnCount,
98 CoinSimplexDouble * element);
100 void fillBasis(const int * whichColumn,
101 int & numberColumnBasic,
102 int * row, int * start,
103 int * rowCount, int * columnCount,
104 long double * element);
107 void scale(int numberRowsAlreadyScaled);
109 void createRowCopy();
111 void takeOutOfUseful(int sequence,CoinIndexedVector & spare);
113 void putIntofUseful(int sequence,CoinIndexedVector & spare);
115 void inOutUseful(int sequenceIn,int sequenceOut);
117 void makeAllUseful(CoinIndexedVector & spare);
119 void sortUseful(CoinIndexedVector & spare);
121 void moveLargestToStart();
122
125 void unpack(CoinIndexedVector & rowArray,
126 int column) const ;
129 void add(CoinIndexedVector & rowArray, int column, double multiplier) const ;
131
137 void timesModifyExcludingSlacks(double scalar,
138 const double * x, double * y) const;
142 void timesModifyIncludingSlacks(double scalar,
143 const double * x, double * y) const;
147 void timesIncludingSlacks(double scalar,
148 const double * x, double * y) const;
152 void transposeTimesNonBasic(double scalar,
153 const double * x, double * y) const;
157 void transposeTimesAll(const double * x, double * y) const;
161 void transposeTimesBasic(double scalar,
162 const double * x, double * y) const;
173 int transposeTimesNonBasic(double scalar,
174 const CoinIndexedVector & x,
175 CoinIndexedVector & z) const;
177 double dualColumn1(const CoinIndexedVector & update,
178 CoinPartitionedVector & tableauRow,
179 CoinPartitionedVector & candidateList) const;
181 double dualColumn1Row(int iBlock, double upperThetaSlack, int & freeSequence,
182 const CoinIndexedVector & update,
183 CoinPartitionedVector & tableauRow,
184 CoinPartitionedVector & candidateList) const;
186 double dualColumn1RowFew(int iBlock, double upperThetaSlack, int & freeSequence,
187 const CoinIndexedVector & update,
188 CoinPartitionedVector & tableauRow,
189 CoinPartitionedVector & candidateList) const;
191 double dualColumn1Row2(double upperThetaSlack, int & freeSequence,
192 const CoinIndexedVector & update,
193 CoinPartitionedVector & tableauRow,
194 CoinPartitionedVector & candidateList) const;
196 double dualColumn1Row1(double upperThetaSlack, int & freeSequence,
197 const CoinIndexedVector & update,
198 CoinPartitionedVector & tableauRow,
199 CoinPartitionedVector & candidateList) const;
203 void dualColumn1Part(int iBlock,int & sequenceIn, double & upperTheta,
204 const CoinIndexedVector & update,
205 CoinPartitionedVector & tableauRow,
206 CoinPartitionedVector & candidateList) const;
208 void rebalance() const;
210 int pivotColumnDantzig(const CoinIndexedVector & updates,
211 CoinPartitionedVector & spare) const;
213 int pivotColumnDantzig(int iBlock,bool doByRow,const CoinIndexedVector & updates,
214 CoinPartitionedVector & spare,
215 double & bestValue) const;
217 int primalColumnRow(int iBlock,bool doByRow,const CoinIndexedVector & update,
218 CoinPartitionedVector & tableauRow) const;
220 int primalColumnRowAndDjs(int iBlock,const CoinIndexedVector & updateTableau,
221 const CoinIndexedVector & updateDjs,
222 CoinPartitionedVector & tableauRow) const;
225 int chooseBestDj(int iBlock,const CoinIndexedVector & infeasibilities,
226 const double * weights) const;
232 int primalColumnDouble(int iBlock,CoinPartitionedVector & updateForTableauRow,
233 CoinPartitionedVector & updateForDjs,
234 const CoinIndexedVector & updateForWeights,
235 CoinPartitionedVector & spareColumn1,
236 double * infeasibilities,
237 double referenceIn, double devex,
238 // Array for exact devex to say what is in reference framework
239 unsigned int * reference,
240 double * weights, double scaleFactor) const;
246 int primalColumnSparseDouble(int iBlock,CoinPartitionedVector & updateForTableauRow,
247 CoinPartitionedVector & updateForDjs,
248 const CoinIndexedVector & updateForWeights,
249 CoinPartitionedVector & spareColumn1,
250 double * infeasibilities,
251 double referenceIn, double devex,
252 // Array for exact devex to say what is in reference framework
253 unsigned int * reference,
254 double * weights, double scaleFactor) const;
260 int primalColumnDouble(CoinPartitionedVector & updateForTableauRow,
261 CoinPartitionedVector & updateForDjs,
262 const CoinIndexedVector & updateForWeights,
263 CoinPartitionedVector & spareColumn1,
264 CoinIndexedVector & infeasible,
265 double referenceIn, double devex,
266 // Array for exact devex to say what is in reference framework
267 unsigned int * reference,
268 double * weights, double scaleFactor) const;
270 void primalColumnSubset(int iBlock,const CoinIndexedVector & update,
271 const CoinPartitionedVector & tableauRow,
272 CoinPartitionedVector & weights) const;
274 void partialPricing(double startFraction, double endFraction,
275 int & bestSequence, int & numberWanted);
279 void subsetTransposeTimes(const CoinIndexedVector & x,
280 CoinIndexedVector & z) const;
282 void transposeTimes(const CoinIndexedVector & x,
283 CoinIndexedVector & z) const;
285
288 inline CoinPackedMatrix * matrix() const {
290 return matrix_;
291 }
294 inline int minimumObjectsScan() const {
295 return minimumObjectsScan_;
296 }
297 inline void setMinimumObjectsScan(int value) {
298 minimumObjectsScan_ = value;
299 }
301 inline int minimumGoodReducedCosts() const {
302 return minimumGoodReducedCosts_;
303 }
304 inline void setMinimumGoodReducedCosts(int value) {
305 minimumGoodReducedCosts_ = value;
306 }
308 inline double startFraction() const {
309 return startFraction_;
310 }
311 inline void setStartFraction(double value) {
312 startFraction_ = value;
313 }
315 inline double endFraction() const {
316 return endFraction_;
317 }
318 inline void setEndFraction(double value) {
319 endFraction_ = value;
320 }
322 inline double savedBestDj() const {
323 return savedBestDj_;
324 }
325 inline void setSavedBestDj(double value) {
326 savedBestDj_ = value;
327 }
329 inline int originalWanted() const {
330 return originalWanted_;
331 }
332 inline void setOriginalWanted(int value) {
333 originalWanted_ = value;
334 }
336 inline int currentWanted() const {
337 return currentWanted_;
338 }
339 inline void setCurrentWanted(int value) {
340 currentWanted_ = value;
341 }
343 inline int savedBestSequence() const {
344 return savedBestSequence_;
345 }
346 inline void setSavedBestSequence(int value) {
347 savedBestSequence_ = value;
348 }
350 inline int * startColumnBlock() const
351 {return startColumnBlock_;}
353 inline const int * blockStart() const
354 { return blockStart_;}
355 inline bool gotRowCopy() const
356 { return rowStart_!=0;}
358 inline int blockStart(int block) const
359 { return blockStart_[block];}
361 inline int numberColumnBlocks() const
362 { return numberColumnBlocks_;}
364 inline int numberRowBlocks() const
365 { return numberRowBlocks_;}
367
368
372 AbcMatrix();
374 ~AbcMatrix();
376
380 AbcMatrix(const AbcMatrix&);
382 AbcMatrix(const CoinPackedMatrix&);
385 AbcMatrix (const AbcMatrix & wholeModel,
386 int numberRows, const int * whichRows,
387 int numberColumns, const int * whichColumns);
388 AbcMatrix (const CoinPackedMatrix & wholeModel,
389 int numberRows, const int * whichRows,
390 int numberColumns, const int * whichColumns);
391
392 AbcMatrix& operator=(const AbcMatrix&);
394 void copy(const AbcMatrix * from);
396 private:
397
398 protected:
402 CoinPackedMatrix * matrix_;
405 mutable AbcSimplex * model_;
406 #if ABC_PARALLEL==0
407 #define NUMBER_ROW_BLOCKS 1
408 #define NUMBER_COLUMN_BLOCKS 1
409 #elif ABC_PARALLEL==1
410 #define NUMBER_ROW_BLOCKS 4
411 #define NUMBER_COLUMN_BLOCKS 4
412 #else
413 #define NUMBER_ROW_BLOCKS 8
414 #define NUMBER_COLUMN_BLOCKS 8
415 #endif
416
419 CoinBigIndex * rowStart_;
421 double * element_;
423 int * column_;
425 mutable int startColumnBlock_[NUMBER_COLUMN_BLOCKS+1];
427 int blockStart_[NUMBER_ROW_BLOCKS+1];
429 mutable int numberColumnBlocks_;
431 int numberRowBlocks_;
432 //#define COUNT_COPY
433 #ifdef COUNT_COPY
434 #define MAX_COUNT 13
435 CoinBigIndex countStart_[MAX_COUNT+1];
438 int countFirst_[MAX_COUNT+1];
439 // later int countEndUseful_[MAX_COUNT+1];
440 int * countRealColumn_;
441 // later int * countInverseRealColumn_;
442 CoinBigIndex * countStartLarge_;
443 int * countRow_;
444 double * countElement_;
445 int smallestCount_;
446 int largestCount_;
447 #endif
448 //AbcMatrix2 * rowCopy_;
451 //AbcMatrix3 * columnCopy_;
453 double startFraction_;
455 double endFraction_;
457 double savedBestDj_;
459 int originalWanted_;
461 int currentWanted_;
463 int savedBestSequence_;
465 int minimumObjectsScan_;
467 int minimumGoodReducedCosts_;
469 };
470 #ifdef THREAD
471 #include <pthread.h>
472 typedef struct {
473 double acceptablePivot;
474 const AbcSimplex * model;
475 double * spare;
476 int * spareIndex;
477 double * arrayTemp;
478 int * indexTemp;
479 int * numberInPtr;
480 double * bestPossiblePtr;
481 double * upperThetaPtr;
482 int * posFreePtr;
483 double * freePivotPtr;
484 int * numberOutPtr;
485 const unsigned short * count;
486 const double * pi;
487 const CoinBigIndex * rowStart;
488 const double * element;
489 const unsigned short * column;
490 int offset;
491 int numberInRowArray;
492 int numberLook;
493 } dualColumn0Struct;
494 #endif
495 class AbcMatrix2 {
496
497 public:
503 void transposeTimes(const AbcSimplex * model,
504 const CoinPackedMatrix * rowCopy,
505 const CoinIndexedVector & x,
506 CoinIndexedVector & spareArray,
507 CoinIndexedVector & z) const;
509 inline bool usefulInfo() const {
510 return rowStart_ != NULL;
511 }
513
514
518 AbcMatrix2();
520 AbcMatrix2(AbcSimplex * model, const CoinPackedMatrix * rowCopy);
522 ~AbcMatrix2();
524
528 AbcMatrix2(const AbcMatrix2&);
529 AbcMatrix2& operator=(const AbcMatrix2&);
531
532
533 protected:
537 int numberBlocks_;
540 int numberRows_;
542 int * offset_;
544 mutable unsigned short * count_;
546 mutable CoinBigIndex * rowStart_;
548 unsigned short * column_;
550 double * work_;
551 #ifdef THREAD
552 pthread_t * threadId_;
553 dualColumn0Struct * info_;
554 #endif
555
556 };
557 typedef struct {
558 CoinBigIndex startElements_; // point to data
559 int startIndices_; // point to column_
560 int numberInBlock_;
561 int numberPrice_; // at beginning
562 int numberElements_; // number elements per column
563 } blockStruct3;
564 class AbcMatrix3 {
565
566 public:
572 void transposeTimes(const AbcSimplex * model,
573 const double * pi,
574 CoinIndexedVector & output) const;
576 void transposeTimes2(const AbcSimplex * model,
577 const double * pi, CoinIndexedVector & dj1,
578 const double * piWeight,
579 double referenceIn, double devex,
580 // Array for exact devex to say what is in reference framework
581 unsigned int * reference,
582 double * weights, double scaleFactor);
584
585
589 AbcMatrix3();
591 AbcMatrix3(AbcSimplex * model, const CoinPackedMatrix * columnCopy);
593 ~AbcMatrix3();
595
599 AbcMatrix3(const AbcMatrix3&);
600 AbcMatrix3& operator=(const AbcMatrix3&);
602
605 void sortBlocks(const AbcSimplex * model);
607 void swapOne(const AbcSimplex * model, const AbcMatrix * matrix,
608 int iColumn);
610
611
612 protected:
616 int numberBlocks_;
619 int numberColumns_;
621 int * column_;
623 CoinBigIndex * start_;
625 int * row_;
627 double * element_;
629 blockStruct * block_;
631 };
632
633 #endif
AbcMatrix3
Definition: AbcMatrix.hpp:564
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:105
AbcMatrix::matrix_
CoinPackedMatrix * matrix_
Data.
Definition: AbcMatrix.hpp:403
AbcMatrix::primalColumnDouble
int primalColumnDouble(int iBlock, CoinPartitionedVector &updateForTableauRow, CoinPartitionedVector &updateForDjs, const CoinIndexedVector &updateForWeights, CoinPartitionedVector &spareColumn1, double *infeasibilities, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor) const
does steepest edge double or triple update If scaleFactor!=0 then use with tableau row to update djs ...
AbcSimplex
Definition: AbcSimplex.hpp:62
AbcMatrix::primalColumnSparseDouble
int primalColumnSparseDouble(int iBlock, CoinPartitionedVector &updateForTableauRow, CoinPartitionedVector &updateForDjs, const CoinIndexedVector &updateForWeights, CoinPartitionedVector &spareColumn1, double *infeasibilities, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor) const
does steepest edge double or triple update If scaleFactor!=0 then use with tableau row to update djs ...
AbcMatrix3::swapOne
void swapOne(const AbcSimplex *model, const AbcMatrix *matrix, int iColumn)
Swap one variable.
AbcMatrix::getNumElements
CoinBigIndex getNumElements() const
Number of entries in the packed matrix.
Definition: AbcMatrix.hpp:36
AbcMatrix3::~AbcMatrix3
~AbcMatrix3()
Destructor.
AbcMatrix::timesModifyExcludingSlacks
void timesModifyExcludingSlacks(double scalar, const double *x, double *y) const
Return y + A * scalar *x in y.
AbcMatrix2::numberBlocks_
int numberBlocks_
Number of blocks.
Definition: AbcMatrix.hpp:538
AbcMatrix::savedBestDj
double savedBestDj() const
Current best reduced cost.
Definition: AbcMatrix.hpp:322
blockStruct3::numberInBlock_
int numberInBlock_
Definition: AbcMatrix.hpp:560
AbcMatrix::putIntofUseful
void putIntofUseful(int sequence, CoinIndexedVector &spare)
Put into useful.
CoinSimplexDouble
double CoinSimplexDouble
Definition: CoinAbcCommon.hpp:21
AbcMatrix::setModel
void setModel(AbcSimplex *model)
Sets model.
NUMBER_ROW_BLOCKS
#define NUMBER_ROW_BLOCKS
Definition: AbcMatrix.hpp:407
AbcSimplex.hpp
AbcMatrix::setCurrentWanted
void setCurrentWanted(int value)
Returns CoinPackedMatrix (non const)
Definition: AbcMatrix.hpp:339
AbcMatrix::minimumObjectsScan_
int minimumObjectsScan_
Partial pricing tuning parameter - minimum number of &quot;objects&quot; to scan.
Definition: AbcMatrix.hpp:465
AbcMatrix::endFraction
double endFraction() const
Current end of search space in matrix (as fraction)
Definition: AbcMatrix.hpp:315
AbcMatrix::getElements
const double * getElements() const
A vector containing the elements in the packed matrix.
Definition: AbcMatrix.hpp:50
AbcMatrix::setSavedBestSequence
void setSavedBestSequence(int value)
Returns CoinPackedMatrix (non const)
Definition: AbcMatrix.hpp:346
AbcMatrix2::usefulInfo
bool usefulInfo() const
Returns true if copy has useful information.
Definition: AbcMatrix.hpp:509
AbcMatrix::gotRowCopy
bool gotRowCopy() const
Returns CoinPackedMatrix (non const)
Definition: AbcMatrix.hpp:355
AbcMatrix::minimumGoodReducedCosts
int minimumGoodReducedCosts() const
Partial pricing tuning parameter - minimum number of negative reduced costs to get.
Definition: AbcMatrix.hpp:301
CoinPartitionedVector
Definition: CoinIndexedVector.hpp:1057
AbcMatrix::getPackedMatrix
CoinPackedMatrix * getPackedMatrix() const
Return a complete CoinPackedMatrix.
Definition: AbcMatrix.hpp:28
AbcMatrix::numberRowBlocks_
int numberRowBlocks_
Number of actual row blocks.
Definition: AbcMatrix.hpp:431
AbcMatrix::numberColumnBlocks_
int numberColumnBlocks_
Number of actual column blocks.
Definition: AbcMatrix.hpp:429
AbcMatrix::scale
void scale(int numberRowsAlreadyScaled)
Scales and creates row copy.
AbcMatrix::getNumRows
int getNumRows() const
Number of rows.
Definition: AbcMatrix.hpp:44
AbcMatrix::getVectorLengths
const int * getVectorLengths() const
The lengths of the major-dimension vectors.
Definition: AbcMatrix.hpp:73
AbcMatrix::setMinimumGoodReducedCosts
void setMinimumGoodReducedCosts(int value)
Returns CoinPackedMatrix (non const)
Definition: AbcMatrix.hpp:304
AbcMatrix2::work_
double * work_
work arrays
Definition: AbcMatrix.hpp:550
AbcMatrix::blockStart
int blockStart(int block) const
Start of each block (in stored)
Definition: AbcMatrix.hpp:358
AbcMatrix::transposeTimesAll
void transposeTimesAll(const double *x, double *y) const
Return y - A * x in y.
AbcMatrix2::operator=
AbcMatrix2 & operator=(const AbcMatrix2 &)
The copy constructor.
AbcMatrix::rowStart_
CoinBigIndex * rowStart_
Start of each row (per block) - last lot are useless first all row starts for block 0...
Definition: AbcMatrix.hpp:419
AbcMatrix::numberColumnBlocks
int numberColumnBlocks() const
Number of actual column blocks.
Definition: AbcMatrix.hpp:361
AbcMatrix::currentWanted_
int currentWanted_
Current number of negative reduced costs which we still need.
Definition: AbcMatrix.hpp:461
AbcMatrix2::count_
unsigned short * count_
Counts of elements in each part of row.
Definition: AbcMatrix.hpp:544
AbcMatrix::numberRowBlocks
int numberRowBlocks() const
Number of actual row blocks.
Definition: AbcMatrix.hpp:364
ClpModel::numberRows
int numberRows() const
Number of rows.
Definition: ClpModel.hpp:315
CoinPackedMatrix::getNumRows
int getNumRows() const
Number of rows.
Definition: CoinPackedMatrix.hpp:114
AbcMatrix::setEndFraction
void setEndFraction(double value)
Returns CoinPackedMatrix (non const)
Definition: AbcMatrix.hpp:318
AbcMatrix
Definition: AbcMatrix.hpp:22
AbcMatrix::getVectorStarts
const CoinBigIndex * getVectorStarts() const
Starts.
Definition: AbcMatrix.hpp:66
CoinPackedMatrix
Sparse Matrix Base Class.
Definition: CoinPackedMatrix.hpp:79
AbcMatrix3::column_
int * column_
Column indices and reverse lookup (within block)
Definition: AbcMatrix.hpp:621
AbcMatrix::pivotColumnDantzig
int pivotColumnDantzig(const CoinIndexedVector &updates, CoinPartitionedVector &spare) const
Get sequenceIn when Dantzig.
AbcMatrix::startFraction
double startFraction() const
Current start of search space in matrix (as fraction)
Definition: AbcMatrix.hpp:308
AbcMatrix3::start_
CoinBigIndex * start_
Starts for odd/long vectors.
Definition: AbcMatrix.hpp:623
AbcMatrix::chooseBestDj
int chooseBestDj(int iBlock, const CoinIndexedVector &infeasibilities, const double *weights) const
Chooses best weighted dj.
AbcMatrix::copy
void copy(const AbcMatrix *from)
Copy contents - resizing if necessary - otherwise re-use memory.
CoinSimplexInt
int CoinSimplexInt
Definition: CoinAbcCommon.hpp:22
AbcMatrix::primalColumnRowAndDjs
int primalColumnRowAndDjs(int iBlock, const CoinIndexedVector &updateTableau, const CoinIndexedVector &updateDjs, CoinPartitionedVector &tableauRow) const
gets tableau row and dj row - returns number of slacks in block
AbcMatrix2::offset_
int * offset_
Column offset for each block (plus one at end)
Definition: AbcMatrix.hpp:542
AbcMatrix::getMutableElements
double * getMutableElements() const
Mutable elements.
Definition: AbcMatrix.hpp:54
AbcMatrix2::column_
unsigned short * column_
columns within block
Definition: AbcMatrix.hpp:548
AbcMatrix::rowStart
CoinBigIndex * rowStart() const
Row starts.
AbcMatrix::subsetTransposeTimes
void subsetTransposeTimes(const CoinIndexedVector &x, CoinIndexedVector &z) const
Return x *A in z but just for indices Already in z.
AbcMatrix3::numberBlocks_
int numberBlocks_
Number of blocks.
Definition: AbcMatrix.hpp:617
ClpMatrixBase.hpp
AbcMatrix::transposeTimesBasic
void transposeTimesBasic(double scalar, const double *x, double *y) const
Return y + A * scalar(+-1) *x in y.
AbcMatrix3::element_
double * element_
Elements.
Definition: AbcMatrix.hpp:627
AbcMatrix::startFraction_
double startFraction_
Special row copy.
Definition: AbcMatrix.hpp:453
AbcMatrix::timesModifyIncludingSlacks
void timesModifyIncludingSlacks(double scalar, const double *x, double *y) const
Return y + A * scalar(+-1) *x in y.
AbcMatrix::primalColumnRow
int primalColumnRow(int iBlock, bool doByRow, const CoinIndexedVector &update, CoinPartitionedVector &tableauRow) const
gets tableau row - returns number of slacks in block
AbcMatrix::reverseOrderedCopy
CoinPackedMatrix * reverseOrderedCopy() const
Returns a new matrix in reverse order without gaps.
CoinPackedMatrix::getIndices
const int * getIndices() const
A vector containing the minor indices of the elements in the packed matrix.
Definition: CoinPackedMatrix.hpp:134
AbcMatrix::countBasis
CoinBigIndex countBasis(const int *whichColumn, int &numberColumnBasic)
Returns number of elements in column part of basis.
AbcMatrix3::transposeTimes2
void transposeTimes2(const AbcSimplex *model, const double *pi, CoinIndexedVector &dj1, const double *piWeight, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor)
Updates two arrays for steepest.
AbcMatrix2::~AbcMatrix2
~AbcMatrix2()
Destructor.
AbcMatrix::matrix
CoinPackedMatrix * matrix() const
Returns CoinPackedMatrix (non const)
Definition: AbcMatrix.hpp:289
AbcMatrix2::rowStart_
CoinBigIndex * rowStart_
Row starts.
Definition: AbcMatrix.hpp:546
AbcMatrix::startColumnBlock
int * startColumnBlock() const
Start of each column block.
Definition: AbcMatrix.hpp:350
AbcMatrix3::row_
int * row_
Rows.
Definition: AbcMatrix.hpp:625
AbcMatrix::primalColumnSubset
void primalColumnSubset(int iBlock, const CoinIndexedVector &update, const CoinPartitionedVector &tableauRow, CoinPartitionedVector &weights) const
gets subset updates
ClpModel::numberColumns
int numberColumns() const
Number of rows.
Definition: ClpModel.hpp:325
AbcMatrix3::transposeTimes
void transposeTimes(const AbcSimplex *model, const double *pi, CoinIndexedVector &output) const
Return x * -1 * A in z.
CoinPackedMatrix::getVectorStarts
const CoinBigIndex * getVectorStarts() const
The positions where the major-dimension vectors start in elements and indices.
Definition: CoinPackedMatrix.hpp:154
AbcMatrix::setMinimumObjectsScan
void setMinimumObjectsScan(int value)
Returns CoinPackedMatrix (non const)
Definition: AbcMatrix.hpp:297
AbcMatrix::endFraction_
double endFraction_
Current end of search space in matrix (as fraction)
Definition: AbcMatrix.hpp:455
blockStruct3
Definition: AbcMatrix.hpp:557
AbcMatrix::dualColumn1Row
double dualColumn1Row(int iBlock, double upperThetaSlack, int &freeSequence, const CoinIndexedVector &update, CoinPartitionedVector &tableauRow, CoinPartitionedVector &candidateList) const
gets sorted tableau row and a possible value of theta
AbcMatrix::unpack
void unpack(CoinIndexedVector &rowArray, int column) const
Unpacks a column into an CoinIndexedVector.
AbcMatrix::rowElements
double * rowElements() const
Row elements.
AbcMatrix3::sortBlocks
void sortBlocks(const AbcSimplex *model)
Sort blocks.
AbcMatrix::column_
int * column_
Columns.
Definition: AbcMatrix.hpp:423
AbcMatrix::savedBestSequence_
int savedBestSequence_
Saved best sequence in pricing.
Definition: AbcMatrix.hpp:463
AbcMatrix::blockStart
const int * blockStart() const
Start of each block (in stored)
Definition: AbcMatrix.hpp:353
AbcMatrix::rowColumns
CoinSimplexInt * rowColumns() const
Row columns.
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
AbcMatrix3::block_
blockStruct * block_
Blocks (ordinary start at 0 and go to first block)
Definition: AbcMatrix.hpp:629
AbcMatrix::setStartFraction
void setStartFraction(double value)
Returns CoinPackedMatrix (non const)
Definition: AbcMatrix.hpp:311
AbcMatrix::savedBestDj_
double savedBestDj_
Best reduced cost so far.
Definition: AbcMatrix.hpp:457
AbcMatrix::createRowCopy
void createRowCopy()
Creates row copy.
CoinPackedMatrix::getNumCols
int getNumCols() const
Number of columns.
Definition: CoinPackedMatrix.hpp:110
AbcMatrix::getMutableVectorStarts
CoinBigIndex * getMutableVectorStarts() const
Return a complete CoinPackedMatrix.
Definition: AbcMatrix.hpp:69
AbcMatrix::transposeTimes
void transposeTimes(const CoinIndexedVector &x, CoinIndexedVector &z) const
Return -x *A in z
AbcMatrix::blockStart_
int blockStart_[NUMBER_ROW_BLOCKS+1]
Start of each block (in stored)
Definition: AbcMatrix.hpp:427
AbcMatrix::moveLargestToStart
void moveLargestToStart()
Move largest in column to beginning (not used as doesn&#39;t help factorization)
AbcMatrix::currentWanted
int currentWanted() const
Current number of negative reduced costs which we still need.
Definition: AbcMatrix.hpp:336
CoinPackedMatrix::getMutableIndices
int * getMutableIndices() const
A vector containing the minor indices of the elements in the packed matrix.
Definition: CoinPackedMatrix.hpp:715
AbcMatrix::originalWanted_
int originalWanted_
Initial number of negative reduced costs wanted.
Definition: AbcMatrix.hpp:459
AbcMatrix2
Definition: AbcMatrix.hpp:495
AbcMatrix::~AbcMatrix
~AbcMatrix()
Destructor.
AbcMatrix::getNumCols
int getNumCols() const
Number of columns.
Definition: AbcMatrix.hpp:40
blockStruct
Definition: ClpPackedMatrix.hpp:562
AbcMatrix::dualColumn1Row1
double dualColumn1Row1(double upperThetaSlack, int &freeSequence, const CoinIndexedVector &update, CoinPartitionedVector &tableauRow, CoinPartitionedVector &candidateList) const
gets sorted tableau row and a possible value of theta
AbcMatrix::getIndices
const int * getIndices() const
A vector containing the minor indices of the elements in the packed matrix.
Definition: AbcMatrix.hpp:58
AbcMatrix::makeAllUseful
void makeAllUseful(CoinIndexedVector &spare)
Make all useful.
blockStruct3::numberPrice_
int numberPrice_
Definition: AbcMatrix.hpp:561
AbcMatrix3::numberColumns_
int numberColumns_
Number of columns.
Definition: AbcMatrix.hpp:619
AbcMatrix3::AbcMatrix3
AbcMatrix3()
Default constructor.
AbcMatrix2::transposeTimes
void transposeTimes(const AbcSimplex *model, const CoinPackedMatrix *rowCopy, const CoinIndexedVector &x, CoinIndexedVector &spareArray, CoinIndexedVector &z) const
Return x * -1 * A in z.
AbcMatrix2::AbcMatrix2
AbcMatrix2()
Default constructor.
CoinPragma.hpp
CoinPackedMatrix::getMutableVectorStarts
CoinBigIndex * getMutableVectorStarts() const
The positions where the major-dimension vectors start in element_ and index_.
Definition: CoinPackedMatrix.hpp:719
CoinPackedMatrix::getMutableElements
double * getMutableElements() const
A vector containing the elements in the packed matrix.
Definition: CoinPackedMatrix.hpp:709
AbcMatrix::minimumObjectsScan
int minimumObjectsScan() const
Partial pricing tuning parameter - minimum number of &quot;objects&quot; to scan.
Definition: AbcMatrix.hpp:294
AbcMatrix::AbcMatrix
AbcMatrix()
Default constructor.
AbcMatrix::partialPricing
void partialPricing(double startFraction, double endFraction, int &bestSequence, int &numberWanted)
Partial pricing.
AbcMatrix::rebalance
void rebalance() const
rebalance for parallel
CoinAbcHelperFunctions.hpp
CoinPackedMatrix::getMutableVectorLengths
int * getMutableVectorLengths() const
The lengths of the major-dimension vectors.
Definition: CoinPackedMatrix.hpp:721
AbcMatrix::getMutableVectorLengths
int * getMutableVectorLengths() const
The lengths of the major-dimension vectors.
Definition: AbcMatrix.hpp:77
AbcMatrix::dualColumn1Row2
double dualColumn1Row2(double upperThetaSlack, int &freeSequence, const CoinIndexedVector &update, CoinPartitionedVector &tableauRow, CoinPartitionedVector &candidateList) const
gets sorted tableau row and a possible value of theta
AbcMatrix::takeOutOfUseful
void takeOutOfUseful(int sequence, CoinIndexedVector &spare)
Take out of useful.
AbcMatrix::dualColumn1Part
void dualColumn1Part(int iBlock, int &sequenceIn, double &upperTheta, const CoinIndexedVector &update, CoinPartitionedVector &tableauRow, CoinPartitionedVector &candidateList) const
gets sorted tableau row and a possible value of theta On input first,last give what to scan On output...
AbcMatrix::savedBestSequence
int savedBestSequence() const
Current best sequence.
Definition: AbcMatrix.hpp:343
AbcMatrix::model_
AbcSimplex * model_
Model.
Definition: AbcMatrix.hpp:405
AbcMatrix::isColOrdered
bool isColOrdered() const
Whether the packed matrix is column major ordered or not.
Definition: AbcMatrix.hpp:32
AbcMatrix3::operator=
AbcMatrix3 & operator=(const AbcMatrix3 &)
The copy constructor.
AbcMatrix2::numberRows_
int numberRows_
Number of rows.
Definition: AbcMatrix.hpp:540
AbcMatrix::minimumGoodReducedCosts_
int minimumGoodReducedCosts_
Partial pricing tuning parameter - minimum number of negative reduced costs to get.
Definition: AbcMatrix.hpp:467
AbcMatrix::operator=
AbcMatrix & operator=(const AbcMatrix &)
The copy constructor.
AbcMatrix::timesIncludingSlacks
void timesIncludingSlacks(double scalar, const double *x, double *y) const
Return A * scalar(+-1) *x in y.
NUMBER_COLUMN_BLOCKS
#define NUMBER_COLUMN_BLOCKS
Definition: AbcMatrix.hpp:408
AbcMatrix::setOriginalWanted
void setOriginalWanted(int value)
Returns CoinPackedMatrix (non const)
Definition: AbcMatrix.hpp:332
blockStruct3::numberElements_
int numberElements_
Definition: AbcMatrix.hpp:562
CoinPackedMatrix::getNumElements
CoinBigIndex getNumElements() const
Number of entries in the packed matrix.
Definition: CoinPackedMatrix.hpp:107
AbcMatrix::rowEnd
CoinBigIndex * rowEnd() const
Row ends.
AbcMatrix::originalWanted
int originalWanted() const
Initial number of negative reduced costs wanted.
Definition: AbcMatrix.hpp:329
AbcMatrix::transposeTimesNonBasic
void transposeTimesNonBasic(double scalar, const double *x, double *y) const
Return A * scalar(+-1) *x + y in y.
AbcMatrix::inOutUseful
void inOutUseful(int sequenceIn, int sequenceOut)
Put in and out for useful.
blockStruct3::startIndices_
int startIndices_
Definition: AbcMatrix.hpp:559
AbcMatrix::startColumnBlock_
int startColumnBlock_[NUMBER_COLUMN_BLOCKS+1]
Start of each column block.
Definition: AbcMatrix.hpp:425
AbcMatrix::element_
double * element_
Values by row.
Definition: AbcMatrix.hpp:421
AbcMatrix::fillBasis
void fillBasis(const int *whichColumn, int &numberColumnBasic, int *row, int *start, int *rowCount, int *columnCount, CoinSimplexDouble *element)
Fills in column part of basis.
AbcMatrix::dualColumn1RowFew
double dualColumn1RowFew(int iBlock, double upperThetaSlack, int &freeSequence, const CoinIndexedVector &update, CoinPartitionedVector &tableauRow, CoinPartitionedVector &candidateList) const
gets sorted tableau row and a possible value of theta
AbcMatrix::getMutableIndices
int * getMutableIndices() const
A vector containing the minor indices of the elements in the packed matrix.
Definition: AbcMatrix.hpp:62
AbcMatrix::dualColumn1
double dualColumn1(const CoinIndexedVector &update, CoinPartitionedVector &tableauRow, CoinPartitionedVector &candidateList) const
gets sorted tableau row and a possible value of theta
blockStruct3::startElements_
CoinBigIndex startElements_
Definition: AbcMatrix.hpp:558
AbcMatrix::sortUseful
void sortUseful(CoinIndexedVector &spare)
Sort into useful.
CoinPackedMatrix::getElements
const double * getElements() const
A vector containing the elements in the packed matrix.
Definition: CoinPackedMatrix.hpp:124
AbcMatrix::add
void add(CoinIndexedVector &rowArray, int column, double multiplier) const
Adds multiple of a column (or slack) into an CoinIndexedvector You can use quickAdd to add to vector...
AbcMatrix::setSavedBestDj
void setSavedBestDj(double value)
Returns CoinPackedMatrix (non const)
Definition: AbcMatrix.hpp:325
CoinPackedMatrix::getVectorLengths
const int * getVectorLengths() const
The lengths of the major-dimension vectors.
Definition: CoinPackedMatrix.hpp:160