COPASI API  4.16.103
Classes | Functions
CMatrix.h File Reference
#include <algorithm>
#include <iostream>
#include <assert.h>
#include <string.h>
#include "copasi.h"
#include "utilities/CVector.h"
Include dependency graph for CMatrix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CFortranAccess< Matrix >
 
class  CLowerTriangularView< Matrix >
 
class  CLowerTriangularView< Matrix >
 
class  CMatrix< CType >
 
class  CMatrix< CType >
 
class  CTransposeView< Matrix >
 
class  CTransposeView< Matrix >
 
class  CUnitLowerTriangularView< Matrix >
 
class  CUnitLowerTriangularView< Matrix >
 
class  CUnitUpperTriangularView< Matrix >
 
class  CUnitUpperTriangularView< Matrix >
 
class  CUpperTriangularView< Matrix >
 
class  CUpperTriangularView< Matrix >
 

Functions

template<class CType >
std::ostream & operator<< (std::ostream &os, const CMatrix< CType > &A)
 
template<class Matrix >
std::ostream & operator<< (std::ostream &os, const CTransposeView< Matrix > &A)
 
template<class Matrix >
std::ostream & operator<< (std::ostream &os, const CLowerTriangularView< Matrix > &A)
 
template<class Matrix >
std::ostream & operator<< (std::ostream &os, const CUpperTriangularView< Matrix > &A)
 
template<class Matrix >
std::ostream & operator<< (std::ostream &os, const CUnitUpperTriangularView< Matrix > &A)
 
template<class Matrix >
std::ostream & operator<< (std::ostream &os, const CUnitLowerTriangularView< Matrix > &A)
 

Function Documentation

template<class CType >
std::ostream & operator<< ( std::ostream &  os,
const CMatrix< CType > &  A 
)

Output stream operator

Parameters
ostream& os
constCMatrix< CType > & A
Returns
ostream & os

Definition at line 809 of file CMatrix.h.

810 {
811  os << "Matrix(" << A.mRows << "x" << A.mCols << ")" << std::endl;
812 
813  size_t i, j;
814  CType * tmp = A.mArray;
815 
816  for (i = 0; i < A.mRows; i++)
817  {
818  for (j = 0; j < A.mCols; j++)
819  os << "\t" << *(tmp++);
820 
821  os << std::endl;
822  }
823 
824  return os;
825 }
size_t mCols
Definition: CMatrix.h:82
CType * mArray
Definition: CMatrix.h:87
size_t mRows
Definition: CMatrix.h:77
template<class Matrix >
std::ostream & operator<< ( std::ostream &  os,
const CTransposeView< Matrix > &  A 
)

Output stream operator

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

Definition at line 904 of file CMatrix.h.

References CTransposeView< Matrix >::numCols(), and CTransposeView< Matrix >::numRows().

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
template<class Matrix >
std::ostream & operator<< ( std::ostream &  os,
const CLowerTriangularView< Matrix > &  A 
)

Output stream operator

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

Definition at line 847 of file CMatrix.h.

References CLowerTriangularView< Matrix >::numCols(), and CLowerTriangularView< Matrix >::numRows().

849 {
850  size_t i, imax = A.numRows();
851  size_t j, jmax = A.numCols();
852  os << "Matrix(" << imax << "x" << jmax << ")" << std::endl;
853 
854  for (i = 0; i < imax; i++)
855  {
856  for (j = 0; j < jmax; j++)
857  os << "\t" << A(i, j);
858 
859  os << std::endl;
860  }
861 
862  return os;
863 }
size_t numRows() const
Definition: CMatrix.h:555
size_t numCols() const
Definition: CMatrix.h:561
template<class Matrix >
std::ostream & operator<< ( std::ostream &  os,
const CUpperTriangularView< Matrix > &  A 
)

Output stream operator

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

Definition at line 828 of file CMatrix.h.

References CUpperTriangularView< Matrix >::numCols(), and CUpperTriangularView< Matrix >::numRows().

830 {
831  size_t i, imax = A.numRows();
832  size_t j, jmax = A.numCols();
833  os << "Matrix(" << imax << "x" << jmax << ")" << std::endl;
834 
835  for (i = 0; i < imax; i++)
836  {
837  for (j = 0; j < jmax; j++)
838  os << "\t" << A(i, j);
839 
840  os << std::endl;
841  }
842 
843  return os;
844 }
size_t numCols() const
Definition: CMatrix.h:493
size_t numRows() const
Definition: CMatrix.h:487
template<class Matrix >
std::ostream & operator<< ( std::ostream &  os,
const CUnitUpperTriangularView< Matrix > &  A 
)

Output stream operator

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

Definition at line 866 of file CMatrix.h.

References CUnitUpperTriangularView< Matrix >::numCols(), and CUnitUpperTriangularView< Matrix >::numRows().

868 {
869  size_t i, imax = A.numRows();
870  size_t j, jmax = A.numCols();
871  os << "Matrix(" << imax << "x" << jmax << ")" << std::endl;
872 
873  for (i = 0; i < imax; i++)
874  {
875  for (j = 0; j < jmax; j++)
876  os << "\t" << A(i, j);
877 
878  os << std::endl;
879  }
880 
881  return os;
882 }
size_t numCols() const
Definition: CMatrix.h:633
size_t numRows() const
Definition: CMatrix.h:627
template<class Matrix >
std::ostream & operator<< ( std::ostream &  os,
const CUnitLowerTriangularView< Matrix > &  A 
)

Output stream operator

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

Definition at line 885 of file CMatrix.h.

References CUnitLowerTriangularView< Matrix >::numCols(), and CUnitLowerTriangularView< Matrix >::numRows().

887 {
888  size_t i, imax = A.numRows();
889  size_t j, jmax = A.numCols();
890  os << "Matrix(" << imax << "x" << jmax << ")" << std::endl;
891 
892  for (i = 0; i < imax; i++)
893  {
894  for (j = 0; j < jmax; j++)
895  os << "\t" << A(i, j);
896 
897  os << std::endl;
898  }
899 
900  return os;
901 }
size_t numCols() const
Definition: CMatrix.h:707
size_t numRows() const
Definition: CMatrix.h:701