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

#include <matvec.h>

Inheritance diagram for grad::VectorData< T, N_rows >:
Collaboration diagram for grad::VectorData< T, N_rows >:

Public Member Functions

 VectorData (index_type N, bool bZeroInit)
 
 VectorData (const VectorData &oData)
 
template<typename U >
 VectorData (const VectorData< U, N_rows > &oData)
 
T & operator[] (index_type i)
 
const T & operator[] (integer i) const
 
index_type iGetNumRows () const
 
void Resize (index_type iNumRows)
 
const T * pGetFirstElem () const
 
const T * pGetLastElem () const
 

Private Attributes

rgData [N_rows]
 

Detailed Description

template<typename T, index_type N_rows>
class grad::VectorData< T, N_rows >

Definition at line 1630 of file matvec.h.

Constructor & Destructor Documentation

template<typename T, index_type N_rows>
grad::VectorData< T, N_rows >::VectorData ( index_type  N,
bool  bZeroInit 
)
inlineexplicit

Definition at line 1632 of file matvec.h.

1632  {
1633  MATVEC_ASSERT(N == N_rows);
1634 
1635  if (bZeroInit) {
1636  ZeroInit(&rgData[0], &rgData[N_rows]);
1637  }
1638  }
T rgData[N_rows]
Definition: matvec.h:1678
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
void ZeroInit(T *first, T *last)
Definition: matvec.h:450
template<typename T, index_type N_rows>
grad::VectorData< T, N_rows >::VectorData ( const VectorData< T, N_rows > &  oData)
inline

Definition at line 1640 of file matvec.h.

1640  {
1641  std::copy(&oData.rgData[0], &oData.rgData[N_rows], &rgData[0]);
1642  }
T rgData[N_rows]
Definition: matvec.h:1678
template<typename T, index_type N_rows>
template<typename U >
grad::VectorData< T, N_rows >::VectorData ( const VectorData< U, N_rows > &  oData)
inline

Definition at line 1645 of file matvec.h.

1645  {
1646  std::copy(&oData.rgData[0], &oData.rgData[N_rows], &rgData[0]);
1647  }
T rgData[N_rows]
Definition: matvec.h:1678

Member Function Documentation

template<typename T, index_type N_rows>
index_type grad::VectorData< T, N_rows >::iGetNumRows ( void  ) const
inline

Definition at line 1661 of file matvec.h.

Referenced by grad::VectorData< T, DYNAMIC_SIZE >::Resize().

1661  {
1662  return N_rows;
1663  }
template<typename T, index_type N_rows>
T& grad::VectorData< T, N_rows >::operator[] ( index_type  i)
inline

Definition at line 1649 of file matvec.h.

1649  {
1650  MATVEC_ASSERT(i >= 0);
1651  MATVEC_ASSERT(i < N_rows);
1652  return rgData[i];
1653  }
T rgData[N_rows]
Definition: matvec.h:1678
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
template<typename T, index_type N_rows>
const T& grad::VectorData< T, N_rows >::operator[] ( integer  i) const
inline

Definition at line 1655 of file matvec.h.

1655  {
1656  MATVEC_ASSERT(i >= 0);
1657  MATVEC_ASSERT(i < N_rows);
1658  return rgData[i];
1659  }
T rgData[N_rows]
Definition: matvec.h:1678
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
template<typename T, index_type N_rows>
const T* grad::VectorData< T, N_rows >::pGetFirstElem ( ) const
inline

Definition at line 1669 of file matvec.h.

1669  {
1670  return &rgData[0];
1671  }
T rgData[N_rows]
Definition: matvec.h:1678
template<typename T, index_type N_rows>
const T* grad::VectorData< T, N_rows >::pGetLastElem ( ) const
inline

Definition at line 1673 of file matvec.h.

1673  {
1674  return &rgData[N_rows - 1];
1675  }
T rgData[N_rows]
Definition: matvec.h:1678
template<typename T, index_type N_rows>
void grad::VectorData< T, N_rows >::Resize ( index_type  iNumRows)
inline

Definition at line 1665 of file matvec.h.

1665  {
1666  MATVEC_ASSERT(iNumRows == N_rows);
1667  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64

Member Data Documentation


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