Go to the documentation of this file.
6 #ifndef ClpNetworkMatrix_H
7 #define ClpNetworkMatrix_H
9 #include "CoinPragma.hpp"
66 virtual void deleteCols(
const int numDel,
const int *indDel);
68 virtual void deleteRows(
const int numDel,
const int *indDel);
70 virtual void appendCols(
int number,
const CoinPackedVectorBase *
const *columns);
72 virtual void appendRows(
int number,
const CoinPackedVectorBase *
const *rows);
79 const CoinBigIndex *starts,
const int *index,
80 const double *element,
int numberOther = -1);
86 const int *whichColumn,
87 int &numberColumnBasic);
90 const int *whichColumn,
91 int &numberColumnBasic,
93 int *rowCount,
int *columnCount,
94 CoinFactorizationDouble *element);
103 virtual void rangeOfElements(
double &smallestNegative,
double &largestNegative,
104 double &smallestPositive,
double &largestPositive);
114 CoinIndexedVector *rowArray,
118 virtual void add(
const ClpSimplex *model, CoinIndexedVector *rowArray,
119 int column,
double multiplier)
const;
122 int column,
double multiplier)
const;
129 int &bestSequence,
int &numberWanted);
137 virtual void times(
double scalar,
138 const double *x,
double *y)
const;
140 virtual void times(
double scalar,
141 const double *x,
double *y,
142 const double *rowScale,
143 const double *columnScale)
const;
148 const double *x,
double *y)
const;
151 const double *x,
double *y,
152 const double *rowScale,
153 const double *columnScale,
double *spare = NULL)
const;
159 const CoinIndexedVector *x,
160 CoinIndexedVector *y,
161 CoinIndexedVector *z)
const;
166 const CoinIndexedVector *x,
167 const CoinIndexedVector *y,
168 CoinIndexedVector *z)
const;
204 int numberRows,
const int *whichRows,
205 int numberColumns,
const int *whichColumns);
209 int numberRows,
const int *whichRows,
210 int numberColumns,
const int *whichColumns)
const;
217 mutable CoinPackedMatrix *
matrix_;
This solves LPs using the simplex method.
ClpNetworkMatrix()
Default constructor.
virtual const int * getIndices() const
A vector containing the minor indices of the elements in the packed matrix.
virtual void fillBasis(ClpSimplex *model, const int *whichColumn, int &numberColumnBasic, int *row, int *start, int *rowCount, int *columnCount, CoinFactorizationDouble *element)
Fills in column part of basis.
int type() const
Returns type.
virtual void partialPricing(ClpSimplex *model, double start, double end, int &bestSequence, int &numberWanted)
Partial pricing.
ClpNetworkMatrix & operator=(const ClpNetworkMatrix &)
virtual const double * getElements() const
A vector containing the elements in the packed matrix.
virtual int getNumRows() const
Number of rows.
bool trueNetwork_
True if all entries have two elements.
virtual CoinPackedMatrix * getPackedMatrix() const
Return a complete CoinPackedMatrix.
virtual int countBasis(const int *whichColumn, int &numberColumnBasic)
Returns number of elements in column part of basis.
virtual void transposeTimes(double scalar, const double *x, double *y) const
Return y + x * scalar * A in y.
int * indices_
Data -1, then +1 rows in pairs (row==-1 if one entry)
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 bool isColOrdered() const
Whether the packed matrix is column major ordered or not.
virtual void deleteCols(const int numDel, const int *indDel)
Delete the columns whose indices are listed in indDel.
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.
bool trueNetwork() const
Return true if really network, false if has slacks.
virtual const CoinBigIndex * getVectorStarts() const
virtual void appendRows(int number, const CoinPackedVectorBase *const *rows)
Append Rows.
This implements a simple network matrix as derived from ClpMatrixBase.
virtual void appendCols(int number, const CoinPackedVectorBase *const *columns)
Append Columns.
Abstract base class for Clp Matrices.
virtual void times(double scalar, const double *x, double *y) const
Return y + A * scalar *x in y.
int numberRows_
Number of rows.
virtual ClpMatrixBase * clone() const
Clone.
virtual ClpMatrixBase * reverseOrderedCopy() const
Returns a new matrix in reverse order without gaps.
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 const int * getVectorLengths() const
The lengths of the major-dimension vectors.
virtual void deleteRows(const int numDel, const int *indDel)
Delete the rows whose indices are listed in indDel.
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 CoinBigIndex getNumElements() const
Number of entries in the packed matrix.
virtual ClpMatrixBase * subsetClone(int numberRows, const int *whichRows, int numberColumns, const int *whichColumns) const
Subset clone (without gaps).
int numberColumns_
Number of columns.
virtual ~ClpNetworkMatrix()
Destructor.
virtual void releasePackedMatrix() const
Allow any parts of a created CoinMatrix to be deleted.
virtual int getNumCols() const
Number of columns.
CoinPackedMatrix * matrix_
For fake CoinPackedMatrix.
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 bool canDoPartialPricing() const
Says whether it can do partial pricing.