Cgl 0.59.7

- 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 1665 2011-01-04 17:55:54Z lou $ */
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
10 #include "CoinPragma.hpp"
11
12 #include "ClpMatrixBase.hpp"
13
20 class ClpDummyMatrix : public ClpMatrixBase {
21
22 public:
25 virtual CoinPackedMatrix * getPackedMatrix() const;
28 virtual bool isColOrdered() const {
29 return true;
30 }
32 virtual CoinBigIndex getNumElements() const {
33 return numberElements_;
34 }
36 virtual int getNumCols() const {
37 return numberColumns_;
38 }
40 virtual int getNumRows() const {
41 return numberRows_;
42 }
43
48 virtual const double * getElements() const;
54 virtual const int * getIndices() const;
55
56 virtual const CoinBigIndex * getVectorStarts() const;
58 virtual const int * getVectorLengths() const;
59
61 virtual void deleteCols(const int numDel, const int * indDel);
63 virtual void deleteRows(const int numDel, const int * indDel);
65 virtual ClpMatrixBase * reverseOrderedCopy() const;
67 virtual CoinBigIndex countBasis(const int * whichColumn,
68 int & numberColumnBasic);
70 virtual void fillBasis(ClpSimplex * model,
71 const int * whichColumn,
72 int & numberColumnBasic,
73 int * row, int * start,
74 int * rowCount, int * columnCount,
75 CoinFactorizationDouble * element);
78 virtual void unpack(const ClpSimplex * model, CoinIndexedVector * rowArray,
79 int column) const ;
84 virtual void unpackPacked(ClpSimplex * model,
85 CoinIndexedVector * rowArray,
86 int column) const;
89 virtual void add(const ClpSimplex * model, CoinIndexedVector * rowArray,
90 int column, double multiplier) const ;
92 virtual void add(const ClpSimplex * model, double * array,
93 int column, double multiplier) const;
96 virtual void releasePackedMatrix() const {}
98
104 virtual void times(double scalar,
105 const double * x, double * y) const;
107 virtual void times(double scalar,
108 const double * x, double * y,
109 const double * rowScale,
110 const double * columnScale) const;
114 virtual void transposeTimes(double scalar,
115 const double * x, double * y) const;
117 virtual void transposeTimes(double scalar,
118 const double * x, double * y,
119 const double * rowScale,
120 const double * columnScale) const;
121
122 using ClpMatrixBase::transposeTimes ;
126 virtual void transposeTimes(const ClpSimplex * model, double scalar,
127 const CoinIndexedVector * x,
128 CoinIndexedVector * y,
129 CoinIndexedVector * z) const;
134 virtual void subsetTransposeTimes(const ClpSimplex * model,
135 const CoinIndexedVector * x,
136 const CoinIndexedVector * y,
137 CoinIndexedVector * z) const;
139
142
143
144
148 ClpDummyMatrix();
150 ClpDummyMatrix(int numberColumns, int numberRows,
151 int numberElements);
153 virtual ~ClpDummyMatrix();
155
159 ClpDummyMatrix(const ClpDummyMatrix&);
161 ClpDummyMatrix(const CoinPackedMatrix&);
162
163 ClpDummyMatrix& operator=(const ClpDummyMatrix&);
165 virtual ClpMatrixBase * clone() const ;
167
168
169 protected:
173 int numberRows_;
176 int numberColumns_;
178 int numberElements_;
179
181 };
182
183 #endif
ClpDummyMatrix
This implements a dummy matrix as derived from ClpMatrixBase.
Definition: ClpDummyMatrix.hpp:20
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::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:32
ClpDummyMatrix::~ClpDummyMatrix
virtual ~ClpDummyMatrix()
Destructor.
ClpDummyMatrix::getNumRows
virtual int getNumRows() const
Number of rows.
Definition: ClpDummyMatrix.hpp:40
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:96
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:70
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
CoinPragma.hpp
ClpDummyMatrix::ClpDummyMatrix
ClpDummyMatrix()
Default constructor.
ClpDummyMatrix::countBasis
virtual CoinBigIndex countBasis(const int *whichColumn, int &numberColumnBasic)
Returns number of elements in column part of basis.
ClpDummyMatrix::subsetTransposeTimes
virtual void subsetTransposeTimes(const ClpSimplex *model, const CoinIndexedVector *x, const CoinIndexedVector *y, CoinIndexedVector *z) const
Return &lt;code&gt;x *A&lt;/code&gt; in &lt;code&gt;z&lt;/code&gt; 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:28
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:105
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.