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

#include <matvec.h>

Collaboration diagram for grad::VectorData< T, DYNAMIC_SIZE >:

Public Member Functions

 VectorData (index_type N, bool)
 
 VectorData (const VectorData &oVec)
 
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

std::vector< T,
GradientAllocator< T > > 
rgData
 

Detailed Description

template<typename T>
class grad::VectorData< T, DYNAMIC_SIZE >

Definition at line 1682 of file matvec.h.

Constructor & Destructor Documentation

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

Definition at line 1684 of file matvec.h.

1685  :rgData(N) {
1686  }
std::vector< T, GradientAllocator< T > > rgData
Definition: matvec.h:1723
template<typename T >
grad::VectorData< T, DYNAMIC_SIZE >::VectorData ( const VectorData< T, DYNAMIC_SIZE > &  oVec)
inline

Definition at line 1688 of file matvec.h.

1689  :rgData(oVec.rgData) {
1690  }
std::vector< T, GradientAllocator< T > > rgData
Definition: matvec.h:1723

Member Function Documentation

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

Definition at line 1704 of file matvec.h.

References grad::VectorData< T, N_rows >::rgData.

1704  {
1705  return rgData.size();
1706  }
std::vector< T, GradientAllocator< T > > rgData
Definition: matvec.h:1723
template<typename T >
T& grad::VectorData< T, DYNAMIC_SIZE >::operator[] ( index_type  i)
inline

Definition at line 1692 of file matvec.h.

References MATVEC_ASSERT, and grad::VectorData< T, N_rows >::rgData.

1692  {
1693  MATVEC_ASSERT(i >= 0);
1694  MATVEC_ASSERT(i < index_type(rgData.size()));
1695  return rgData[i];
1696  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
integer index_type
Definition: gradient.h:104
std::vector< T, GradientAllocator< T > > rgData
Definition: matvec.h:1723
template<typename T >
const T& grad::VectorData< T, DYNAMIC_SIZE >::operator[] ( integer  i) const
inline

Definition at line 1698 of file matvec.h.

References MATVEC_ASSERT, and grad::VectorData< T, N_rows >::rgData.

1698  {
1699  MATVEC_ASSERT(i >= 0);
1700  MATVEC_ASSERT(i < index_type(rgData.size()));
1701  return rgData[i];
1702  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
integer index_type
Definition: gradient.h:104
std::vector< T, GradientAllocator< T > > rgData
Definition: matvec.h:1723
template<typename T >
const T* grad::VectorData< T, DYNAMIC_SIZE >::pGetFirstElem ( ) const
inline

Definition at line 1714 of file matvec.h.

References grad::VectorData< T, N_rows >::rgData.

1714  {
1715  return &rgData.front();
1716  }
std::vector< T, GradientAllocator< T > > rgData
Definition: matvec.h:1723
template<typename T >
const T* grad::VectorData< T, DYNAMIC_SIZE >::pGetLastElem ( ) const
inline

Definition at line 1718 of file matvec.h.

References grad::VectorData< T, N_rows >::rgData.

1718  {
1719  return &rgData.back();
1720  }
std::vector< T, GradientAllocator< T > > rgData
Definition: matvec.h:1723
template<typename T >
void grad::VectorData< T, DYNAMIC_SIZE >::Resize ( index_type  iNumRows)
inline

Definition at line 1708 of file matvec.h.

References grad::VectorData< T, N_rows >::iGetNumRows(), and grad::VectorData< T, N_rows >::rgData.

1708  {
1709  if (iNumRows != iGetNumRows()) {
1710  rgData.resize(iNumRows);
1711  }
1712  }
std::vector< T, GradientAllocator< T > > rgData
Definition: matvec.h:1723
index_type iGetNumRows() const
Definition: matvec.h:1704

Here is the call graph for this function:

Member Data Documentation

template<typename T >
std::vector<T, GradientAllocator<T> > grad::VectorData< T, DYNAMIC_SIZE >::rgData
private

Definition at line 1723 of file matvec.h.


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