copasi API
0.1
|
#include <CMatrix.h>
Public Types | |
typedef CType | elementType |
Public Member Functions | |
CMatrix (unsigned C_INT32 rows=0, unsigned C_INT32 cols=0) | |
CMatrix (const CMatrix< CType > &src) | |
virtual | ~CMatrix () |
virtual unsigned C_INT32 | size () const |
virtual unsigned C_INT32 | numRows () const |
virtual unsigned C_INT32 | numCols () const |
virtual void | resize (unsigned C_INT32 rows, unsigned C_INT32 cols) |
virtual CMatrix< CType > & | operator= (const CMatrix< CType > &rhs) |
virtual CMatrix< CType > & | operator= (const CType &value) |
virtual CType * | operator[] (unsigned C_INT32 row) |
virtual const CType * | operator[] (unsigned C_INT32 row) const |
virtual elementType & | operator() (const unsigned C_INT32 &row, const unsigned C_INT32 &col) |
virtual const elementType & | operator() (const unsigned C_INT32 &row, const unsigned C_INT32 &col) const |
virtual CType * | array () |
virtual const CType * | array () const |
bool | applyPivot (const CVector< unsigned C_INT32 > &pivot) |
Protected Attributes | |
unsigned C_INT32 | mRows |
unsigned C_INT32 | mCols |
CType * | mArray |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CMatrix< CType > &A) |
Template class CMatrix < class CType > This template class is a simple matrix class allowing standard C-style and fortran style access to the elements. It also supplies an ostream operator.
typedef CType CMatrix< CType >::elementType |
CMatrix< CType >::CMatrix | ( | unsigned C_INT32 | rows = 0 , |
unsigned C_INT32 | cols = 0 |
||
) | [inline] |
Default constructor
unsigned | C_INT32 rows (default = 0) |
unsigned | C_INT32 cols (default = 0) |
Copy constructor
const | CMatrix <CType> & src |
bool CMatrix< CType >::applyPivot | ( | const CVector< unsigned C_INT32 > & | pivot | ) | [inline] |
Reorder the rows according to the provided pivots
const | CVector<unsigned C_INT32> & pivot |
virtual CType* CMatrix< CType >::array | ( | ) | [inline, virtual] |
Retrieve the array of the matrix elements. This is suitable for interfacing with clapack routines.
virtual const CType* CMatrix< CType >::array | ( | ) | const [inline, virtual] |
Retrieve the array of the matrix elements. This is suitable for interfacing with clapack routines.
virtual unsigned C_INT32 CMatrix< CType >::numCols | ( | ) | const [inline, virtual] |
The number of columns of the matrix
virtual unsigned C_INT32 CMatrix< CType >::numRows | ( | ) | const [inline, virtual] |
The number of rows of the matrix.
virtual elementType& CMatrix< CType >::operator() | ( | const unsigned C_INT32 & | row, |
const unsigned C_INT32 & | col | ||
) | [inline, virtual] |
Retrieve a matrix element using c-style indexing.
const | unsigned C_INT32 & row |
const | unsigned C_INT32 & col |
virtual const elementType& CMatrix< CType >::operator() | ( | const unsigned C_INT32 & | row, |
const unsigned C_INT32 & | col | ||
) | const [inline, virtual] |
Retrieve a matrix element using c-style indexing.
const | unsigned C_INT32 & row |
const | unsigned C_INT32 & col |
virtual CType* CMatrix< CType >::operator[] | ( | unsigned C_INT32 | row | ) | [inline, virtual] |
Retrieve a row of the matrix using c-style indexing
unsigned | C_INT32 row |
virtual const CType* CMatrix< CType >::operator[] | ( | unsigned C_INT32 | row | ) | const [inline, virtual] |
Retrieve a row of the matrix using c-style indexing
unsigned | C_INT32 row |
virtual void CMatrix< CType >::resize | ( | unsigned C_INT32 | rows, |
unsigned C_INT32 | cols | ||
) | [inline, virtual] |
Resize the matrix. The previous content is lost
unsigned | C_INT32 rows |
unsigned | C_INT32 cols |
virtual unsigned C_INT32 CMatrix< CType >::size | ( | ) | const [inline, virtual] |
The number of elements stored in the matrix.
std::ostream& operator<< | ( | std::ostream & | os, |
const CMatrix< CType > & | A | ||
) | [friend] |
Output stream operator
ostream | & os |
const | CMatrix< CType > & A |
The array storing the matrix elements
Number of columns in the matrix
Number of rows in the matrix.