#include <ClpPlusMinusOneMatrix.hpp>
Inheritance diagram for ClpPlusMinusOneMatrix:
Public Member Functions | |
Useful methods | |
virtual CoinPackedMatrix * | getPackedMatrix () const |
Return a complete CoinPackedMatrix. | |
virtual bool | isColOrdered () const |
Whether the packed matrix is column major ordered or not. | |
virtual CoinBigIndex | getNumElements () const |
Number of entries in the packed matrix. | |
virtual int | getNumCols () const |
Number of columns. | |
virtual int | getNumRows () const |
Number of rows. | |
virtual const double * | getElements () const |
A vector containing the elements in the packed matrix. | |
virtual const int * | getIndices () const |
A vector containing the minor indices of the elements in the packed matrix. | |
int * | getMutableIndices () const |
Return a complete CoinPackedMatrix. | |
virtual const CoinBigIndex * | getVectorStarts () const |
Return a complete CoinPackedMatrix. | |
virtual const int * | getVectorLengths () const |
The lengths of the major-dimension vectors. | |
virtual void | deleteCols (const int numDel, const int *indDel) |
Delete the columns whose indices are listed in indDel . | |
virtual void | deleteRows (const int numDel, const int *indDel) |
Delete the rows whose indices are listed in indDel . | |
virtual void | appendCols (int number, const CoinPackedVectorBase *const *columns) |
Append Columns. | |
virtual void | appendRows (int number, const CoinPackedVectorBase *const *rows) |
Append Rows. | |
virtual int | appendMatrix (int number, int type, const CoinBigIndex *starts, const int *index, const double *element, int numberOther=-1) |
Append a set of rows/columns to the end of the matrix. | |
virtual ClpMatrixBase * | reverseOrderedCopy () const |
Returns a new matrix in reverse order without gaps. | |
virtual CoinBigIndex | countBasis (ClpSimplex *model, const int *whichColumn, int numberRowBasic, int &numberColumnBasic) |
Returns number of elements in column part of basis. | |
virtual void | fillBasis (ClpSimplex *model, const int *whichColumn, int &numberColumnBasic, int *row, int *start, int *rowCount, int *columnCount, double *element) |
Fills in column part of basis. | |
virtual CoinBigIndex * | dubiousWeights (const ClpSimplex *model, int *inputWeights) const |
Given positive integer weights for each row fills in sum of weights for each column (and slack). | |
virtual void | rangeOfElements (double &smallestNegative, double &largestNegative, double &smallestPositive, double &largestPositive) |
Returns largest and smallest elements of both signs. | |
virtual void | unpack (const ClpSimplex *model, CoinIndexedVector *rowArray, int column) const |
Unpacks a column into an CoinIndexedvector. | |
virtual void | unpackPacked (ClpSimplex *model, CoinIndexedVector *rowArray, int column) const |
Unpacks a column into an CoinIndexedvector in packed foramt Note that model is NOT const. | |
virtual void | add (const ClpSimplex *model, CoinIndexedVector *rowArray, int column, double multiplier) const |
Adds multiple of a column into an CoinIndexedvector You can use quickAdd to add to vector. | |
virtual void | add (const ClpSimplex *model, double *array, int column, double multiplier) const |
Adds multiple of a column into an array. | |
virtual void | releasePackedMatrix () const |
Allow any parts of a created CoinMatrix to be deleted. | |
virtual void | setDimensions (int numrows, int numcols) |
Set the dimensions of the matrix. | |
void | checkValid (bool detail) const |
Just checks matrix valid - will say if dimensions not quite right if detail. | |
Matrix times vector methods | |
virtual void | times (double scalar, const double *x, double *y) const |
Return y + A * scalar *x in y . | |
virtual void | times (double scalar, const double *x, double *y, const double *rowScale, const double *columnScale) const |
And for scaling. | |
virtual void | transposeTimes (double scalar, const double *x, double *y) const |
Return y + x * scalar * A in y . | |
virtual void | transposeTimes (double scalar, const double *x, double *y, const double *rowScale, const double *columnScale) const |
And for scaling. | |
virtual void | transposeTimes (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const |
Return x * scalar * A + y in z . | |
virtual void | transposeTimesByRow (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const |
Return x * scalar * A + y in z . | |
virtual void | subsetTransposeTimes (const ClpSimplex *model, const CoinIndexedVector *x, const CoinIndexedVector *y, CoinIndexedVector *z) const |
Return x *A in z but just for indices in y. | |
virtual bool | canCombine (const ClpSimplex *model, const CoinIndexedVector *pi) const |
Returns true if can combine transposeTimes and subsetTransposeTimes and if it would be faster. | |
virtual void | transposeTimes2 (const ClpSimplex *model, const CoinIndexedVector *pi1, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *dj2, CoinIndexedVector *spare, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor) |
Updates two arrays for steepest. | |
virtual void | subsetTimes2 (const ClpSimplex *model, CoinIndexedVector *dj1, const CoinIndexedVector *pi2, CoinIndexedVector *dj2, double referenceIn, double devex, unsigned int *reference, double *weights, double scaleFactor) |
Updates second array for steepest and does devex weights. | |
Other | |
CoinBigIndex * | startPositive () const |
Return starts of +1s. | |
CoinBigIndex * | startNegative () const |
Return starts of -1s. | |
Constructors, destructor | |
ClpPlusMinusOneMatrix () | |
Default constructor. | |
virtual | ~ClpPlusMinusOneMatrix () |
Destructor. | |
Copy method | |
ClpPlusMinusOneMatrix (const ClpPlusMinusOneMatrix &) | |
The copy constructor. | |
ClpPlusMinusOneMatrix (const CoinPackedMatrix &) | |
The copy constructor from an CoinPlusMinusOneMatrix. | |
ClpPlusMinusOneMatrix (int numberRows, int numberColumns, bool columnOrdered, const int *indices, const CoinBigIndex *startPositive, const CoinBigIndex *startNegative) | |
Constructor from arrays. | |
ClpPlusMinusOneMatrix (const ClpPlusMinusOneMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns) | |
Subset constructor (without gaps). | |
ClpPlusMinusOneMatrix & | operator= (const ClpPlusMinusOneMatrix &) |
The copy constructor. | |
virtual ClpMatrixBase * | clone () const |
Clone. | |
virtual ClpMatrixBase * | subsetClone (int numberRows, const int *whichRows, int numberColumns, const int *whichColumns) const |
Subset clone (without gaps). | |
void | passInCopy (int numberRows, int numberColumns, bool columnOrdered, int *indices, CoinBigIndex *startPositive, CoinBigIndex *startNegative) |
pass in copy (object takes ownership) | |
virtual bool | canDoPartialPricing () const |
Says whether it can do partial pricing. | |
virtual void | partialPricing (ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted) |
Partial pricing. | |
Protected Attributes | |
Data members | |
The data members are protected to allow access for derived classes. | |
double * | elements_ |
For fake CoinPackedMatrix. | |
int * | lengths_ |
For fake CoinPackedMatrix. | |
CoinBigIndex * | startPositive_ |
Start of +1's for each. | |
CoinBigIndex * | startNegative_ |
Start of -1's for each. | |
int * | indices_ |
Data -1, then +1 rows in pairs (row==-1 if one entry). | |
int | numberRows_ |
Number of rows. | |
int | numberColumns_ |
Number of columns. | |
bool | columnOrdered_ |
True if column ordered. |
Definition at line 15 of file ClpPlusMinusOneMatrix.hpp.
|
Default constructor.
|
|
Destructor.
|
|
The copy constructor.
|
|
The copy constructor from an CoinPlusMinusOneMatrix. If not a valid matrix then getIndices will be NULL and startPositive[0] will have number of +1, startPositive[1] will have number of -1, startPositive[2] will have number of others, |
|
Constructor from arrays.
|
|
Subset constructor (without gaps). Duplicates are allowed and order is as given |
|
Return a complete CoinPackedMatrix.
Implements ClpMatrixBase. |
|
Whether the packed matrix is column major ordered or not.
Implements ClpMatrixBase. |
|
Number of entries in the packed matrix.
Implements ClpMatrixBase. |
|
Number of columns.
Implements ClpMatrixBase. Definition at line 27 of file ClpPlusMinusOneMatrix.hpp. |
|
Number of rows.
Implements ClpMatrixBase. Definition at line 29 of file ClpPlusMinusOneMatrix.hpp. |
|
A vector containing the elements in the packed matrix. Note that there might be gaps in this list, entries that do not belong to any major-dimension vector. To get the actual elements one should look at this vector together with vectorStarts and vectorLengths. Implements ClpMatrixBase. |
|
A vector containing the minor indices of the elements in the packed matrix. Note that there might be gaps in this list, entries that do not belong to any major-dimension vector. To get the actual elements one should look at this vector together with vectorStarts and vectorLengths. Implements ClpMatrixBase. Definition at line 41 of file ClpPlusMinusOneMatrix.hpp. |
|
Return a complete CoinPackedMatrix.
Definition at line 44 of file ClpPlusMinusOneMatrix.hpp. |
|
Return a complete CoinPackedMatrix.
Implements ClpMatrixBase. |
|
The lengths of the major-dimension vectors.
Implements ClpMatrixBase. |
|
Delete the columns whose indices are listed in
Implements ClpMatrixBase. |
|
Delete the rows whose indices are listed in
Implements ClpMatrixBase. |
|
Append Columns.
Reimplemented from ClpMatrixBase. |
|
Append Rows.
Reimplemented from ClpMatrixBase. |
|
Append a set of rows/columns to the end of the matrix. Returns number of errors i.e. if any of the new rows/columns contain an index that's larger than the number of columns-1/rows-1 (if numberOther>0) or duplicates If 0 then rows, 1 if columns Reimplemented from ClpMatrixBase. |
|
Returns a new matrix in reverse order without gaps.
Reimplemented from ClpMatrixBase. |
|
Returns number of elements in column part of basis.
Implements ClpMatrixBase. |
|
Fills in column part of basis.
Implements ClpMatrixBase. |
|
Given positive integer weights for each row fills in sum of weights for each column (and slack). Returns weights vector Reimplemented from ClpMatrixBase. |
|
Returns largest and smallest elements of both signs. Largest refers to largest absolute value. Reimplemented from ClpMatrixBase. |
|
Unpacks a column into an CoinIndexedvector.
Implements ClpMatrixBase. |
|
Unpacks a column into an CoinIndexedvector in packed foramt Note that model is NOT const. Bounds and objective could be modified if doing column generation (just for this variable) Implements ClpMatrixBase. |
|
Adds multiple of a column into an CoinIndexedvector You can use quickAdd to add to vector.
Implements ClpMatrixBase. |
|
Adds multiple of a column into an array.
Implements ClpMatrixBase. |
|
Allow any parts of a created CoinMatrix to be deleted.
Implements ClpMatrixBase. |
|
Set the dimensions of the matrix. In effect, append new empty columns/rows to the matrix. A negative number for either dimension means that that dimension doesn't change. Otherwise the new dimensions MUST be at least as large as the current ones otherwise an exception is thrown. Reimplemented from ClpMatrixBase. |
|
Just checks matrix valid - will say if dimensions not quite right if detail.
|
|
Return
Implements ClpMatrixBase. |
|
And for scaling.
Reimplemented from ClpMatrixBase. |
|
Return
Implements ClpMatrixBase. |
|
And for scaling.
|
|
Return Can use y as temporary array (will be empty at end) Note - If x packed mode - then z packed mode Squashes small elements and knows about ClpSimplex Implements ClpMatrixBase. |
|
Return Can use y as temporary array (will be empty at end) Note - If x packed mode - then z packed mode Squashes small elements and knows about ClpSimplex. This version uses row copy |
|
Return Note - z always packed mode Implements ClpMatrixBase. |
|
Returns true if can combine transposeTimes and subsetTransposeTimes and if it would be faster.
Reimplemented from ClpMatrixBase. |
|
Updates two arrays for steepest.
Reimplemented from ClpMatrixBase. |
|
Updates second array for steepest and does devex weights.
Reimplemented from ClpMatrixBase. |
|
Return starts of +1s.
Definition at line 194 of file ClpPlusMinusOneMatrix.hpp. |
|
Return starts of -1s.
Definition at line 197 of file ClpPlusMinusOneMatrix.hpp. |
|
The copy constructor.
|
|
Clone.
Implements ClpMatrixBase. |
|
Subset clone (without gaps). Duplicates are allowed and order is as given Reimplemented from ClpMatrixBase. |
|
pass in copy (object takes ownership)
|
|
Says whether it can do partial pricing.
Reimplemented from ClpMatrixBase. |
|
Partial pricing.
Reimplemented from ClpMatrixBase. |
|
For fake CoinPackedMatrix.
Definition at line 256 of file ClpPlusMinusOneMatrix.hpp. |
|
For fake CoinPackedMatrix.
Definition at line 257 of file ClpPlusMinusOneMatrix.hpp. |
|
Start of +1's for each.
Definition at line 259 of file ClpPlusMinusOneMatrix.hpp. |
|
Start of -1's for each.
Definition at line 261 of file ClpPlusMinusOneMatrix.hpp. |
|
Data -1, then +1 rows in pairs (row==-1 if one entry).
Definition at line 263 of file ClpPlusMinusOneMatrix.hpp. |
|
Number of rows.
Definition at line 265 of file ClpPlusMinusOneMatrix.hpp. |
|
Number of columns.
Definition at line 267 of file ClpPlusMinusOneMatrix.hpp. |
|
True if column ordered.
Definition at line 269 of file ClpPlusMinusOneMatrix.hpp. |