Loading...
Searching...
No Matches
AbcMatrix.hpp
Go to the documentation of this file.
/* $Id$ */
// Copyright (C) 2002, International Business Machines
// Corporation and others, Copyright (C) 2012, FasterCoin. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef AbcMatrix_H
#define AbcMatrix_H
#include "CoinPragma.hpp"
#include "ClpMatrixBase.hpp"
#include "AbcSimplex.hpp"
#include "CoinAbcHelperFunctions.hpp"
class AbcMatrix2;
class AbcMatrix3;
class AbcMatrix {
public:
inline CoinPackedMatrix *getPackedMatrix() const
{
return matrix_;
}
inline bool isColOrdered() const
{
return true;
}
inline CoinBigIndex getNumElements() const
{
return matrix_->getNumElements();
}
inline int getNumCols() const
{
assert(matrix_->getNumCols() == model_->numberColumns());
return matrix_->getNumCols();
}
inline int getNumRows() const
{
assert(matrix_->getNumRows() == model_->numberRows());
return matrix_->getNumRows();
}
void setModel(AbcSimplex *model);
inline const double *getElements() const
{
return matrix_->getElements();
}
inline double *getMutableElements() const
{
return matrix_->getMutableElements();
}
inline const int *getIndices() const
{
return matrix_->getIndices();
}
inline int *getMutableIndices() const
{
return matrix_->getMutableIndices();
}
inline const CoinBigIndex *getVectorStarts() const
{
return matrix_->getVectorStarts();
}
inline CoinBigIndex *getMutableVectorStarts() const
{
return matrix_->getMutableVectorStarts();
}
inline const int *getVectorLengths() const
{
return matrix_->getVectorLengths();
}
inline int *getMutableVectorLengths() const
{
return matrix_->getMutableVectorLengths();
}
CoinBigIndex *rowStart() const;
CoinBigIndex *rowEnd() const;
double *rowElements() const;
CoinSimplexInt *rowColumns() const;
CoinPackedMatrix *reverseOrderedCopy() const;
CoinBigIndex countBasis(const int *whichColumn,
int &numberColumnBasic);
void fillBasis(const int *whichColumn,
int &numberColumnBasic,
int *row, int *start,
int *rowCount, int *columnCount,
CoinSimplexDouble *element);
void fillBasis(const int *whichColumn,
int &numberColumnBasic,
int *row, int *start,
int *rowCount, int *columnCount,
long double *element);
void scale(int numberRowsAlreadyScaled);
void createRowCopy();
void takeOutOfUseful(int sequence, CoinIndexedVector &spare);
void putIntofUseful(int sequence, CoinIndexedVector &spare);
void inOutUseful(int sequenceIn, int sequenceOut);
void makeAllUseful(CoinIndexedVector &spare);
void sortUseful(CoinIndexedVector &spare);
void moveLargestToStart();
void unpack(CoinIndexedVector &rowArray,
int column) const;
void add(CoinIndexedVector &rowArray, int column, double multiplier) const;
void timesModifyExcludingSlacks(double scalar,
const double *x, double *y) const;
void timesModifyIncludingSlacks(double scalar,
const double *x, double *y) const;
void timesIncludingSlacks(double scalar,
const double *x, double *y) const;
void transposeTimesNonBasic(double scalar,
const double *x, double *y) const;
void transposeTimesAll(const double *x, double *y) const;
void transposeTimesBasic(double scalar,
const double *x, double *y) const;
int transposeTimesNonBasic(double scalar,
const CoinIndexedVector &x,
CoinIndexedVector &z) const;
double dualColumn1(const CoinIndexedVector &update,
CoinPartitionedVector &tableauRow,
CoinPartitionedVector &candidateList) const;
double dualColumn1Row(int iBlock, double upperThetaSlack, int &freeSequence,
const CoinIndexedVector &update,
CoinPartitionedVector &tableauRow,
CoinPartitionedVector &candidateList) const;
double dualColumn1RowFew(int iBlock, double upperThetaSlack, int &freeSequence,
const CoinIndexedVector &update,
CoinPartitionedVector &tableauRow,
CoinPartitionedVector &candidateList) const;
double dualColumn1Row2(double upperThetaSlack, int &freeSequence,
const CoinIndexedVector &update,
CoinPartitionedVector &tableauRow,
CoinPartitionedVector &candidateList) const;
double dualColumn1Row1(double upperThetaSlack, int &freeSequence,
const CoinIndexedVector &update,
CoinPartitionedVector &tableauRow,
CoinPartitionedVector &candidateList) const;
void dualColumn1Part(int iBlock, int &sequenceIn, double &upperTheta,
const CoinIndexedVector &update,
CoinPartitionedVector &tableauRow,
CoinPartitionedVector &candidateList) const;
void rebalance() const;
int pivotColumnDantzig(const CoinIndexedVector &updates,
CoinPartitionedVector &spare) const;
int pivotColumnDantzig(int iBlock, bool doByRow, const CoinIndexedVector &updates,
CoinPartitionedVector &spare,
double &bestValue) const;
int primalColumnRow(int iBlock, bool doByRow, const CoinIndexedVector &update,
CoinPartitionedVector &tableauRow) const;
int primalColumnRowAndDjs(int iBlock, const CoinIndexedVector &updateTableau,
const CoinIndexedVector &updateDjs,
CoinPartitionedVector &tableauRow) const;
int chooseBestDj(int iBlock, const CoinIndexedVector &infeasibilities,
const double *weights) const;
int primalColumnDouble(int iBlock, CoinPartitionedVector &updateForTableauRow,
CoinPartitionedVector &updateForDjs,
const CoinIndexedVector &updateForWeights,
CoinPartitionedVector &spareColumn1,
double *infeasibilities,
double referenceIn, double devex,
// Array for exact devex to say what is in reference framework
unsigned int *reference,
double *weights, double scaleFactor) const;
int primalColumnSparseDouble(int iBlock, CoinPartitionedVector &updateForTableauRow,
CoinPartitionedVector &updateForDjs,
const CoinIndexedVector &updateForWeights,
CoinPartitionedVector &spareColumn1,
double *infeasibilities,
double referenceIn, double devex,
// Array for exact devex to say what is in reference framework
unsigned int *reference,
double *weights, double scaleFactor) const;
int primalColumnDouble(CoinPartitionedVector &updateForTableauRow,
CoinPartitionedVector &updateForDjs,
const CoinIndexedVector &updateForWeights,
CoinPartitionedVector &spareColumn1,
CoinIndexedVector &infeasible,
double referenceIn, double devex,
// Array for exact devex to say what is in reference framework
unsigned int *reference,
double *weights, double scaleFactor) const;
void primalColumnSubset(int iBlock, const CoinIndexedVector &update,
const CoinPartitionedVector &tableauRow,
CoinPartitionedVector &weights) const;
void partialPricing(double startFraction, double endFraction,
int &bestSequence, int &numberWanted);
void subsetTransposeTimes(const CoinIndexedVector &x,
CoinIndexedVector &z) const;
void transposeTimes(const CoinIndexedVector &x,
CoinIndexedVector &z) const;
inline CoinPackedMatrix *matrix() const
{
return matrix_;
}
inline int minimumObjectsScan() const
{
return minimumObjectsScan_;
}
inline void setMinimumObjectsScan(int value)
{
minimumObjectsScan_ = value;
}
inline int minimumGoodReducedCosts() const
{
return minimumGoodReducedCosts_;
}
inline void setMinimumGoodReducedCosts(int value)
{
minimumGoodReducedCosts_ = value;
}
inline double startFraction() const
{
return startFraction_;
}
inline void setStartFraction(double value)
{
startFraction_ = value;
}
inline double endFraction() const
{
return endFraction_;
}
inline void setEndFraction(double value)
{
endFraction_ = value;
}
inline double savedBestDj() const
{
return savedBestDj_;
}
inline void setSavedBestDj(double value)
{
savedBestDj_ = value;
}
inline int originalWanted() const
{
return originalWanted_;
}
inline void setOriginalWanted(int value)
{
originalWanted_ = value;
}
inline int currentWanted() const
{
return currentWanted_;
}
inline void setCurrentWanted(int value)
{
currentWanted_ = value;
}
inline int savedBestSequence() const
{
return savedBestSequence_;
}
inline void setSavedBestSequence(int value)
{
savedBestSequence_ = value;
}
inline int *startColumnBlock() const
{
return startColumnBlock_;
}
inline const int *blockStart() const
{
return blockStart_;
}
inline bool gotRowCopy() const
{
return rowStart_ != 0;
}
inline int blockStart(int block) const
{
return blockStart_[block];
}
inline int numberColumnBlocks() const
{
return numberColumnBlocks_;
}
inline int numberRowBlocks() const
{
return numberRowBlocks_;
}
AbcMatrix();
~AbcMatrix();
AbcMatrix(const AbcMatrix &);
AbcMatrix(const CoinPackedMatrix &);
AbcMatrix(const AbcMatrix &wholeModel,
int numberRows, const int *whichRows,
int numberColumns, const int *whichColumns);
AbcMatrix(const CoinPackedMatrix &wholeModel,
int numberRows, const int *whichRows,
int numberColumns, const int *whichColumns);
AbcMatrix &operator=(const AbcMatrix &);
void copy(const AbcMatrix *from);
private:
protected:
CoinPackedMatrix *matrix_;
mutable AbcSimplex *model_;
#if ABC_PARALLEL == 0
#define NUMBER_ROW_BLOCKS 1
#define NUMBER_COLUMN_BLOCKS 1
#elif ABC_PARALLEL == 1
#define NUMBER_ROW_BLOCKS 4
#define NUMBER_COLUMN_BLOCKS 4
#else
#define NUMBER_ROW_BLOCKS 8
#define NUMBER_COLUMN_BLOCKS 8
#endif
CoinBigIndex *rowStart_;
double *element_;
int *column_;
mutable int startColumnBlock_[NUMBER_COLUMN_BLOCKS + 1];
int blockStart_[NUMBER_ROW_BLOCKS + 1];
mutable int numberColumnBlocks_;
int numberRowBlocks_;
//#define COUNT_COPY
#ifdef COUNT_COPY
#define MAX_COUNT 13
CoinBigIndex countStart_[MAX_COUNT + 1];
int countFirst_[MAX_COUNT + 1];
// later int countEndUseful_[MAX_COUNT+1];
int *countRealColumn_;
// later int * countInverseRealColumn_;
CoinBigIndex *countStartLarge_;
int *countRow_;
double *countElement_;
int smallestCount_;
int largestCount_;
#endif
//AbcMatrix2 * rowCopy_;
//AbcMatrix3 * columnCopy_;
double startFraction_;
double endFraction_;
double savedBestDj_;
int originalWanted_;
int currentWanted_;
int savedBestSequence_;
int minimumObjectsScan_;
int minimumGoodReducedCosts_;
};
#ifdef THREAD
#include <pthread.h>
typedef struct {
double acceptablePivot;
const AbcSimplex *model;
double *spare;
int *spareIndex;
double *arrayTemp;
int *indexTemp;
int *numberInPtr;
double *bestPossiblePtr;
double *upperThetaPtr;
int *posFreePtr;
double *freePivotPtr;
int *numberOutPtr;
const unsigned short *count;
const double *pi;
const CoinBigIndex *rowStart;
const double *element;
const unsigned short *column;
int offset;
int numberInRowArray;
int numberLook;
} dualColumn0Struct;
#endif
class AbcMatrix2 {
public:
void transposeTimes(const AbcSimplex *model,
const CoinPackedMatrix *rowCopy,
const CoinIndexedVector &x,
CoinIndexedVector &spareArray,
CoinIndexedVector &z) const;
inline bool usefulInfo() const
{
return rowStart_ != NULL;
}
AbcMatrix2();
AbcMatrix2(AbcSimplex *model, const CoinPackedMatrix *rowCopy);
~AbcMatrix2();
AbcMatrix2(const AbcMatrix2 &);
AbcMatrix2 &operator=(const AbcMatrix2 &);
protected:
int numberBlocks_;
int numberRows_;
int *offset_;
mutable unsigned short *count_;
mutable CoinBigIndex *rowStart_;
unsigned short *column_;
double *work_;
#ifdef THREAD
pthread_t *threadId_;
dualColumn0Struct *info_;
#endif
};
typedef struct {
CoinBigIndex startElements_; // point to data
int startIndices_; // point to column_
int numberInBlock_;
int numberPrice_; // at beginning
int numberElements_; // number elements per column
} blockStruct3;
class AbcMatrix3 {
public:
void transposeTimes(const AbcSimplex *model,
const double *pi,
CoinIndexedVector &output) const;
void transposeTimes2(const AbcSimplex *model,
const double *pi, CoinIndexedVector &dj1,
const double *piWeight,
double referenceIn, double devex,
// Array for exact devex to say what is in reference framework
unsigned int *reference,
double *weights, double scaleFactor);
AbcMatrix3();
AbcMatrix3(AbcSimplex *model, const CoinPackedMatrix *columnCopy);
~AbcMatrix3();
AbcMatrix3(const AbcMatrix3 &);
AbcMatrix3 &operator=(const AbcMatrix3 &);
void sortBlocks(const AbcSimplex *model);
void swapOne(const AbcSimplex *model, const AbcMatrix *matrix,
int iColumn);
protected:
int numberBlocks_;
int numberColumns_;
int *column_;
CoinBigIndex *start_;
int *row_;
double *element_;
blockStruct *block_;
};
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
NUMBER_COLUMN_BLOCKS
#define NUMBER_COLUMN_BLOCKS
Definition AbcMatrix.hpp:450
NUMBER_ROW_BLOCKS
#define NUMBER_ROW_BLOCKS
Definition AbcMatrix.hpp:449
AbcSimplex.hpp
AbcSimplex
#define AbcSimplex
Definition AbcWarmStart.hpp:16
ClpMatrixBase.hpp
CoinSimplexDouble
double CoinSimplexDouble
Definition CoinAbcCommon.hpp:21
CoinSimplexInt
int CoinSimplexInt
Definition CoinAbcCommon.hpp:22
CoinAbcHelperFunctions.hpp
AbcMatrix2
Definition AbcMatrix.hpp:537
AbcMatrix2::work_
double * work_
work arrays
Definition AbcMatrix.hpp:591
AbcMatrix2::numberRows_
int numberRows_
Number of rows.
Definition AbcMatrix.hpp:581
AbcMatrix2::offset_
int * offset_
Column offset for each block (plus one at end).
Definition AbcMatrix.hpp:583
AbcMatrix2::column_
unsigned short * column_
columns within block
Definition AbcMatrix.hpp:589
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::operator=
AbcMatrix2 & operator=(const AbcMatrix2 &)
AbcMatrix2::AbcMatrix2
AbcMatrix2()
Default constructor.
AbcMatrix2::AbcMatrix2
AbcMatrix2(AbcSimplex *model, const CoinPackedMatrix *rowCopy)
Constructor from copy.
AbcMatrix2::count_
unsigned short * count_
Counts of elements in each part of row.
Definition AbcMatrix.hpp:585
AbcMatrix2::numberBlocks_
int numberBlocks_
Number of blocks.
Definition AbcMatrix.hpp:579
AbcMatrix2::usefulInfo
bool usefulInfo() const
Returns true if copy has useful information.
Definition AbcMatrix.hpp:551
AbcMatrix2::~AbcMatrix2
~AbcMatrix2()
Destructor.
AbcMatrix2::AbcMatrix2
AbcMatrix2(const AbcMatrix2 &)
The copy constructor.
AbcMatrix2::rowStart_
CoinBigIndex * rowStart_
Row starts.
Definition AbcMatrix.hpp:587
AbcMatrix3
Definition AbcMatrix.hpp:605
AbcMatrix3::numberColumns_
int numberColumns_
Number of columns.
Definition AbcMatrix.hpp:658
AbcMatrix3::row_
int * row_
Rows.
Definition AbcMatrix.hpp:664
AbcMatrix3::numberBlocks_
int numberBlocks_
Number of blocks.
Definition AbcMatrix.hpp:656
AbcMatrix3::swapOne
void swapOne(const AbcSimplex *model, const AbcMatrix *matrix, int iColumn)
Swap one variable.
AbcMatrix3::operator=
AbcMatrix3 & operator=(const AbcMatrix3 &)
AbcMatrix3::block_
blockStruct * block_
Blocks (ordinary start at 0 and go to first block).
Definition AbcMatrix.hpp:668
AbcMatrix3::column_
int * column_
Column indices and reverse lookup (within block).
Definition AbcMatrix.hpp:660
AbcMatrix3::AbcMatrix3
AbcMatrix3(const AbcMatrix3 &)
The copy constructor.
AbcMatrix3::start_
CoinBigIndex * start_
Starts for odd/long vectors.
Definition AbcMatrix.hpp:662
AbcMatrix3::sortBlocks
void sortBlocks(const AbcSimplex *model)
Sort blocks.
AbcMatrix3::~AbcMatrix3
~AbcMatrix3()
Destructor.
AbcMatrix3::AbcMatrix3
AbcMatrix3()
Default constructor.
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.
AbcMatrix3::element_
double * element_
Elements.
Definition AbcMatrix.hpp:666
AbcMatrix3::transposeTimes
void transposeTimes(const AbcSimplex *model, const double *pi, CoinIndexedVector &output) const
Return x * -1 * A in z.
AbcMatrix3::AbcMatrix3
AbcMatrix3(AbcSimplex *model, const CoinPackedMatrix *columnCopy)
Constructor from copy.
AbcMatrix
Definition AbcMatrix.hpp:22
AbcMatrix::getMutableElements
double * getMutableElements() const
Mutable elements.
Definition AbcMatrix.hpp:62
AbcMatrix::getNumRows
int getNumRows() const
Number of rows.
Definition AbcMatrix.hpp:49
AbcMatrix::rowStart_
CoinBigIndex * rowStart_
Start of each row (per block) - last lot are useless first all row starts for block 0,...
Definition AbcMatrix.hpp:461
AbcMatrix::AbcMatrix
AbcMatrix(const CoinPackedMatrix &)
The copy constructor from an CoinPackedMatrix.
AbcMatrix::savedBestSequence
int savedBestSequence() const
Current best sequence.
Definition AbcMatrix.hpp:373
AbcMatrix::~AbcMatrix
~AbcMatrix()
Destructor.
AbcMatrix::savedBestDj_
double savedBestDj_
Best reduced cost so far.
Definition AbcMatrix.hpp:499
AbcMatrix::AbcMatrix
AbcMatrix(const AbcMatrix &)
The copy constructor.
AbcMatrix::timesModifyExcludingSlacks
void timesModifyExcludingSlacks(double scalar, const double *x, double *y) const
Return y + A * scalar *x in y.
AbcMatrix::startColumnBlock
int * startColumnBlock() const
Start of each column block.
Definition AbcMatrix.hpp:382
AbcMatrix::model_
AbcSimplex * model_
Model.
Definition AbcMatrix.hpp:447
AbcMatrix::subsetTransposeTimes
void subsetTransposeTimes(const CoinIndexedVector &x, CoinIndexedVector &z) const
Return x *A in z but just for indices Already in z.
AbcMatrix::primalColumnRow
int primalColumnRow(int iBlock, bool doByRow, const CoinIndexedVector &update, CoinPartitionedVector &tableauRow) const
gets tableau row - returns number of slacks in block
AbcMatrix::rebalance
void rebalance() const
rebalance for parallel
AbcMatrix::setSavedBestDj
void setSavedBestDj(double value)
Definition AbcMatrix.hpp:350
AbcMatrix::savedBestSequence_
int savedBestSequence_
Saved best sequence in pricing.
Definition AbcMatrix.hpp:505
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::numberRowBlocks
int numberRowBlocks() const
Number of actual row blocks.
Definition AbcMatrix.hpp:406
AbcMatrix::moveLargestToStart
void moveLargestToStart()
Move largest in column to beginning (not used as doesn't help factorization).
AbcMatrix::rowEnd
CoinBigIndex * rowEnd() const
Row ends.
AbcMatrix::getNumCols
int getNumCols() const
Number of columns.
Definition AbcMatrix.hpp:43
AbcMatrix::numberRowBlocks_
int numberRowBlocks_
Number of actual row blocks.
Definition AbcMatrix.hpp:473
AbcMatrix::takeOutOfUseful
void takeOutOfUseful(int sequence, CoinIndexedVector &spare)
Take out of useful.
AbcMatrix::transposeTimesNonBasic
void transposeTimesNonBasic(double scalar, const double *x, double *y) const
Return A * scalar(+-1) *x + y in y.
AbcMatrix::createRowCopy
void createRowCopy()
Creates row copy.
AbcMatrix::savedBestDj
double savedBestDj() const
Current best reduced cost.
Definition AbcMatrix.hpp:346
AbcMatrix::operator=
AbcMatrix & operator=(const AbcMatrix &)
AbcMatrix::startFraction_
double startFraction_
Special row copy.
Definition AbcMatrix.hpp:495
AbcMatrix::currentWanted_
int currentWanted_
Current number of negative reduced costs which we still need.
Definition AbcMatrix.hpp:503
AbcMatrix::getElements
const double * getElements() const
A vector containing the elements in the packed matrix.
Definition AbcMatrix.hpp:57
AbcMatrix::matrix
CoinPackedMatrix * matrix() const
Returns CoinPackedMatrix (non const).
Definition AbcMatrix.hpp:304
AbcMatrix::startFraction
double startFraction() const
Current start of search space in matrix (as fraction).
Definition AbcMatrix.hpp:328
AbcMatrix::numberColumnBlocks
int numberColumnBlocks() const
Number of actual column blocks.
Definition AbcMatrix.hpp:401
AbcMatrix::copy
void copy(const AbcMatrix *from)
Copy contents - resizing if necessary - otherwise re-use memory.
AbcMatrix::dualColumn1
double dualColumn1(const CoinIndexedVector &update, CoinPartitionedVector &tableauRow, CoinPartitionedVector &candidateList) const
gets sorted tableau row and a possible value of theta
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::setEndFraction
void setEndFraction(double value)
Definition AbcMatrix.hpp:341
AbcMatrix::getPackedMatrix
CoinPackedMatrix * getPackedMatrix() const
Return a complete CoinPackedMatrix.
Definition AbcMatrix.hpp:28
AbcMatrix::setStartFraction
void setStartFraction(double value)
Definition AbcMatrix.hpp:332
AbcMatrix::rowColumns
CoinSimplexInt * rowColumns() const
Row columns.
AbcMatrix::endFraction_
double endFraction_
Current end of search space in matrix (as fraction).
Definition AbcMatrix.hpp:497
AbcMatrix::partialPricing
void partialPricing(double startFraction, double endFraction, int &bestSequence, int &numberWanted)
Partial pricing.
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::matrix_
CoinPackedMatrix * matrix_
Data.
Definition AbcMatrix.hpp:445
AbcMatrix::reverseOrderedCopy
CoinPackedMatrix * reverseOrderedCopy() const
Returns a new matrix in reverse order without gaps.
AbcMatrix::minimumGoodReducedCosts_
int minimumGoodReducedCosts_
Partial pricing tuning parameter - minimum number of negative reduced costs to get.
Definition AbcMatrix.hpp:509
AbcMatrix::minimumObjectsScan
int minimumObjectsScan() const
Partial pricing tuning parameter - minimum number of "objects" to scan.
Definition AbcMatrix.hpp:310
AbcMatrix::blockStart
int blockStart(int block) const
Start of each block (in stored).
Definition AbcMatrix.hpp:396
AbcMatrix::unpack
void unpack(CoinIndexedVector &rowArray, int column) const
Unpacks a column into an CoinIndexedVector.
AbcMatrix::setCurrentWanted
void setCurrentWanted(int value)
Definition AbcMatrix.hpp:368
AbcMatrix::chooseBestDj
int chooseBestDj(int iBlock, const CoinIndexedVector &infeasibilities, const double *weights) const
Chooses best weighted dj.
AbcMatrix::AbcMatrix
AbcMatrix()
Default constructor.
AbcMatrix::getIndices
const int * getIndices() const
A vector containing the minor indices of the elements in the packed matrix.
Definition AbcMatrix.hpp:67
AbcMatrix::gotRowCopy
bool gotRowCopy() const
Definition AbcMatrix.hpp:391
AbcMatrix::rowStart
CoinBigIndex * rowStart() const
Row starts.
AbcMatrix::minimumGoodReducedCosts
int minimumGoodReducedCosts() const
Partial pricing tuning parameter - minimum number of negative reduced costs to get.
Definition AbcMatrix.hpp:319
AbcMatrix::getNumElements
CoinBigIndex getNumElements() const
Number of entries in the packed matrix.
Definition AbcMatrix.hpp:38
AbcMatrix::countBasis
CoinBigIndex countBasis(const int *whichColumn, int &numberColumnBasic)
Returns number of elements in column part of basis.
AbcMatrix::primalColumnDouble
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 ...
AbcMatrix::setMinimumGoodReducedCosts
void setMinimumGoodReducedCosts(int value)
Definition AbcMatrix.hpp:323
AbcMatrix::element_
double * element_
Values by row.
Definition AbcMatrix.hpp:463
AbcMatrix::setSavedBestSequence
void setSavedBestSequence(int value)
Definition AbcMatrix.hpp:377
AbcMatrix::transposeTimes
void transposeTimes(const CoinIndexedVector &x, CoinIndexedVector &z) const
Return -x *A in z.
AbcMatrix::transposeTimesAll
void transposeTimesAll(const double *x, double *y) const
Return y - A * x in y.
AbcMatrix::scale
void scale(int numberRowsAlreadyScaled)
Scales and creates row copy.
AbcMatrix::endFraction
double endFraction() const
Current end of search space in matrix (as fraction).
Definition AbcMatrix.hpp:337
AbcMatrix::primalColumnSubset
void primalColumnSubset(int iBlock, const CoinIndexedVector &update, const CoinPartitionedVector &tableauRow, CoinPartitionedVector &weights) const
gets subset updates
AbcMatrix::blockStart_
int blockStart_[NUMBER_ROW_BLOCKS+1]
Start of each block (in stored).
Definition AbcMatrix.hpp:469
AbcMatrix::getMutableVectorLengths
int * getMutableVectorLengths() const
The lengths of the major-dimension vectors.
Definition AbcMatrix.hpp:91
AbcMatrix::startColumnBlock_
int startColumnBlock_[NUMBER_COLUMN_BLOCKS+1]
Start of each column block.
Definition AbcMatrix.hpp:467
AbcMatrix::pivotColumnDantzig
int pivotColumnDantzig(int iBlock, bool doByRow, const CoinIndexedVector &updates, CoinPartitionedVector &spare, double &bestValue) const
Get sequenceIn when Dantzig (One block).
AbcMatrix::numberColumnBlocks_
int numberColumnBlocks_
Number of actual column blocks.
Definition AbcMatrix.hpp:471
AbcMatrix::getVectorLengths
const int * getVectorLengths() const
The lengths of the major-dimension vectors.
Definition AbcMatrix.hpp:86
AbcMatrix::isColOrdered
bool isColOrdered() const
Whether the packed matrix is column major ordered or not.
Definition AbcMatrix.hpp:33
AbcMatrix::rowElements
double * rowElements() const
Row elements.
AbcMatrix::AbcMatrix
AbcMatrix(const CoinPackedMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
AbcMatrix::pivotColumnDantzig
int pivotColumnDantzig(const CoinIndexedVector &updates, CoinPartitionedVector &spare) const
Get sequenceIn when Dantzig.
AbcMatrix::setOriginalWanted
void setOriginalWanted(int value)
Definition AbcMatrix.hpp:359
AbcMatrix::transposeTimesBasic
void transposeTimesBasic(double scalar, const double *x, double *y) const
Return y + A * scalar(+-1) *x in y.
AbcMatrix::sortUseful
void sortUseful(CoinIndexedVector &spare)
Sort into useful.
AbcMatrix::timesIncludingSlacks
void timesIncludingSlacks(double scalar, const double *x, double *y) const
Return A * scalar(+-1) *x in y.
AbcMatrix::setMinimumObjectsScan
void setMinimumObjectsScan(int value)
Definition AbcMatrix.hpp:314
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 ...
AbcMatrix::column_
int * column_
Columns.
Definition AbcMatrix.hpp:465
AbcMatrix::fillBasis
void fillBasis(const int *whichColumn, int &numberColumnBasic, int *row, int *start, int *rowCount, int *columnCount, long double *element)
Fills in column part of basis.
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::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
AbcMatrix::minimumObjectsScan_
int minimumObjectsScan_
Partial pricing tuning parameter - minimum number of "objects" to scan.
Definition AbcMatrix.hpp:507
AbcMatrix::timesModifyIncludingSlacks
void timesModifyIncludingSlacks(double scalar, const double *x, double *y) const
Return y + A * scalar(+-1) *x in y.
AbcMatrix::setModel
void setModel(AbcSimplex *model)
Sets model.
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::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::getMutableIndices
int * getMutableIndices() const
A vector containing the minor indices of the elements in the packed matrix.
Definition AbcMatrix.hpp:72
AbcMatrix::putIntofUseful
void putIntofUseful(int sequence, CoinIndexedVector &spare)
Put into useful.
AbcMatrix::inOutUseful
void inOutUseful(int sequenceIn, int sequenceOut)
Put in and out for useful.
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 ...
AbcMatrix::transposeTimesNonBasic
int transposeTimesNonBasic(double scalar, const CoinIndexedVector &x, CoinIndexedVector &z) const
Return x * scalar * A/code> in z.
AbcMatrix::blockStart
const int * blockStart() const
Start of each block (in stored).
Definition AbcMatrix.hpp:387
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::getVectorStarts
const CoinBigIndex * getVectorStarts() const
Starts.
Definition AbcMatrix.hpp:77
AbcMatrix::originalWanted
int originalWanted() const
Initial number of negative reduced costs wanted.
Definition AbcMatrix.hpp:355
AbcMatrix::originalWanted_
int originalWanted_
Initial number of negative reduced costs wanted.
Definition AbcMatrix.hpp:501
AbcMatrix::getMutableVectorStarts
CoinBigIndex * getMutableVectorStarts() const
Definition AbcMatrix.hpp:81
AbcMatrix::currentWanted
int currentWanted() const
Current number of negative reduced costs which we still need.
Definition AbcMatrix.hpp:364
AbcMatrix::makeAllUseful
void makeAllUseful(CoinIndexedVector &spare)
Make all useful.
AbcMatrix::AbcMatrix
AbcMatrix(const AbcMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns)
Subset constructor (without gaps).
blockStruct3
Definition AbcMatrix.hpp:598
blockStruct3::startIndices_
int startIndices_
Definition AbcMatrix.hpp:600
blockStruct3::numberElements_
int numberElements_
Definition AbcMatrix.hpp:603
blockStruct3::startElements_
CoinBigIndex startElements_
Definition AbcMatrix.hpp:599
blockStruct3::numberInBlock_
int numberInBlock_
Definition AbcMatrix.hpp:601
blockStruct3::numberPrice_
int numberPrice_
Definition AbcMatrix.hpp:602
blockStruct
Definition ClpPackedMatrix.hpp:587