#include <ClpNetworkMatrix.hpp>
Inheritance diagram for ClpNetworkMatrix:


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 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 format 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 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. | |
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 | subsetTransposeTimes (const ClpSimplex *model, const CoinIndexedVector *x, const CoinIndexedVector *y, CoinIndexedVector *z) const |
Return x *A in z but just for indices in y. | |
Other | |
| bool | trueNetwork () const |
| Return true if really network, false if has slacks. | |
Constructors, destructor | |
| ClpNetworkMatrix () | |
| Default constructor. | |
| ClpNetworkMatrix (int numberColumns, const int *head, const int *tail) | |
| Constructor from two arrays. | |
| virtual | ~ClpNetworkMatrix () |
| Destructor. | |
Copy method | |
| ClpNetworkMatrix (const ClpNetworkMatrix &) | |
| The copy constructor. | |
| ClpNetworkMatrix (const CoinPackedMatrix &) | |
| The copy constructor from an CoinNetworkMatrix. | |
| ClpNetworkMatrix & | operator= (const ClpNetworkMatrix &) |
| The copy constructor. | |
| virtual ClpMatrixBase * | clone () const |
| Clone. | |
Protected Attributes | |
Data members | |
The data members are protected to allow access for derived classes. | |
| double * | elements_ |
| For fake CoinPackedMatrix. | |
| CoinBigIndex * | starts_ |
| For fake CoinPackedMatrix. | |
| int * | lengths_ |
| For fake CoinPackedMatrix. | |
| 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 | trueNetwork_ |
| True if all entries have two elements. | |
If you want more sophisticated version then you could inherit from this. Also you might want to allow networks with gain
Definition at line 16 of file ClpNetworkMatrix.hpp.
| ClpNetworkMatrix::ClpNetworkMatrix | ( | ) |
Default constructor.
| ClpNetworkMatrix::ClpNetworkMatrix | ( | int | numberColumns, | |
| const int * | head, | |||
| const int * | tail | |||
| ) |
Constructor from two arrays.
| virtual ClpNetworkMatrix::~ClpNetworkMatrix | ( | ) | [virtual] |
Destructor.
| ClpNetworkMatrix::ClpNetworkMatrix | ( | const ClpNetworkMatrix & | ) |
The copy constructor.
| ClpNetworkMatrix::ClpNetworkMatrix | ( | const CoinPackedMatrix & | ) |
The copy constructor from an CoinNetworkMatrix.
| virtual CoinPackedMatrix* ClpNetworkMatrix::getPackedMatrix | ( | ) | const [virtual] |
| virtual bool ClpNetworkMatrix::isColOrdered | ( | ) | const [inline, virtual] |
Whether the packed matrix is column major ordered or not.
Implements ClpMatrixBase.
Definition at line 24 of file ClpNetworkMatrix.hpp.
| virtual CoinBigIndex ClpNetworkMatrix::getNumElements | ( | ) | const [inline, virtual] |
Number of entries in the packed matrix.
Implements ClpMatrixBase.
Definition at line 26 of file ClpNetworkMatrix.hpp.
References numberColumns_.
| virtual int ClpNetworkMatrix::getNumCols | ( | ) | const [inline, virtual] |
Number of columns.
Implements ClpMatrixBase.
Definition at line 29 of file ClpNetworkMatrix.hpp.
References numberColumns_.
| virtual int ClpNetworkMatrix::getNumRows | ( | ) | const [inline, virtual] |
Number of rows.
Implements ClpMatrixBase.
Definition at line 31 of file ClpNetworkMatrix.hpp.
References numberRows_.
| virtual const double* ClpNetworkMatrix::getElements | ( | ) | const [virtual] |
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.
| virtual const int* ClpNetworkMatrix::getIndices | ( | ) | const [inline, virtual] |
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 43 of file ClpNetworkMatrix.hpp.
References indices_.
| virtual const CoinBigIndex* ClpNetworkMatrix::getVectorStarts | ( | ) | const [virtual] |
| virtual const int* ClpNetworkMatrix::getVectorLengths | ( | ) | const [virtual] |
| virtual void ClpNetworkMatrix::deleteCols | ( | const int | numDel, | |
| const int * | indDel | |||
| ) | [virtual] |
| virtual void ClpNetworkMatrix::deleteRows | ( | const int | numDel, | |
| const int * | indDel | |||
| ) | [virtual] |
| virtual ClpMatrixBase* ClpNetworkMatrix::reverseOrderedCopy | ( | ) | const [virtual] |
| virtual CoinBigIndex ClpNetworkMatrix::countBasis | ( | ClpSimplex * | model, | |
| const int * | whichColumn, | |||
| int | numberRowBasic, | |||
| int & | numberColumnBasic | |||
| ) | [virtual] |
| virtual void ClpNetworkMatrix::fillBasis | ( | ClpSimplex * | model, | |
| const int * | whichColumn, | |||
| int & | numberColumnBasic, | |||
| int * | row, | |||
| int * | start, | |||
| int * | rowCount, | |||
| int * | columnCount, | |||
| double * | element | |||
| ) | [virtual] |
| virtual CoinBigIndex* ClpNetworkMatrix::dubiousWeights | ( | const ClpSimplex * | model, | |
| int * | inputWeights | |||
| ) | const [virtual] |
Given positive integer weights for each row fills in sum of weights for each column (and slack).
Returns weights vector
Reimplemented from ClpMatrixBase.
| virtual void ClpNetworkMatrix::rangeOfElements | ( | double & | smallestNegative, | |
| double & | largestNegative, | |||
| double & | smallestPositive, | |||
| double & | largestPositive | |||
| ) | [virtual] |
Returns largest and smallest elements of both signs.
Largest refers to largest absolute value.
Reimplemented from ClpMatrixBase.
| virtual void ClpNetworkMatrix::unpack | ( | const ClpSimplex * | model, | |
| CoinIndexedVector * | rowArray, | |||
| int | column | |||
| ) | const [virtual] |
| virtual void ClpNetworkMatrix::unpackPacked | ( | ClpSimplex * | model, | |
| CoinIndexedVector * | rowArray, | |||
| int | column | |||
| ) | const [virtual] |
Unpacks a column into an CoinIndexedvector in packed format Note that model is NOT const.
Bounds and objective could be modified if doing column generation (just for this variable)
Implements ClpMatrixBase.
| virtual void ClpNetworkMatrix::add | ( | const ClpSimplex * | model, | |
| CoinIndexedVector * | rowArray, | |||
| int | column, | |||
| double | multiplier | |||
| ) | const [virtual] |
Adds multiple of a column into an CoinIndexedvector You can use quickAdd to add to vector.
Implements ClpMatrixBase.
| virtual void ClpNetworkMatrix::add | ( | const ClpSimplex * | model, | |
| double * | array, | |||
| int | column, | |||
| double | multiplier | |||
| ) | const [virtual] |
| virtual void ClpNetworkMatrix::releasePackedMatrix | ( | ) | const [virtual] |
| virtual bool ClpNetworkMatrix::canDoPartialPricing | ( | ) | const [virtual] |
| virtual void ClpNetworkMatrix::partialPricing | ( | ClpSimplex * | model, | |
| double | start, | |||
| double | end, | |||
| int & | bestSequence, | |||
| int & | numberWanted | |||
| ) | [virtual] |
| virtual void ClpNetworkMatrix::times | ( | double | scalar, | |
| const double * | x, | |||
| double * | y | |||
| ) | const [virtual] |
Return y + A * scalar *x in y.
x must be of size numColumns()
y must be of size numRows()
Implements ClpMatrixBase.
| virtual void ClpNetworkMatrix::times | ( | double | scalar, | |
| const double * | x, | |||
| double * | y, | |||
| const double * | rowScale, | |||
| const double * | columnScale | |||
| ) | const [virtual] |
| virtual void ClpNetworkMatrix::transposeTimes | ( | double | scalar, | |
| const double * | x, | |||
| double * | y | |||
| ) | const [virtual] |
Return y + x * scalar * A in y.
x must be of size numRows()
y must be of size numColumns()
Implements ClpMatrixBase.
| virtual void ClpNetworkMatrix::transposeTimes | ( | double | scalar, | |
| const double * | x, | |||
| double * | y, | |||
| const double * | rowScale, | |||
| const double * | columnScale | |||
| ) | const [virtual] |
And for scaling.
| virtual void ClpNetworkMatrix::transposeTimes | ( | const ClpSimplex * | model, | |
| double | scalar, | |||
| const CoinIndexedVector * | x, | |||
| CoinIndexedVector * | y, | |||
| CoinIndexedVector * | z | |||
| ) | const [virtual] |
Return x * scalar * A + y in z.
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.
| virtual void ClpNetworkMatrix::subsetTransposeTimes | ( | const ClpSimplex * | model, | |
| const CoinIndexedVector * | x, | |||
| const CoinIndexedVector * | y, | |||
| CoinIndexedVector * | z | |||
| ) | const [virtual] |
| bool ClpNetworkMatrix::trueNetwork | ( | ) | const [inline] |
Return true if really network, false if has slacks.
Definition at line 147 of file ClpNetworkMatrix.hpp.
References trueNetwork_.
| ClpNetworkMatrix& ClpNetworkMatrix::operator= | ( | const ClpNetworkMatrix & | ) |
The copy constructor.
| virtual ClpMatrixBase* ClpNetworkMatrix::clone | ( | ) | const [virtual] |
double* ClpNetworkMatrix::elements_ [mutable, protected] |
CoinBigIndex* ClpNetworkMatrix::starts_ [mutable, protected] |
int* ClpNetworkMatrix::lengths_ [mutable, protected] |
int* ClpNetworkMatrix::indices_ [protected] |
Data -1, then +1 rows in pairs (row==-1 if one entry).
Definition at line 185 of file ClpNetworkMatrix.hpp.
Referenced by getIndices().
int ClpNetworkMatrix::numberRows_ [protected] |
int ClpNetworkMatrix::numberColumns_ [protected] |
Number of columns.
Definition at line 189 of file ClpNetworkMatrix.hpp.
Referenced by getNumCols(), and getNumElements().
bool ClpNetworkMatrix::trueNetwork_ [protected] |
True if all entries have two elements.
Definition at line 191 of file ClpNetworkMatrix.hpp.
Referenced by trueNetwork().
1.4.7