Loading...
Searching...
No Matches
ClpDummyMatrix.hpp
Go to the documentation of this file.
/* $Id$ */
// Copyright (C) 2003, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#ifndef ClpDummyMatrix_H
#define ClpDummyMatrix_H
#include "CoinPragma.hpp"
#include "ClpMatrixBase.hpp"
class ClpDummyMatrix : public ClpMatrixBase {
public:
virtual CoinPackedMatrix *getPackedMatrix() const;
virtual bool isColOrdered() const
{
return true;
}
virtual CoinBigIndex getNumElements() const
{
return numberElements_;
}
virtual int getNumCols() const
{
return numberColumns_;
}
virtual int getNumRows() const
{
return numberRows_;
}
virtual const double *getElements() const;
virtual const int *getIndices() const;
virtual const CoinBigIndex *getVectorStarts() const;
virtual const int *getVectorLengths() const;
virtual void deleteCols(const int numDel, const int *indDel);
virtual void deleteRows(const int numDel, const int *indDel);
virtual ClpMatrixBase *reverseOrderedCopy() const;
virtual int countBasis(const int *whichColumn,
int &numberColumnBasic);
virtual void fillBasis(ClpSimplex *model,
const int *whichColumn,
int &numberColumnBasic,
int *row, int *start,
int *rowCount, int *columnCount,
CoinFactorizationDouble *element);
virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray,
int column) const;
virtual void unpackPacked(ClpSimplex *model,
CoinIndexedVector *rowArray,
int column) const;
virtual void add(const ClpSimplex *model, CoinIndexedVector *rowArray,
int column, double multiplier) const;
virtual void add(const ClpSimplex *model, double *array,
int column, double multiplier) const;
virtual void releasePackedMatrix() const {}
virtual void times(double scalar,
const double *x, double *y) const;
virtual void times(double scalar,
const double *x, double *y,
const double *rowScale,
const double *columnScale) const;
virtual void transposeTimes(double scalar,
const double *x, double *y) const;
virtual void transposeTimes(double scalar,
const double *x, double *y,
const double *rowScale,
const double *columnScale) const;
using ClpMatrixBase::transposeTimes;
virtual void transposeTimes(const ClpSimplex *model, double scalar,
const CoinIndexedVector *x,
CoinIndexedVector *y,
CoinIndexedVector *z) const;
virtual void subsetTransposeTimes(const ClpSimplex *model,
const CoinIndexedVector *x,
const CoinIndexedVector *y,
CoinIndexedVector *z) const;
ClpDummyMatrix();
ClpDummyMatrix(int numberColumns, int numberRows,
int numberElements);
virtual ~ClpDummyMatrix();
ClpDummyMatrix(const ClpDummyMatrix &);
ClpDummyMatrix(const CoinPackedMatrix &);
ClpDummyMatrix &operator=(const ClpDummyMatrix &);
virtual ClpMatrixBase *clone() const;
protected:
int numberRows_;
int numberColumns_;
int numberElements_;
};
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
ClpMatrixBase.hpp
ClpDummyMatrix::transposeTimes
virtual void transposeTimes(const ClpSimplex *model, double scalar, const CoinIndexedVector *x, CoinIndexedVector *y, CoinIndexedVector *z) const
Return x * scalar * A + y in z.
ClpDummyMatrix::numberRows_
int numberRows_
Number of rows.
Definition ClpDummyMatrix.hpp:174
ClpDummyMatrix::add
virtual void add(const ClpSimplex *model, double *array, int column, double multiplier) const
Adds multiple of a column into an array.
ClpDummyMatrix::isColOrdered
virtual bool isColOrdered() const
Whether the packed matrix is column major ordered or not.
Definition ClpDummyMatrix.hpp:26
ClpDummyMatrix::unpack
virtual void unpack(const ClpSimplex *model, CoinIndexedVector *rowArray, int column) const
Unpacks a column into an CoinIndexedvector.
ClpDummyMatrix::clone
virtual ClpMatrixBase * clone() const
Clone.
ClpDummyMatrix::ClpDummyMatrix
ClpDummyMatrix(int numberColumns, int numberRows, int numberElements)
Constructor with data.
ClpDummyMatrix::numberElements_
int numberElements_
Number of elements.
Definition ClpDummyMatrix.hpp:178
ClpDummyMatrix::getNumRows
virtual int getNumRows() const
Number of rows.
Definition ClpDummyMatrix.hpp:41
ClpDummyMatrix::ClpDummyMatrix
ClpDummyMatrix()
Default constructor.
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::ClpDummyMatrix
ClpDummyMatrix(const CoinPackedMatrix &)
The copy constructor from an CoinDummyMatrix.
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::numberColumns_
int numberColumns_
Number of columns.
Definition ClpDummyMatrix.hpp:176
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::getPackedMatrix
virtual CoinPackedMatrix * getPackedMatrix() const
Return a complete CoinPackedMatrix.
ClpDummyMatrix::getNumElements
virtual CoinBigIndex getNumElements() const
Number of entries in the packed matrix.
Definition ClpDummyMatrix.hpp:31
ClpDummyMatrix::getIndices
virtual const int * getIndices() const
A vector containing the minor indices of the elements in the packed matrix.
ClpDummyMatrix::~ClpDummyMatrix
virtual ~ClpDummyMatrix()
Destructor.
ClpDummyMatrix::times
virtual void times(double scalar, const double *x, double *y) const
Return y + A * scalar *x in y.
ClpDummyMatrix::transposeTimes
virtual void transposeTimes(double scalar, const double *x, double *y) const
Return y + x * scalar * A in y.
ClpDummyMatrix::ClpDummyMatrix
ClpDummyMatrix(const ClpDummyMatrix &)
The copy constructor.
ClpDummyMatrix::transposeTimes
virtual void transposeTimes(double scalar, const double *x, double *y, const double *rowScale, const double *columnScale) const
And for scaling.
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::getVectorLengths
virtual const int * getVectorLengths() const
The lengths of the major-dimension vectors.
ClpDummyMatrix::deleteCols
virtual void deleteCols(const int numDel, const int *indDel)
Delete the columns whose indices are listed in indDel.
ClpDummyMatrix::reverseOrderedCopy
virtual ClpMatrixBase * reverseOrderedCopy() const
Returns a new matrix in reverse order without gaps.
ClpDummyMatrix::times
virtual void times(double scalar, const double *x, double *y, const double *rowScale, const double *columnScale) const
And for scaling.
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::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::getVectorStarts
virtual const CoinBigIndex * getVectorStarts() const
ClpDummyMatrix::operator=
ClpDummyMatrix & operator=(const ClpDummyMatrix &)
ClpDummyMatrix::getNumCols
virtual int getNumCols() const
Number of columns.
Definition ClpDummyMatrix.hpp:36
ClpDummyMatrix::deleteRows
virtual void deleteRows(const int numDel, const int *indDel)
Delete the rows whose indices are listed in indDel.
ClpMatrixBase::ClpMatrixBase
ClpMatrixBase()
Default constructor.
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.
ClpSimplex
This solves LPs using the simplex method.
Definition ClpSimplex.hpp:106