COPASI API  4.16.103
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
CTransposeView< Matrix > Class Template Reference

#include <CMatrix.h>

Public Types

typedef Matrix::elementType elementType
 

Public Member Functions

 CTransposeView (const Matrix &A)
 
size_t numCols () const
 
size_t numRows () const
 
elementType operator() (const size_t &row, const size_t &col) const
 
 ~CTransposeView ()
 

Private Attributes

const Matrix & mA
 

Friends

std::ostream & operator<< (std::ostream &os, const CTransposeView< Matrix > &A)
 

Detailed Description

template<class Matrix>
class CTransposeView< Matrix >

Definition at line 35 of file CMatrix.h.

Member Typedef Documentation

template<class Matrix>
typedef Matrix::elementType CTransposeView< Matrix >::elementType

Definition at line 753 of file CMatrix.h.

Constructor & Destructor Documentation

template<class Matrix>
CTransposeView< Matrix >::CTransposeView ( const Matrix &  A)
inline

Definition at line 759 of file CMatrix.h.

759 : mA(A) {}
const Matrix & mA
Definition: CMatrix.h:756
template<class Matrix>
CTransposeView< Matrix >::~CTransposeView ( )
inline

Definition at line 761 of file CMatrix.h.

761 {}

Member Function Documentation

template<class Matrix>
size_t CTransposeView< Matrix >::numCols ( ) const
inline

The number of columns of the matrix

Returns
size_t cols

Definition at line 773 of file CMatrix.h.

References CTransposeView< Matrix >::mA.

Referenced by operator<<().

773 {return mA.numRows();}
const Matrix & mA
Definition: CMatrix.h:756
template<class Matrix>
size_t CTransposeView< Matrix >::numRows ( ) const
inline

The number of rows of the matrix.

Returns
size_t rows

Definition at line 767 of file CMatrix.h.

References CTransposeView< Matrix >::mA.

Referenced by CEFMAlgorithm::initialize(), and operator<<().

767 {return mA.numCols();}
const Matrix & mA
Definition: CMatrix.h:756
template<class Matrix>
elementType CTransposeView< Matrix >::operator() ( const size_t &  row,
const size_t &  col 
) const
inline

Retrieve a matrix element using the indexing style of the matrix.

Parameters
constsize_t & row
constsize_t & col
Returns
elementType element

Definition at line 781 of file CMatrix.h.

References CTransposeView< Matrix >::mA.

783  {return mA(col, row);}
const Matrix & mA
Definition: CMatrix.h:756

Friends And Related Function Documentation

template<class Matrix>
std::ostream& operator<< ( std::ostream &  os,
const CTransposeView< Matrix > &  A 
)
friend

Output stream operator

Parameters
ostream& os
constCTransposeView< Matrix > & A
Returns
ostream & os

Definition at line 904 of file CMatrix.h.

906 {
907  size_t i, imax = A.numRows();
908  size_t j, jmax = A.numCols();
909  os << "Matrix(" << imax << "x" << jmax << ")" << std::endl;
910 
911  for (i = 0; i < imax; i++)
912  {
913  for (j = 0; j < jmax; j++)
914  os << "\t" << A(i, j);
915 
916  os << std::endl;
917  }
918 
919  return os;
920 }
size_t numCols() const
Definition: CMatrix.h:773
size_t numRows() const
Definition: CMatrix.h:767

Member Data Documentation

template<class Matrix>
const Matrix& CTransposeView< Matrix >::mA
private

The documentation for this class was generated from the following file: