#include <ClpPackedMatrix.hpp>
Inheritance diagram for ClpPackedMatrix:
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. | |
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 void | replaceVector (const int index, const int numReplace, const double *newElements) |
Replace the elements of a vector. | |
virtual ClpMatrixBase * | reverseOrderedCopy () const |
Returns a new matrix in reverse order without gaps. | |
virtual CoinBigIndex | fillBasis (ClpSimplex *model, const int *whichColumn, int numberRowBasic, int &numberColumnBasic, int *row, int *column, double *element) |
If element NULL returns number of elements in column part of basis, If not NULL fills in as well. | |
virtual int | scale (ClpModel *model) const |
Creates scales for column copy (rowCopy in model may be modified) returns non-zero if no scaling done. | |
virtual void | scaleRowCopy (ClpModel *model) const |
Scales rowCopy if column copy scaled Only called if scales already exist. | |
virtual ClpMatrixBase * | scaledColumnCopy (ClpModel *model) const |
Realy really scales column copy Only called if scales already exist. | |
virtual bool | allElementsInRange (ClpModel *model, double smallest, double largest) |
Checks if all elements are in valid range. | |
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 CoinPackedMatrix to be deleted. | |
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 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. | |
virtual int | refresh (ClpSimplex *model) |
makes sure active columns correct | |
virtual void | reallyScale (const double *rowScale, const double *columnScale) |
Return a complete CoinPackedMatrix. | |
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 . | |
void | transposeTimesByColumn (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const |
Return x * scalar * A + y in z . | |
void | transposeTimesByColumn (const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *z) const |
Return x * scalar * A in | |
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. | |
void | useEffectiveRhs (ClpSimplex *model) |
Sets up an effective RHS. | |
Other | |
CoinPackedMatrix * | matrix () const |
Returns CoinPackedMatrix (non const). | |
void | setMatrixNull () |
Just sets matrix_ to NULL so it can be used elsewhere. | |
Constructors, destructor | |
ClpPackedMatrix () | |
Default constructor. | |
virtual | ~ClpPackedMatrix () |
Destructor. | |
Copy method | |
ClpPackedMatrix (const ClpPackedMatrix &) | |
The copy constructor. | |
ClpPackedMatrix (const CoinPackedMatrix &) | |
The copy constructor from an CoinPackedMatrix. | |
ClpPackedMatrix (const ClpPackedMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns) | |
Subset constructor (without gaps). | |
ClpPackedMatrix (const CoinPackedMatrix &wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns) | |
The copy constructor. | |
ClpPackedMatrix (CoinPackedMatrix *matrix) | |
This takes over ownership (for space reasons). | |
ClpPackedMatrix & | operator= (const ClpPackedMatrix &) |
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). | |
Protected Attributes | |
Data members | |
The data members are protected to allow access for derived classes. | |
CoinPackedMatrix * | matrix_ |
Data. | |
int | numberActiveColumns_ |
number of active columns (normally same as number of columns) | |
bool | zeroElements_ |
Zero element flag - set true if any zero elements. | |
bool | hasGaps_ |
Gaps flag - set true if column start and length don't say contiguous. |
It adds a few methods that know about model as well as matrix
For details see CoinPackedMatrix
Definition at line 17 of file ClpPackedMatrix.hpp.
|
Default constructor.
|
|
Destructor.
|
|
The copy constructor.
|
|
The copy constructor from an CoinPackedMatrix.
|
|
Subset constructor (without gaps). Duplicates are allowed and order is as given |
|
The copy constructor.
|
|
This takes over ownership (for space reasons).
|
|
Return a complete CoinPackedMatrix.
Implements ClpMatrixBase. Definition at line 23 of file ClpPackedMatrix.hpp. References matrix_. |
|
Whether the packed matrix is column major ordered or not.
Implements ClpMatrixBase. Definition at line 25 of file ClpPackedMatrix.hpp. References matrix_. |
|
Number of entries in the packed matrix.
Implements ClpMatrixBase. Definition at line 27 of file ClpPackedMatrix.hpp. References matrix_. |
|
Number of columns.
Implements ClpMatrixBase. Definition at line 30 of file ClpPackedMatrix.hpp. References matrix_. |
|
Number of rows.
Implements ClpMatrixBase. Definition at line 32 of file ClpPackedMatrix.hpp. References matrix_. |
|
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. Definition at line 38 of file ClpPackedMatrix.hpp. References matrix_. |
|
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 45 of file ClpPackedMatrix.hpp. References matrix_. |
|
Return a complete CoinPackedMatrix.
Implements ClpMatrixBase. Definition at line 48 of file ClpPackedMatrix.hpp. References matrix_. |
|
The lengths of the major-dimension vectors.
Implements ClpMatrixBase. Definition at line 51 of file ClpPackedMatrix.hpp. References matrix_. |
|
Delete the columns whose indices are listed in
Implements ClpMatrixBase. Definition at line 55 of file ClpPackedMatrix.hpp. References matrix_, and numberActiveColumns_. |
|
Delete the rows whose indices are listed in
Implements ClpMatrixBase. Definition at line 58 of file ClpPackedMatrix.hpp. References matrix_, and numberActiveColumns_. |
|
Append Columns.
Reimplemented from ClpMatrixBase. Definition at line 61 of file ClpPackedMatrix.hpp. References matrix_, and numberActiveColumns_. |
|
Append Rows.
Reimplemented from ClpMatrixBase. Definition at line 64 of file ClpPackedMatrix.hpp. References matrix_, and numberActiveColumns_. |
|
Replace the elements of a vector. The indices remain the same. This is only needed if scaling and a row copy is used. At most the number specified will be replaced. The index is between 0 and major dimension of matrix Definition at line 70 of file ClpPackedMatrix.hpp. References matrix_. |
|
Returns a new matrix in reverse order without gaps.
Reimplemented from ClpMatrixBase. Reimplemented in ClpGubMatrix. |
|
If element NULL returns number of elements in column part of basis, If not NULL fills in as well.
Implements ClpMatrixBase. Reimplemented in ClpGubMatrix. |
|
Creates scales for column copy (rowCopy in model may be modified) returns non-zero if no scaling done.
Reimplemented from ClpMatrixBase. |
|
Scales rowCopy if column copy scaled Only called if scales already exist.
Reimplemented from ClpMatrixBase. |
|
Realy really scales column copy Only called if scales already exist. Up to user ro delete Reimplemented from ClpMatrixBase. |
|
Checks if all elements are in valid range. Can just return true if you are not paranoid. For Clp I will probably expect no zeros. Code can modify matrix to get rid of small elements. 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. Reimplemented in ClpGubMatrix. |
|
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. Reimplemented in ClpGubMatrix. |
|
Adds multiple of a column into an CoinIndexedvector You can use quickAdd to add to vector.
Implements ClpMatrixBase. Reimplemented in ClpGubMatrix. |
|
Adds multiple of a column into an array.
Implements ClpMatrixBase. Reimplemented in ClpGubMatrix. |
|
Allow any parts of a created CoinPackedMatrix to be deleted.
Implements ClpMatrixBase. Definition at line 125 of file ClpPackedMatrix.hpp. |
|
Given positive integer weights for each row fills in sum of weights for each column (and slack). Returns weights vector Reimplemented from ClpMatrixBase. |
|
Says whether it can do partial pricing.
Reimplemented from ClpMatrixBase. |
|
Partial pricing.
Reimplemented from ClpMatrixBase. Reimplemented in ClpDynamicExampleMatrix, ClpDynamicMatrix, ClpGubDynamicMatrix, and ClpGubMatrix. |
|
makes sure active columns correct
Reimplemented from ClpMatrixBase. Reimplemented in ClpDynamicMatrix. |
|
Return a complete CoinPackedMatrix.
Reimplemented from ClpMatrixBase. |
|
Return
Implements ClpMatrixBase. Reimplemented in ClpDynamicMatrix, and ClpGubDynamicMatrix. |
|
And for scaling.
Reimplemented from ClpMatrixBase. |
|
Return
Implements ClpMatrixBase. |
|
And for scaling.
Reimplemented from 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 Implements ClpMatrixBase. Reimplemented in ClpGubMatrix. |
|
Return Note - If x packed mode - then z packed mode This does by column and knows no gaps Squashes small elements and knows about ClpSimplex |
|
Return Note - this version when x packed mode and so will be z This does by column and knows no gaps and knows y empty Squashes small elements and knows about ClpSimplex |
|
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 Reimplemented in ClpGubMatrix. |
|
Return Note - z always packed mode Squashes small elements and knows about ClpSimplex Implements ClpMatrixBase. Reimplemented in ClpGubMatrix. |
|
Sets up an effective RHS.
Reimplemented from ClpMatrixBase. |
|
Returns CoinPackedMatrix (non const).
Definition at line 211 of file ClpPackedMatrix.hpp. References matrix_. |
|
Just sets matrix_ to NULL so it can be used elsewhere. used in GUB Definition at line 215 of file ClpPackedMatrix.hpp. References matrix_. |
|
The copy constructor.
|
|
Clone.
Implements ClpMatrixBase. Reimplemented in ClpDynamicExampleMatrix, ClpDynamicMatrix, ClpGubDynamicMatrix, and ClpGubMatrix. |
|
Subset clone (without gaps). Duplicates are allowed and order is as given Reimplemented from ClpMatrixBase. Reimplemented in ClpGubMatrix. |
|
Data.
Definition at line 262 of file ClpPackedMatrix.hpp. Referenced by appendCols(), appendRows(), deleteCols(), deleteRows(), getElements(), getIndices(), getNumCols(), getNumElements(), getNumRows(), getPackedMatrix(), getVectorLengths(), getVectorStarts(), isColOrdered(), matrix(), replaceVector(), and setMatrixNull(). |
|
number of active columns (normally same as number of columns)
Definition at line 264 of file ClpPackedMatrix.hpp. Referenced by appendCols(), appendRows(), deleteCols(), and deleteRows(). |
|
Zero element flag - set true if any zero elements.
Definition at line 266 of file ClpPackedMatrix.hpp. |
|
Gaps flag - set true if column start and length don't say contiguous.
Definition at line 268 of file ClpPackedMatrix.hpp. |