MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
grad::MatrixData< T, N_rows, N_cols > Class Template Reference

#include <matvec.h>

Inheritance diagram for grad::MatrixData< T, N_rows, N_cols >:
Collaboration diagram for grad::MatrixData< T, N_rows, N_cols >:

Public Member Functions

 MatrixData (index_type iNumRows, index_type iNumCols, bool bZeroInit)
 
index_type iGetNumRows () const
 
index_type iGetNumCols () const
 
T & operator() (index_type i, index_type j)
 
const T & operator() (index_type i, index_type j) const
 
void Resize (index_type iRows, index_type iCols)
 
const T * pGetFirstElem () const
 
const T * pGetLastElem () const
 

Private Attributes

rgData [N_rows][N_cols]
 

Detailed Description

template<typename T, index_type N_rows, index_type N_cols>
class grad::MatrixData< T, N_rows, N_cols >

Definition at line 1728 of file matvec.h.

Constructor & Destructor Documentation

template<typename T, index_type N_rows, index_type N_cols>
grad::MatrixData< T, N_rows, N_cols >::MatrixData ( index_type  iNumRows,
index_type  iNumCols,
bool  bZeroInit 
)
inline

Definition at line 1731 of file matvec.h.

1731  {
1732  MATVEC_ASSERT(iNumRows == N_rows);
1733  MATVEC_ASSERT(iNumCols == N_cols);
1734 
1735  if (bZeroInit) {
1736  ZeroInit(&rgData[0][0], &rgData[iNumRows - 1][iNumCols - 1] + 1);
1737  }
1738  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
T rgData[N_rows][N_cols]
Definition: matvec.h:1769
void ZeroInit(T *first, T *last)
Definition: matvec.h:450

Member Function Documentation

template<typename T, index_type N_rows, index_type N_cols>
index_type grad::MatrixData< T, N_rows, N_cols >::iGetNumCols ( void  ) const
inline

Definition at line 1741 of file matvec.h.

Referenced by grad::Matrix< T, N_rows, N_cols >::iGetNumCols().

1741 { return N_cols; }
template<typename T, index_type N_rows, index_type N_cols>
index_type grad::MatrixData< T, N_rows, N_cols >::iGetNumRows ( void  ) const
inline

Definition at line 1740 of file matvec.h.

Referenced by grad::Matrix< T, N_rows, N_cols >::iGetNumRows().

1740 { return N_rows; }
template<typename T, index_type N_rows, index_type N_cols>
T& grad::MatrixData< T, N_rows, N_cols >::operator() ( index_type  i,
index_type  j 
)
inline

Definition at line 1743 of file matvec.h.

1743  {
1744  MATVEC_ASSERT(i >= 1 && i <= N_rows);
1745  MATVEC_ASSERT(j >= 1 && j <= N_cols);
1746  return rgData[i - 1][j - 1];
1747  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
T rgData[N_rows][N_cols]
Definition: matvec.h:1769
template<typename T, index_type N_rows, index_type N_cols>
const T& grad::MatrixData< T, N_rows, N_cols >::operator() ( index_type  i,
index_type  j 
) const
inline

Definition at line 1749 of file matvec.h.

1749  {
1750  MATVEC_ASSERT(i >= 1 && i <= N_rows);
1751  MATVEC_ASSERT(j >= 1 && j <= N_cols);
1752  return rgData[i - 1][j - 1];
1753  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
T rgData[N_rows][N_cols]
Definition: matvec.h:1769
template<typename T, index_type N_rows, index_type N_cols>
const T* grad::MatrixData< T, N_rows, N_cols >::pGetFirstElem ( ) const
inline

Definition at line 1760 of file matvec.h.

Referenced by grad::Matrix< T, N_rows, N_cols >::pGetFirstElem().

1760  {
1761  return &rgData[0][0];
1762  }
T rgData[N_rows][N_cols]
Definition: matvec.h:1769
template<typename T, index_type N_rows, index_type N_cols>
const T* grad::MatrixData< T, N_rows, N_cols >::pGetLastElem ( ) const
inline

Definition at line 1764 of file matvec.h.

Referenced by grad::Matrix< T, N_rows, N_cols >::pGetLastElem().

1764  {
1765  return &rgData[N_rows - 1][N_cols - 1];
1766  }
T rgData[N_rows][N_cols]
Definition: matvec.h:1769
template<typename T, index_type N_rows, index_type N_cols>
void grad::MatrixData< T, N_rows, N_cols >::Resize ( index_type  iRows,
index_type  iCols 
)
inline

Member Data Documentation


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