Clp 1.16.9
Loading...
Searching...
No Matches
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"
20class AbcMatrix2;
21class AbcMatrix3;
22class AbcMatrix {
23
24public:
28 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;
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);
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);
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;
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
289 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 {
303 }
304 inline void setMinimumGoodReducedCosts(int 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
376
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
394 void copy(const AbcMatrix * from);
396private:
397
398protected:
403 CoinPackedMatrix * matrix_;
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
419 CoinBigIndex * rowStart_;
421 double * element_;
423 int * column_;
432 //#define COUNT_COPY
433#ifdef COUNT_COPY
434#define MAX_COUNT 13
436 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
449 //AbcMatrix2 * rowCopy_;
451 //AbcMatrix3 * columnCopy_;
469};
470#ifdef THREAD
471#include <pthread.h>
472typedef 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
496
497public:
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
520 AbcMatrix2(AbcSimplex * model, const CoinPackedMatrix * rowCopy);
524
531
532
533protected:
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
556};
557typedef struct {
558 CoinBigIndex startElements_; // point to data
559 int startIndices_; // point to column_
561 int numberPrice_; // at beginning
562 int numberElements_; // number elements per column
565
566public:
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
591 AbcMatrix3(AbcSimplex * model, const CoinPackedMatrix * columnCopy);
595
602
605 void sortBlocks(const AbcSimplex * model);
607 void swapOne(const AbcSimplex * model, const AbcMatrix * matrix,
608 int iColumn);
610
611
612protected:
621 int * column_;
623 CoinBigIndex * start_;
625 int * row_;
627 double * element_;
631};
632
633#endif
#define NUMBER_COLUMN_BLOCKS
Definition: AbcMatrix.hpp:408
#define NUMBER_ROW_BLOCKS
Definition: AbcMatrix.hpp:407
double CoinSimplexDouble
int CoinSimplexInt
double * work_
work arrays
Definition: AbcMatrix.hpp:550
int numberRows_
Number of rows.
Definition: AbcMatrix.hpp:540
int * offset_
Column offset for each block (plus one at end)
Definition: AbcMatrix.hpp:542
unsigned short * column_
columns within block
Definition: AbcMatrix.hpp:548
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:544
int numberBlocks_
Number of blocks.
Definition: AbcMatrix.hpp:538
bool usefulInfo() const
Returns true if copy has useful information.
Definition: AbcMatrix.hpp:509
~AbcMatrix2()
Destructor.
AbcMatrix2(const AbcMatrix2 &)
The copy constructor.
CoinBigIndex * rowStart_
Row starts.
Definition: AbcMatrix.hpp:546
int numberColumns_
Number of columns.
Definition: AbcMatrix.hpp:619
int * row_
Rows.
Definition: AbcMatrix.hpp:625
int numberBlocks_
Number of blocks.
Definition: AbcMatrix.hpp:617
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:629
int * column_
Column indices and reverse lookup (within block)
Definition: AbcMatrix.hpp:621
AbcMatrix3(const AbcMatrix3 &)
The copy constructor.
CoinBigIndex * start_
Starts for odd/long vectors.
Definition: AbcMatrix.hpp:623
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:627
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:54
int getNumRows() const
Number of rows.
Definition: AbcMatrix.hpp:44
CoinBigIndex * rowStart_
Start of each row (per block) - last lot are useless first all row starts for block 0,...
Definition: AbcMatrix.hpp:419
AbcMatrix(const CoinPackedMatrix &)
The copy constructor from an CoinPackedMatrix.
int savedBestSequence() const
Current best sequence.
Definition: AbcMatrix.hpp:343
~AbcMatrix()
Destructor.
double savedBestDj_
Best reduced cost so far.
Definition: AbcMatrix.hpp:457
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:350
AbcSimplex * model_
Model.
Definition: AbcMatrix.hpp:405
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:325
int savedBestSequence_
Saved best sequence in pricing.
Definition: AbcMatrix.hpp:463
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:364
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:40
int numberRowBlocks_
Number of actual row blocks.
Definition: AbcMatrix.hpp:431
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:322
AbcMatrix & operator=(const AbcMatrix &)
double startFraction_
Special row copy.
Definition: AbcMatrix.hpp:453
int currentWanted_
Current number of negative reduced costs which we still need.
Definition: AbcMatrix.hpp:461
const double * getElements() const
A vector containing the elements in the packed matrix.
Definition: AbcMatrix.hpp:50
CoinPackedMatrix * matrix() const
Returns CoinPackedMatrix (non const)
Definition: AbcMatrix.hpp:289
double startFraction() const
Current start of search space in matrix (as fraction)
Definition: AbcMatrix.hpp:308
int numberColumnBlocks() const
Number of actual column blocks.
Definition: AbcMatrix.hpp:361
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:318
CoinPackedMatrix * getPackedMatrix() const
Return a complete CoinPackedMatrix.
Definition: AbcMatrix.hpp:28
void setStartFraction(double value)
Definition: AbcMatrix.hpp:311
CoinSimplexInt * rowColumns() const
Row columns.
double endFraction_
Current end of search space in matrix (as fraction)
Definition: AbcMatrix.hpp:455
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:403
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:467
int minimumObjectsScan() const
Partial pricing tuning parameter - minimum number of "objects" to scan.
Definition: AbcMatrix.hpp:294
int blockStart(int block) const
Start of each block (in stored)
Definition: AbcMatrix.hpp:358
void unpack(CoinIndexedVector &rowArray, int column) const
Unpacks a column into an CoinIndexedVector.
void setCurrentWanted(int value)
Definition: AbcMatrix.hpp:339
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:58
bool gotRowCopy() const
Definition: AbcMatrix.hpp:355
CoinBigIndex * rowStart() const
Row starts.
int minimumGoodReducedCosts() const
Partial pricing tuning parameter - minimum number of negative reduced costs to get.
Definition: AbcMatrix.hpp:301
CoinBigIndex getNumElements() const
Number of entries in the packed matrix.
Definition: AbcMatrix.hpp:36
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:304
double * element_
Values by row.
Definition: AbcMatrix.hpp:421
void setSavedBestSequence(int value)
Definition: AbcMatrix.hpp:346
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:315
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:427
int * getMutableVectorLengths() const
The lengths of the major-dimension vectors.
Definition: AbcMatrix.hpp:77
int startColumnBlock_[NUMBER_COLUMN_BLOCKS+1]
Start of each column block.
Definition: AbcMatrix.hpp:425
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:429
const int * getVectorLengths() const
The lengths of the major-dimension vectors.
Definition: AbcMatrix.hpp:73
bool isColOrdered() const
Whether the packed matrix is column major ordered or not.
Definition: AbcMatrix.hpp:32
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:332
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:297
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:423
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:465
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:62
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:353
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:66
int originalWanted() const
Initial number of negative reduced costs wanted.
Definition: AbcMatrix.hpp:329
int originalWanted_
Initial number of negative reduced costs wanted.
Definition: AbcMatrix.hpp:459
CoinBigIndex * getMutableVectorStarts() const
Definition: AbcMatrix.hpp:69
int currentWanted() const
Current number of negative reduced costs which we still need.
Definition: AbcMatrix.hpp:336
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:325
int numberRows() const
Number of rows.
Definition: ClpModel.hpp:315
int numberElements_
Definition: AbcMatrix.hpp:562
CoinBigIndex startElements_
Definition: AbcMatrix.hpp:558
int numberInBlock_
Definition: AbcMatrix.hpp:560