Clp 1.17.6
Loading...
Searching...
No Matches
AbcMatrix.hpp
Go to the documentation of this file.
1/* $Id$ */
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"
20class AbcMatrix2;
21class AbcMatrix3;
22class AbcMatrix {
23
24public:
28 inline CoinPackedMatrix *getPackedMatrix() const
29 {
30 return matrix_;
31 }
33 inline bool isColOrdered() const
34 {
35 return true;
36 }
38 inline CoinBigIndex getNumElements() const
39 {
40 return matrix_->getNumElements();
41 }
43 inline int getNumCols() const
44 {
45 assert(matrix_->getNumCols() == model_->numberColumns());
46 return matrix_->getNumCols();
47 }
49 inline int getNumRows() const
50 {
51 assert(matrix_->getNumRows() == model_->numberRows());
52 return matrix_->getNumRows();
53 }
55 void setModel(AbcSimplex *model);
57 inline const double *getElements() const
58 {
59 return matrix_->getElements();
60 }
62 inline double *getMutableElements() const
63 {
64 return matrix_->getMutableElements();
65 }
67 inline const int *getIndices() const
68 {
69 return matrix_->getIndices();
70 }
72 inline int *getMutableIndices() const
73 {
74 return matrix_->getMutableIndices();
75 }
77 inline const CoinBigIndex *getVectorStarts() const
78 {
79 return matrix_->getVectorStarts();
80 }
81 inline CoinBigIndex *getMutableVectorStarts() const
82 {
83 return matrix_->getMutableVectorStarts();
84 }
86 inline const int *getVectorLengths() const
87 {
88 return matrix_->getVectorLengths();
89 }
91 inline int *getMutableVectorLengths() const
92 {
93 return matrix_->getMutableVectorLengths();
94 }
96 CoinBigIndex *rowStart() const;
98 CoinBigIndex *rowEnd() const;
100 double *rowElements() const;
104 CoinPackedMatrix *reverseOrderedCopy() const;
106 CoinBigIndex countBasis(const int *whichColumn,
107 int &numberColumnBasic);
109 void fillBasis(const int *whichColumn,
110 int &numberColumnBasic,
111 int *row, int *start,
112 int *rowCount, int *columnCount,
113 CoinSimplexDouble *element);
115 void fillBasis(const int *whichColumn,
116 int &numberColumnBasic,
117 int *row, int *start,
118 int *rowCount, int *columnCount,
119 long double *element);
122 void scale(int numberRowsAlreadyScaled);
126 void takeOutOfUseful(int sequence, CoinIndexedVector &spare);
128 void putIntofUseful(int sequence, CoinIndexedVector &spare);
130 void inOutUseful(int sequenceIn, int sequenceOut);
132 void makeAllUseful(CoinIndexedVector &spare);
134 void sortUseful(CoinIndexedVector &spare);
137
140 void unpack(CoinIndexedVector &rowArray,
141 int column) const;
144 void add(CoinIndexedVector &rowArray, int column, double multiplier) const;
146
152 void timesModifyExcludingSlacks(double scalar,
153 const double *x, double *y) const;
157 void timesModifyIncludingSlacks(double scalar,
158 const double *x, double *y) const;
162 void timesIncludingSlacks(double scalar,
163 const double *x, double *y) const;
167 void transposeTimesNonBasic(double scalar,
168 const double *x, double *y) const;
172 void transposeTimesAll(const double *x, double *y) const;
176 void transposeTimesBasic(double scalar,
177 const double *x, double *y) const;
188 int transposeTimesNonBasic(double scalar,
189 const CoinIndexedVector &x,
190 CoinIndexedVector &z) const;
192 double dualColumn1(const CoinIndexedVector &update,
193 CoinPartitionedVector &tableauRow,
194 CoinPartitionedVector &candidateList) const;
196 double dualColumn1Row(int iBlock, double upperThetaSlack, int &freeSequence,
197 const CoinIndexedVector &update,
198 CoinPartitionedVector &tableauRow,
199 CoinPartitionedVector &candidateList) const;
201 double dualColumn1RowFew(int iBlock, double upperThetaSlack, int &freeSequence,
202 const CoinIndexedVector &update,
203 CoinPartitionedVector &tableauRow,
204 CoinPartitionedVector &candidateList) const;
206 double dualColumn1Row2(double upperThetaSlack, int &freeSequence,
207 const CoinIndexedVector &update,
208 CoinPartitionedVector &tableauRow,
209 CoinPartitionedVector &candidateList) const;
211 double dualColumn1Row1(double upperThetaSlack, int &freeSequence,
212 const CoinIndexedVector &update,
213 CoinPartitionedVector &tableauRow,
214 CoinPartitionedVector &candidateList) const;
218 void dualColumn1Part(int iBlock, int &sequenceIn, double &upperTheta,
219 const CoinIndexedVector &update,
220 CoinPartitionedVector &tableauRow,
221 CoinPartitionedVector &candidateList) const;
223 void rebalance() const;
225 int pivotColumnDantzig(const CoinIndexedVector &updates,
226 CoinPartitionedVector &spare) const;
228 int pivotColumnDantzig(int iBlock, bool doByRow, const CoinIndexedVector &updates,
229 CoinPartitionedVector &spare,
230 double &bestValue) const;
232 int primalColumnRow(int iBlock, bool doByRow, const CoinIndexedVector &update,
233 CoinPartitionedVector &tableauRow) const;
235 int primalColumnRowAndDjs(int iBlock, const CoinIndexedVector &updateTableau,
236 const CoinIndexedVector &updateDjs,
237 CoinPartitionedVector &tableauRow) const;
240 int chooseBestDj(int iBlock, const CoinIndexedVector &infeasibilities,
241 const double *weights) const;
247 int primalColumnDouble(int iBlock, CoinPartitionedVector &updateForTableauRow,
248 CoinPartitionedVector &updateForDjs,
249 const CoinIndexedVector &updateForWeights,
250 CoinPartitionedVector &spareColumn1,
251 double *infeasibilities,
252 double referenceIn, double devex,
253 // Array for exact devex to say what is in reference framework
254 unsigned int *reference,
255 double *weights, double scaleFactor) const;
261 int primalColumnSparseDouble(int iBlock, CoinPartitionedVector &updateForTableauRow,
262 CoinPartitionedVector &updateForDjs,
263 const CoinIndexedVector &updateForWeights,
264 CoinPartitionedVector &spareColumn1,
265 double *infeasibilities,
266 double referenceIn, double devex,
267 // Array for exact devex to say what is in reference framework
268 unsigned int *reference,
269 double *weights, double scaleFactor) const;
275 int primalColumnDouble(CoinPartitionedVector &updateForTableauRow,
276 CoinPartitionedVector &updateForDjs,
277 const CoinIndexedVector &updateForWeights,
278 CoinPartitionedVector &spareColumn1,
279 CoinIndexedVector &infeasible,
280 double referenceIn, double devex,
281 // Array for exact devex to say what is in reference framework
282 unsigned int *reference,
283 double *weights, double scaleFactor) const;
285 void primalColumnSubset(int iBlock, const CoinIndexedVector &update,
286 const CoinPartitionedVector &tableauRow,
287 CoinPartitionedVector &weights) const;
290 int &bestSequence, int &numberWanted);
294 void subsetTransposeTimes(const CoinIndexedVector &x,
295 CoinIndexedVector &z) const;
297 void transposeTimes(const CoinIndexedVector &x,
298 CoinIndexedVector &z) const;
300
304 inline CoinPackedMatrix *matrix() const
305 {
306 return matrix_;
307 }
310 inline int minimumObjectsScan() const
311 {
312 return minimumObjectsScan_;
313 }
314 inline void setMinimumObjectsScan(int value)
315 {
316 minimumObjectsScan_ = value;
317 }
319 inline int minimumGoodReducedCosts() const
320 {
322 }
323 inline void setMinimumGoodReducedCosts(int value)
324 {
326 }
328 inline double startFraction() const
329 {
330 return startFraction_;
331 }
332 inline void setStartFraction(double value)
333 {
334 startFraction_ = value;
335 }
337 inline double endFraction() const
338 {
339 return endFraction_;
340 }
341 inline void setEndFraction(double value)
342 {
343 endFraction_ = value;
344 }
346 inline double savedBestDj() const
347 {
348 return savedBestDj_;
349 }
350 inline void setSavedBestDj(double value)
351 {
352 savedBestDj_ = value;
353 }
355 inline int originalWanted() const
356 {
357 return originalWanted_;
358 }
359 inline void setOriginalWanted(int value)
360 {
361 originalWanted_ = value;
362 }
364 inline int currentWanted() const
365 {
366 return currentWanted_;
367 }
368 inline void setCurrentWanted(int value)
369 {
370 currentWanted_ = value;
371 }
373 inline int savedBestSequence() const
374 {
375 return savedBestSequence_;
376 }
377 inline void setSavedBestSequence(int value)
378 {
379 savedBestSequence_ = value;
380 }
382 inline int *startColumnBlock() const
383 {
384 return startColumnBlock_;
385 }
387 inline const int *blockStart() const
388 {
389 return blockStart_;
390 }
391 inline bool gotRowCopy() const
392 {
393 return rowStart_ != 0;
394 }
396 inline int blockStart(int block) const
397 {
398 return blockStart_[block];
399 }
401 inline int numberColumnBlocks() const
402 {
403 return numberColumnBlocks_;
404 }
406 inline int numberRowBlocks() const
407 {
408 return numberRowBlocks_;
409 }
411
419
425 AbcMatrix(const CoinPackedMatrix &);
428 AbcMatrix(const AbcMatrix &wholeModel,
429 int numberRows, const int *whichRows,
430 int numberColumns, const int *whichColumns);
431 AbcMatrix(const CoinPackedMatrix &wholeModel,
432 int numberRows, const int *whichRows,
433 int numberColumns, const int *whichColumns);
434
437 void copy(const AbcMatrix *from);
439private:
440protected:
445 CoinPackedMatrix *matrix_;
448#if ABC_PARALLEL == 0
449#define NUMBER_ROW_BLOCKS 1
450#define NUMBER_COLUMN_BLOCKS 1
451#elif ABC_PARALLEL == 1
452#define NUMBER_ROW_BLOCKS 4
453#define NUMBER_COLUMN_BLOCKS 4
454#else
455#define NUMBER_ROW_BLOCKS 8
456#define NUMBER_COLUMN_BLOCKS 8
457#endif
461 CoinBigIndex *rowStart_;
463 double *element_;
474 //#define COUNT_COPY
475#ifdef COUNT_COPY
476#define MAX_COUNT 13
478 CoinBigIndex countStart_[MAX_COUNT + 1];
480 int countFirst_[MAX_COUNT + 1];
481 // later int countEndUseful_[MAX_COUNT+1];
482 int *countRealColumn_;
483 // later int * countInverseRealColumn_;
484 CoinBigIndex *countStartLarge_;
485 int *countRow_;
486 double *countElement_;
487 int smallestCount_;
488 int largestCount_;
489#endif
491 //AbcMatrix2 * rowCopy_;
493 //AbcMatrix3 * columnCopy_;
511};
512#ifdef THREAD
513#include <pthread.h>
514typedef struct {
515 double acceptablePivot;
516 const AbcSimplex *model;
517 double *spare;
518 int *spareIndex;
519 double *arrayTemp;
520 int *indexTemp;
521 int *numberInPtr;
522 double *bestPossiblePtr;
523 double *upperThetaPtr;
524 int *posFreePtr;
525 double *freePivotPtr;
526 int *numberOutPtr;
527 const unsigned short *count;
528 const double *pi;
529 const CoinBigIndex *rowStart;
530 const double *element;
531 const unsigned short *column;
532 int offset;
533 int numberInRowArray;
534 int numberLook;
535} dualColumn0Struct;
536#endif
538
539public:
545 void transposeTimes(const AbcSimplex *model,
546 const CoinPackedMatrix *rowCopy,
547 const CoinIndexedVector &x,
548 CoinIndexedVector &spareArray,
549 CoinIndexedVector &z) const;
551 inline bool usefulInfo() const
552 {
553 return rowStart_ != NULL;
554 }
556
562 AbcMatrix2(AbcSimplex *model, const CoinPackedMatrix *rowCopy);
566
573
574protected:
585 mutable unsigned short *count_;
587 mutable CoinBigIndex *rowStart_;
589 unsigned short *column_;
591 double *work_;
592#ifdef THREAD
593 pthread_t *threadId_;
594 dualColumn0Struct *info_;
595#endif
597};
598typedef struct {
599 CoinBigIndex startElements_; // point to data
600 int startIndices_; // point to column_
602 int numberPrice_; // at beginning
603 int numberElements_; // number elements per column
606
607public:
613 void transposeTimes(const AbcSimplex *model,
614 const double *pi,
615 CoinIndexedVector &output) const;
617 void transposeTimes2(const AbcSimplex *model,
618 const double *pi, CoinIndexedVector &dj1,
619 const double *piWeight,
620 double referenceIn, double devex,
621 // Array for exact devex to say what is in reference framework
622 unsigned int *reference,
623 double *weights, double scaleFactor);
625
631 AbcMatrix3(AbcSimplex *model, const CoinPackedMatrix *columnCopy);
635
642
645 void sortBlocks(const AbcSimplex *model);
647 void swapOne(const AbcSimplex *model, const AbcMatrix *matrix,
648 int iColumn);
650
651protected:
662 CoinBigIndex *start_;
664 int *row_;
666 double *element_;
670};
671
672#endif
673
674/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
675*/
#define NUMBER_COLUMN_BLOCKS
Definition: AbcMatrix.hpp:450
#define NUMBER_ROW_BLOCKS
Definition: AbcMatrix.hpp:449
double CoinSimplexDouble
int CoinSimplexInt
double * work_
work arrays
Definition: AbcMatrix.hpp:591
int numberRows_
Number of rows.
Definition: AbcMatrix.hpp:581
int * offset_
Column offset for each block (plus one at end)
Definition: AbcMatrix.hpp:583
unsigned short * column_
columns within block
Definition: AbcMatrix.hpp:589
void transposeTimes(const AbcSimplex *model, const CoinPackedMatrix *rowCopy, const CoinIndexedVector &x, CoinIndexedVector &spareArray, CoinIndexedVector &z) const
Return x * -1 * A in z.
AbcMatrix2 & operator=(const AbcMatrix2 &)
AbcMatrix2()
Default constructor.
AbcMatrix2(AbcSimplex *model, const CoinPackedMatrix *rowCopy)
Constructor from copy.
unsigned short * count_
Counts of elements in each part of row.
Definition: AbcMatrix.hpp:585
int numberBlocks_
Number of blocks.
Definition: AbcMatrix.hpp:579
bool usefulInfo() const
Returns true if copy has useful information.
Definition: AbcMatrix.hpp:551
~AbcMatrix2()
Destructor.
AbcMatrix2(const AbcMatrix2 &)
The copy constructor.
CoinBigIndex * rowStart_
Row starts.
Definition: AbcMatrix.hpp:587
int numberColumns_
Number of columns.
Definition: AbcMatrix.hpp:658
int * row_
Rows.
Definition: AbcMatrix.hpp:664
int numberBlocks_
Number of blocks.
Definition: AbcMatrix.hpp:656
void swapOne(const AbcSimplex *model, const AbcMatrix *matrix, int iColumn)
Swap one variable.
AbcMatrix3 & operator=(const AbcMatrix3 &)
blockStruct * block_
Blocks (ordinary start at 0 and go to first block)
Definition: AbcMatrix.hpp:668
int * column_
Column indices and reverse lookup (within block)
Definition: AbcMatrix.hpp:660
AbcMatrix3(const AbcMatrix3 &)
The copy constructor.
CoinBigIndex * start_
Starts for odd/long vectors.
Definition: AbcMatrix.hpp:662
void sortBlocks(const AbcSimplex *model)
Sort blocks.
~AbcMatrix3()
Destructor.
AbcMatrix3()
Default constructor.
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.
double * element_
Elements.
Definition: AbcMatrix.hpp:666
void transposeTimes(const AbcSimplex *model, const double *pi, CoinIndexedVector &output) const
Return x * -1 * A in z.
AbcMatrix3(AbcSimplex *model, const CoinPackedMatrix *columnCopy)
Constructor from copy.
double * getMutableElements() const
Mutable elements.
Definition: AbcMatrix.hpp:62
int getNumRows() const
Number of rows.
Definition: AbcMatrix.hpp:49
CoinBigIndex * rowStart_
Start of each row (per block) - last lot are useless first all row starts for block 0,...
Definition: AbcMatrix.hpp:461
AbcMatrix(const CoinPackedMatrix &)
The copy constructor from an CoinPackedMatrix.
int savedBestSequence() const
Current best sequence.
Definition: AbcMatrix.hpp:373
~AbcMatrix()
Destructor.
double savedBestDj_
Best reduced cost so far.
Definition: AbcMatrix.hpp:499
AbcMatrix(const AbcMatrix &)
The copy constructor.
void timesModifyExcludingSlacks(double scalar, const double *x, double *y) const
Return y + A * scalar *x in y.
int * startColumnBlock() const
Start of each column block.
Definition: AbcMatrix.hpp:382
AbcSimplex * model_
Model.
Definition: AbcMatrix.hpp:447
void subsetTransposeTimes(const CoinIndexedVector &x, CoinIndexedVector &z) const
Return x *A in z but just for indices Already in z.
int primalColumnRow(int iBlock, bool doByRow, const CoinIndexedVector &update, CoinPartitionedVector &tableauRow) const
gets tableau row - returns number of slacks in block
void rebalance() const
rebalance for parallel
void setSavedBestDj(double value)
Definition: AbcMatrix.hpp:350
int savedBestSequence_
Saved best sequence in pricing.
Definition: AbcMatrix.hpp:505
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.
int numberRowBlocks() const
Number of actual row blocks.
Definition: AbcMatrix.hpp:406
void moveLargestToStart()
Move largest in column to beginning (not used as doesn't help factorization)
CoinBigIndex * rowEnd() const
Row ends.
int getNumCols() const
Number of columns.
Definition: AbcMatrix.hpp:43
int numberRowBlocks_
Number of actual row blocks.
Definition: AbcMatrix.hpp:473
void takeOutOfUseful(int sequence, CoinIndexedVector &spare)
Take out of useful.
void transposeTimesNonBasic(double scalar, const double *x, double *y) const
Return A * scalar(+-1) *x + y in y.
void createRowCopy()
Creates row copy.
double savedBestDj() const
Current best reduced cost.
Definition: AbcMatrix.hpp:346
AbcMatrix & operator=(const AbcMatrix &)
double startFraction_
Special row copy.
Definition: AbcMatrix.hpp:495
int currentWanted_
Current number of negative reduced costs which we still need.
Definition: AbcMatrix.hpp:503
const double * getElements() const
A vector containing the elements in the packed matrix.
Definition: AbcMatrix.hpp:57
CoinPackedMatrix * matrix() const
Returns CoinPackedMatrix (non const)
Definition: AbcMatrix.hpp:304
double startFraction() const
Current start of search space in matrix (as fraction)
Definition: AbcMatrix.hpp:328
int numberColumnBlocks() const
Number of actual column blocks.
Definition: AbcMatrix.hpp:401
void copy(const AbcMatrix *from)
Copy contents - resizing if necessary - otherwise re-use memory.
double dualColumn1(const CoinIndexedVector &update, CoinPartitionedVector &tableauRow, CoinPartitionedVector &candidateList) const
gets sorted tableau row and a possible value of theta
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...
void setEndFraction(double value)
Definition: AbcMatrix.hpp:341
CoinPackedMatrix * getPackedMatrix() const
Return a complete CoinPackedMatrix.
Definition: AbcMatrix.hpp:28
void setStartFraction(double value)
Definition: AbcMatrix.hpp:332
CoinSimplexInt * rowColumns() const
Row columns.
double endFraction_
Current end of search space in matrix (as fraction)
Definition: AbcMatrix.hpp:497
void partialPricing(double startFraction, double endFraction, int &bestSequence, int &numberWanted)
Partial pricing.
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
CoinPackedMatrix * matrix_
Data.
Definition: AbcMatrix.hpp:445
CoinPackedMatrix * reverseOrderedCopy() const
Returns a new matrix in reverse order without gaps.
int minimumGoodReducedCosts_
Partial pricing tuning parameter - minimum number of negative reduced costs to get.
Definition: AbcMatrix.hpp:509
int minimumObjectsScan() const
Partial pricing tuning parameter - minimum number of "objects" to scan.
Definition: AbcMatrix.hpp:310
int blockStart(int block) const
Start of each block (in stored)
Definition: AbcMatrix.hpp:396
void unpack(CoinIndexedVector &rowArray, int column) const
Unpacks a column into an CoinIndexedVector.
void setCurrentWanted(int value)
Definition: AbcMatrix.hpp:368
int chooseBestDj(int iBlock, const CoinIndexedVector &infeasibilities, const double *weights) const
Chooses best weighted dj.
AbcMatrix()
Default constructor.
const int * getIndices() const
A vector containing the minor indices of the elements in the packed matrix.
Definition: AbcMatrix.hpp:67
bool gotRowCopy() const
Definition: AbcMatrix.hpp:391
CoinBigIndex * rowStart() const
Row starts.
int minimumGoodReducedCosts() const
Partial pricing tuning parameter - minimum number of negative reduced costs to get.
Definition: AbcMatrix.hpp:319
CoinBigIndex getNumElements() const
Number of entries in the packed matrix.
Definition: AbcMatrix.hpp:38
CoinBigIndex countBasis(const int *whichColumn, int &numberColumnBasic)
Returns number of elements in column part of basis.
int primalColumnDouble(CoinPartitionedVector &updateForTableauRow, CoinPartitionedVector &updateForDjs, const CoinIndexedVector &updateForWeights, CoinPartitionedVector &spareColumn1, CoinIndexedVector &infeasible, 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 ...
void setMinimumGoodReducedCosts(int value)
Definition: AbcMatrix.hpp:323
double * element_
Values by row.
Definition: AbcMatrix.hpp:463
void setSavedBestSequence(int value)
Definition: AbcMatrix.hpp:377
void transposeTimes(const CoinIndexedVector &x, CoinIndexedVector &z) const
Return -x *A in z
void transposeTimesAll(const double *x, double *y) const
Return y - A * x in y.
void scale(int numberRowsAlreadyScaled)
Scales and creates row copy.
double endFraction() const
Current end of search space in matrix (as fraction)
Definition: AbcMatrix.hpp:337
void primalColumnSubset(int iBlock, const CoinIndexedVector &update, const CoinPartitionedVector &tableauRow, CoinPartitionedVector &weights) const
gets subset updates
int blockStart_[NUMBER_ROW_BLOCKS+1]
Start of each block (in stored)
Definition: AbcMatrix.hpp:469
int * getMutableVectorLengths() const
The lengths of the major-dimension vectors.
Definition: AbcMatrix.hpp:91
int startColumnBlock_[NUMBER_COLUMN_BLOCKS+1]
Start of each column block.
Definition: AbcMatrix.hpp:467
int pivotColumnDantzig(int iBlock, bool doByRow, const CoinIndexedVector &updates, CoinPartitionedVector &spare, double &bestValue) const
Get sequenceIn when Dantzig (One block)
int numberColumnBlocks_
Number of actual column blocks.
Definition: AbcMatrix.hpp:471
const int * getVectorLengths() const
The lengths of the major-dimension vectors.
Definition: AbcMatrix.hpp:86
bool isColOrdered() const
Whether the packed matrix is column major ordered or not.
Definition: AbcMatrix.hpp:33
double * rowElements() const
Row elements.
AbcMatrix(const CoinPackedMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
int pivotColumnDantzig(const CoinIndexedVector &updates, CoinPartitionedVector &spare) const
Get sequenceIn when Dantzig.
void setOriginalWanted(int value)
Definition: AbcMatrix.hpp:359
void transposeTimesBasic(double scalar, const double *x, double *y) const
Return y + A * scalar(+-1) *x in y.
void sortUseful(CoinIndexedVector &spare)
Sort into useful.
void timesIncludingSlacks(double scalar, const double *x, double *y) const
Return A * scalar(+-1) *x in y.
void setMinimumObjectsScan(int value)
Definition: AbcMatrix.hpp:314
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 ...
int * column_
Columns.
Definition: AbcMatrix.hpp:465
void fillBasis(const int *whichColumn, int &numberColumnBasic, int *row, int *start, int *rowCount, int *columnCount, long double *element)
Fills in column part of basis.
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
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
int minimumObjectsScan_
Partial pricing tuning parameter - minimum number of "objects" to scan.
Definition: AbcMatrix.hpp:507
void timesModifyIncludingSlacks(double scalar, const double *x, double *y) const
Return y + A * scalar(+-1) *x in y.
void setModel(AbcSimplex *model)
Sets model.
double dualColumn1Row1(double upperThetaSlack, int &freeSequence, const CoinIndexedVector &update, CoinPartitionedVector &tableauRow, CoinPartitionedVector &candidateList) const
gets sorted tableau row and a possible value of theta
double dualColumn1Row2(double upperThetaSlack, int &freeSequence, const CoinIndexedVector &update, CoinPartitionedVector &tableauRow, CoinPartitionedVector &candidateList) const
gets sorted tableau row and a possible value of theta
int * getMutableIndices() const
A vector containing the minor indices of the elements in the packed matrix.
Definition: AbcMatrix.hpp:72
void putIntofUseful(int sequence, CoinIndexedVector &spare)
Put into useful.
void inOutUseful(int sequenceIn, int sequenceOut)
Put in and out for useful.
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 ...
int transposeTimesNonBasic(double scalar, const CoinIndexedVector &x, CoinIndexedVector &z) const
Return x * scalar * A/code> in z.
const int * blockStart() const
Start of each block (in stored)
Definition: AbcMatrix.hpp:387
void fillBasis(const int *whichColumn, int &numberColumnBasic, int *row, int *start, int *rowCount, int *columnCount, CoinSimplexDouble *element)
Fills in column part of basis.
const CoinBigIndex * getVectorStarts() const
Starts.
Definition: AbcMatrix.hpp:77
int originalWanted() const
Initial number of negative reduced costs wanted.
Definition: AbcMatrix.hpp:355
int originalWanted_
Initial number of negative reduced costs wanted.
Definition: AbcMatrix.hpp:501
CoinBigIndex * getMutableVectorStarts() const
Definition: AbcMatrix.hpp:81
int currentWanted() const
Current number of negative reduced costs which we still need.
Definition: AbcMatrix.hpp:364
void makeAllUseful(CoinIndexedVector &spare)
Make all useful.
AbcMatrix(const AbcMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
Subset constructor (without gaps).
int numberColumns() const
Definition: ClpModel.hpp:332
int numberRows() const
Number of rows.
Definition: ClpModel.hpp:319
int numberElements_
Definition: AbcMatrix.hpp:603
CoinBigIndex startElements_
Definition: AbcMatrix.hpp:599
int numberInBlock_
Definition: AbcMatrix.hpp:601