Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

ClpDummyMatrix Class Reference

#include <ClpDummyMatrix.hpp>

Inheritance diagram for ClpDummyMatrix:

ClpMatrixBase List of all members.

Public Member Functions

Useful methods
virtual CoinPackedMatrix * getPackedMatrix () const
 Return a complete CoinPackedMatrix.

virtual bool isColOrdered () const
virtual CoinBigIndex getNumElements () const
virtual int getNumCols () const
virtual int getNumRows () const
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 ClpMatrixBasereverseOrderedCopy () const
virtual CoinBigIndex numberInBasis (const int *columnIsBasic) const
virtual CoinBigIndex fillBasis (const ClpSimplex *model, const int *columnIsBasic, int &numberBasic, int *row, int *column, double *element) const
 Fills in basis (Returns number of elements and updates numberBasic).

virtual CoinBigIndex fillBasis (const ClpSimplex *model, const int *whichColumn, int numberRowBasic, int numberColumnBasic, int *row, int *column, double *element) const
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 releaseDummyMatrix () const
 Allow any parts of a created CoinMatrix to be deleted.

Matrix times vector methods
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
 And for scaling.

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
 And for scaling.

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
Constructors, destructor
 ClpDummyMatrix ()
 ClpDummyMatrix (int numberColumns, int numberRows, int numberElements)
 Constructor with data.

virtual ~ClpDummyMatrix ()
Copy method
 ClpDummyMatrix (const ClpDummyMatrix &)
 ClpDummyMatrix (const CoinPackedMatrix &)
ClpDummyMatrixoperator= (const ClpDummyMatrix &)
virtual ClpMatrixBaseclone () const
 Clone.


Protected Attributes

Data members
The data members are protected to allow access for derived classes.

int numberRows_
 Number of rows.

int numberColumns_
 Number of columns.

int numberElements_
 Number of elements.


Detailed Description

This implements a dummy matrix as derived from ClpMatrixBase. This is so you can do ClpPdco but may come in useful elsewhere. It just has dimensions but no data

Definition at line 17 of file ClpDummyMatrix.hpp.


Constructor & Destructor Documentation

ClpDummyMatrix::ClpDummyMatrix  ) 
 

Default constructor.

Definition at line 21 of file ClpDummyMatrix.cpp.

References numberColumns_, numberElements_, numberRows_, and ClpMatrixBase::setType().

Referenced by clone().

00022   : ClpMatrixBase()
00023 {
00024   setType(14);
00025   numberRows_=0;
00026   numberColumns_=0;
00027   numberElements_=0;
00028 }

ClpDummyMatrix::~ClpDummyMatrix  )  [virtual]
 

Destructor

Definition at line 61 of file ClpDummyMatrix.cpp.

00062 {
00063 }

ClpDummyMatrix::ClpDummyMatrix const ClpDummyMatrix  ) 
 

The copy constructor.

Definition at line 43 of file ClpDummyMatrix.cpp.

References numberColumns_, numberElements_, and numberRows_.

00044 : ClpMatrixBase(rhs)
00045 {  
00046   numberRows_=rhs.numberRows_;
00047   numberColumns_=rhs.numberColumns_;
00048   numberElements_=rhs.numberElements_;
00049 }

ClpDummyMatrix::ClpDummyMatrix const CoinPackedMatrix &   ) 
 

The copy constructor from an CoinDummyMatrix.

Definition at line 51 of file ClpDummyMatrix.cpp.

00052   : ClpMatrixBase()
00053 {  
00054   std::cerr<<"Constructor from CoinPackedMatrix nnot supported - ClpDummyMatrix"<<std::endl;
00055   abort();
00056 }


Member Function Documentation

void ClpDummyMatrix::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.

Definition at line 209 of file ClpDummyMatrix.cpp.

00211 {
00212   std::cerr<<"add not supported - ClpDummyMatrix"<<std::endl;
00213   abort();
00214 }

void ClpDummyMatrix::deleteCols const int  numDel,
const int *  indDel
[virtual]
 

Delete the columns whose indices are listed in indDel.

Implements ClpMatrixBase.

Definition at line 252 of file ClpDummyMatrix.cpp.

00253 {
00254   std::cerr<<"deleteCols not supported - ClpDummyMatrix"<<std::endl;
00255   abort();
00256 }

void ClpDummyMatrix::deleteRows const int  numDel,
const int *  indDel
[virtual]
 

Delete the rows whose indices are listed in indDel.

Implements ClpMatrixBase.

Definition at line 258 of file ClpDummyMatrix.cpp.

00259 {
00260   std::cerr<<"deleteRows not supported - ClpDummyMatrix"<<std::endl;
00261   abort();
00262 }

CoinBigIndex ClpDummyMatrix::fillBasis const ClpSimplex model,
const int *  whichColumn,
int  numberRowBasic,
int  numberColumnBasic,
int *  row,
int *  column,
double *  element
const [virtual]
 

If element NULL returns number of elements in column part of basis, If not NULL fills in as well

Implements ClpMatrixBase.

Definition at line 174 of file ClpDummyMatrix.cpp.

00180 {
00181   std::cerr<<"fillBasis not supported - ClpDummyMatrix"<<std::endl;
00182   abort();
00183   return 0;
00184 }

const double * ClpDummyMatrix::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.

Definition at line 229 of file ClpDummyMatrix.cpp.

00230 {
00231   std::cerr<<"getElements not supported - ClpDummyMatrix"<<std::endl;
00232   abort();
00233   return NULL;
00234 }

const int * ClpDummyMatrix::getIndices  )  const [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 264 of file ClpDummyMatrix.cpp.

00265 {
00266   std::cerr<<"getIndices not supported - ClpDummyMatrix"<<std::endl;
00267   abort();
00268   return NULL;
00269 }

virtual int ClpDummyMatrix::getNumCols  )  const [inline, virtual]
 

Number of columns.

Implements ClpMatrixBase.

Definition at line 30 of file ClpDummyMatrix.hpp.

References numberColumns_.

00030 { return numberColumns_; }

virtual CoinBigIndex ClpDummyMatrix::getNumElements  )  const [inline, virtual]
 

Number of entries in the packed matrix.

Implements ClpMatrixBase.

Definition at line 27 of file ClpDummyMatrix.hpp.

References numberElements_.

00028   { return numberElements_; }

virtual int ClpDummyMatrix::getNumRows  )  const [inline, virtual]
 

Number of rows.

Implements ClpMatrixBase.

Definition at line 32 of file ClpDummyMatrix.hpp.

References numberRows_.

00032 { return numberRows_; };

const int * ClpDummyMatrix::getVectorLengths  )  const [virtual]
 

The lengths of the major-dimension vectors.

Implements ClpMatrixBase.

Definition at line 245 of file ClpDummyMatrix.cpp.

00246 {
00247   std::cerr<<"get VectorLengths not supported - ClpDummyMatrix"<<std::endl;
00248   abort();
00249   return NULL;
00250 }

virtual bool ClpDummyMatrix::isColOrdered  )  const [inline, virtual]
 

Whether the packed matrix is column major ordered or not.

Implements ClpMatrixBase.

Definition at line 25 of file ClpDummyMatrix.hpp.

00025 { return true; }

CoinBigIndex ClpDummyMatrix::numberInBasis const int *  columnIsBasic  )  const [virtual]
 

Returns number of elements in basis column is basic if entry >=0

Implements ClpMatrixBase.

Definition at line 154 of file ClpDummyMatrix.cpp.

00155 {
00156   std::cerr<<"numberInBasis not supported - ClpDummyMatrix"<<std::endl;
00157   abort();
00158   return 0;
00159 }

ClpMatrixBase * ClpDummyMatrix::reverseOrderedCopy  )  const [virtual]
 

Returns a new matrix in reverse order without gaps

Reimplemented from ClpMatrixBase.

Definition at line 89 of file ClpDummyMatrix.cpp.

00090 {
00091   std::cerr<<"reverseOrderedCopy not supported - ClpDummyMatrix"<<std::endl;
00092   abort();
00093   return NULL;
00094 }

void ClpDummyMatrix::subsetTransposeTimes const ClpSimplex model,
const CoinIndexedVector x,
const CoinIndexedVector y,
CoinIndexedVector z
const [virtual]
 

Return x *A in z but just for indices in y. Note - If x packed mode - then z packed mode Squashes small elements and knows about ClpSimplex

Implements ClpMatrixBase.

Definition at line 143 of file ClpDummyMatrix.cpp.

00147 {
00148   std::cerr<<"subsetTransposeTimes not supported - ClpDummyMatrix"<<std::endl;
00149   abort();
00150 }

void ClpDummyMatrix::times double  scalar,
const double *  x,
double *  y
const [virtual]
 

Return y + A * scalar *x in y.

Precondition:
x must be of size numColumns()

y must be of size numRows()

Implements ClpMatrixBase.

Definition at line 97 of file ClpDummyMatrix.cpp.

00099 {
00100   std::cerr<<"times not supported - ClpDummyMatrix"<<std::endl;
00101   abort();
00102 }

void ClpDummyMatrix::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.

Definition at line 131 of file ClpDummyMatrix.cpp.

00135 {
00136   std::cerr<<"transposeTimes not supported - ClpDummyMatrix"<<std::endl;
00137   abort();
00138 }

void ClpDummyMatrix::transposeTimes double  scalar,
const double *  x,
double *  y
const [virtual]
 

Return y + x * scalar * A in y.

Precondition:
x must be of size numRows()

y must be of size numColumns()

Implements ClpMatrixBase.

Definition at line 104 of file ClpDummyMatrix.cpp.

00106 {
00107   std::cerr<<"transposeTimes not supported - ClpDummyMatrix"<<std::endl;
00108   abort();
00109 }

void ClpDummyMatrix::unpack const ClpSimplex model,
CoinIndexedVector rowArray,
int  column
const [virtual]
 

Unpacks a column into an CoinIndexedvector

Implements ClpMatrixBase.

Definition at line 188 of file ClpDummyMatrix.cpp.

00190 {
00191   std::cerr<<"unpack not supported - ClpDummyMatrix"<<std::endl;
00192   abort();
00193 }

void ClpDummyMatrix::unpackPacked ClpSimplex model,
CoinIndexedVector rowArray,
int  column
const [virtual]
 

Unpacks a column into an CoinIndexedvector in packed foramt Note that model is NOT const. Bounds and objective could be modified if doing column generation (just for this variable)

Implements ClpMatrixBase.

Definition at line 199 of file ClpDummyMatrix.cpp.

00202 {
00203   std::cerr<<"unpackPacked not supported - ClpDummyMatrix"<<std::endl;
00204   abort();
00205 }


The documentation for this class was generated from the following files:
Generated on Wed Dec 3 14:37:38 2003 for CLP by doxygen 1.3.5