Clp 1.17.6

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ClpDummyMatrix.hpp
Go to the documentation of this file.
1 /* $Id: ClpDummyMatrix.hpp 2385 2019-01-06 19:43:06Z unxusr $ */
2 // Copyright (C) 2003, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5
6 #ifndef ClpDummyMatrix_H
7 #define ClpDummyMatrix_H
8
9 #include "CoinPragma.hpp"
10
11 #include "ClpMatrixBase.hpp"
12
18 class ClpDummyMatrix : public ClpMatrixBase {
19
20 public:
23 virtual CoinPackedMatrix *getPackedMatrix() const;
26 virtual bool isColOrdered() const
27 {
28 return true;
29 }
31 virtual CoinBigIndex getNumElements() const
32 {
33 return numberElements_;
34 }
36 virtual int getNumCols() const
37 {
38 return numberColumns_;
39 }
41 virtual int getNumRows() const
42 {
43 return numberRows_;
44 }
45
50 virtual const double *getElements() const;
56 virtual const int *getIndices() const;
57
58 virtual const CoinBigIndex *getVectorStarts() const;
60 virtual const int *getVectorLengths() const;
61
63 virtual void deleteCols(const int numDel, const int *indDel);
65 virtual void deleteRows(const int numDel, const int *indDel);
67 virtual ClpMatrixBase *reverseOrderedCopy() const;
69 virtual int countBasis(const int *whichColumn,
70 int &numberColumnBasic);
72 virtual void fillBasis(ClpSimplex *model,
73 const int *whichColumn,
74 int &numberColumnBasic,
75 int *row, int *start,
76 int *rowCount, int *columnCount,
77 CoinFactorizationDouble *element);
80 virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray,
81 int column) const;
86 virtual void unpackPacked(ClpSimplex *model,
87 CoinIndexedVector *rowArray,
88 int column) const;
91 virtual void add(const ClpSimplex *model, CoinIndexedVector *rowArray,
92 int column, double multiplier) const;
94 virtual void add(const ClpSimplex *model, double *array,
95 int column, double multiplier) const;
98 virtual void releasePackedMatrix() const {}
100
106 virtual void times(double scalar,
107 const double *x, double *y) const;
109 virtual void times(double scalar,
110 const double *x, double *y,
111 const double *rowScale,
112 const double *columnScale) const;
116 virtual void transposeTimes(double scalar,
117 const double *x, double *y) const;
119 virtual void transposeTimes(double scalar,
120 const double *x, double *y,
121 const double *rowScale,
122 const double *columnScale) const;
123
124 using ClpMatrixBase::transposeTimes;
128 virtual void transposeTimes(const ClpSimplex *model, double scalar,
129 const CoinIndexedVector *x,
130 CoinIndexedVector *y,
131 CoinIndexedVector *z) const;
136 virtual void subsetTransposeTimes(const ClpSimplex *model,
137 const CoinIndexedVector *x,
138 const CoinIndexedVector *y,
139 CoinIndexedVector *z) const;
141
144
145
149 ClpDummyMatrix();
151 ClpDummyMatrix(int numberColumns, int numberRows,
152 int numberElements);
154 virtual ~ClpDummyMatrix();
156
160 ClpDummyMatrix(const ClpDummyMatrix &);
162 ClpDummyMatrix(const CoinPackedMatrix &);
163
164 ClpDummyMatrix &operator=(const ClpDummyMatrix &);
166 virtual ClpMatrixBase *clone() const;
168
169 protected:
173 int numberRows_;
176 int numberColumns_;
178 int numberElements_;
179
181 };
182
183 #endif
184
185 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
186 */
ClpDummyMatrix
This implements a dummy matrix as derived from ClpMatrixBase.
Definition: ClpDummyMatrix.hpp:18
ClpDummyMatrix::unpackPacked
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...
ClpDummyMatrix::reverseOrderedCopy
virtual ClpMatrixBase * reverseOrderedCopy() const
Returns a new matrix in reverse order without gaps.
ClpDummyMatrix::countBasis
virtual int countBasis(const int *whichColumn, int &numberColumnBasic)
Returns number of elements in column part of basis.
ClpDummyMatrix::getElements
virtual const double * getElements() const
A vector containing the elements in the packed matrix.
ClpDummyMatrix::getPackedMatrix
virtual CoinPackedMatrix * getPackedMatrix() const
Return a complete CoinPackedMatrix.
ClpDummyMatrix::times
virtual void times(double scalar, const double *x, double *y) const
Return y + A * scalar *x in y.
ClpMatrixBase
Abstract base class for Clp Matrices.
Definition: ClpMatrixBase.hpp:38
ClpDummyMatrix::transposeTimes
virtual void transposeTimes(double scalar, const double *x, double *y) const
Return y + x * scalar * A in y.
ClpDummyMatrix::add
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...
ClpDummyMatrix::getNumElements
virtual CoinBigIndex getNumElements() const
Number of entries in the packed matrix.
Definition: ClpDummyMatrix.hpp:31
ClpDummyMatrix::~ClpDummyMatrix
virtual ~ClpDummyMatrix()
Destructor.
ClpDummyMatrix::getNumRows
virtual int getNumRows() const
Number of rows.
Definition: ClpDummyMatrix.hpp:41
ClpMatrixBase.hpp
ClpDummyMatrix::releasePackedMatrix
virtual void releasePackedMatrix() const
Allow any parts of a created CoinMatrix to be deleted Allow any parts of a created CoinPackedMatrix t...
Definition: ClpDummyMatrix.hpp:98
ClpDummyMatrix::getIndices
virtual const int * getIndices() const
A vector containing the minor indices of the elements in the packed matrix.
ClpDummyMatrix::numberColumns_
int numberColumns_
Number of columns.
Definition: ClpDummyMatrix.hpp:176
ClpMatrixBase::transposeTimes
virtual void transposeTimes(double scalar, const double *COIN_RESTRICT x, double *COIN_RESTRICT y) const =0
Return y + x * scalar * A in y.
ClpDummyMatrix::operator=
ClpDummyMatrix & operator=(const ClpDummyMatrix &)
ClpDummyMatrix::fillBasis
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.
ClpDummyMatrix::deleteRows
virtual void deleteRows(const int numDel, const int *indDel)
Delete the rows whose indices are listed in indDel.
ClpDummyMatrix::numberElements_
int numberElements_
Number of elements.
Definition: ClpDummyMatrix.hpp:178
CoinFactorizationDouble
double CoinFactorizationDouble
Definition: CoinTypes.hpp:57
ClpDummyMatrix::clone
virtual ClpMatrixBase * clone() const
Clone.
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:106
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
CoinPragma.hpp
ClpDummyMatrix::ClpDummyMatrix
ClpDummyMatrix()
Default constructor.
ClpDummyMatrix::subsetTransposeTimes
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.
ClpDummyMatrix::isColOrdered
virtual bool isColOrdered() const
Whether the packed matrix is column major ordered or not.
Definition: ClpDummyMatrix.hpp:26
ClpDummyMatrix::getNumCols
virtual int getNumCols() const
Number of columns.
Definition: ClpDummyMatrix.hpp:36
CoinPackedMatrix
Sparse Matrix Base Class.
Definition: CoinPackedMatrix.hpp:79
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:136
ClpDummyMatrix::numberRows_
int numberRows_
Number of rows.
Definition: ClpDummyMatrix.hpp:174
ClpDummyMatrix::getVectorLengths
virtual const int * getVectorLengths() const
The lengths of the major-dimension vectors.
ClpDummyMatrix::getVectorStarts
virtual const CoinBigIndex * getVectorStarts() const
ClpDummyMatrix::unpack
virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray, int column) const
Unpacks a column into an CoinIndexedvector.
ClpDummyMatrix::deleteCols
virtual void deleteCols(const int numDel, const int *indDel)
Delete the columns whose indices are listed in indDel.