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

#include <matvec.h>

Collaboration diagram for grad::SliceVector< T, DYNAMIC_SIZE, N_offset >:

Public Types

typedef ScalarTypeTraits< T >
::ScalarType 
ScalarType
 
typedef ScalarTypeTraits< T >
::DirectExpressionType 
ExpressionType
 

Public Member Functions

 SliceVector (const ScalarType *p, index_type iRows, index_type iOffset)
 
const ScalarTypeoperator() (index_type iRow) const
 
index_type iGetNumRows () const
 
template<typename ScalarType2 >
bool bHaveReferenceTo (const ScalarType2 *pFirst, const ScalarType2 *pLast) const
 

Static Public Attributes

static const bool bAlias = MatVecHelp::AliasTypeHelper<T>::bAlias
 
static const index_type iNumRows = DYNAMIC_SIZE
 

Private Types

typedef MaxSizeCheck
< N_offset!=DYNAMIC_SIZE >
::CheckType 
check_iOffset
 

Private Attributes

const ScalarType *const pVec
 
const index_type iCurrRows
 

Detailed Description

template<typename T, index_type N_offset>
class grad::SliceVector< T, DYNAMIC_SIZE, N_offset >

Definition at line 972 of file matvec.h.

Member Typedef Documentation

template<typename T , index_type N_offset>
typedef MaxSizeCheck<N_offset != DYNAMIC_SIZE>::CheckType grad::SliceVector< T, DYNAMIC_SIZE, N_offset >::check_iOffset
private

Definition at line 1003 of file matvec.h.

template<typename T , index_type N_offset>
typedef ScalarTypeTraits<T>::DirectExpressionType grad::SliceVector< T, DYNAMIC_SIZE, N_offset >::ExpressionType

Definition at line 977 of file matvec.h.

template<typename T , index_type N_offset>
typedef ScalarTypeTraits<T>::ScalarType grad::SliceVector< T, DYNAMIC_SIZE, N_offset >::ScalarType

Definition at line 976 of file matvec.h.

Constructor & Destructor Documentation

template<typename T , index_type N_offset>
grad::SliceVector< T, DYNAMIC_SIZE, N_offset >::SliceVector ( const ScalarType p,
index_type  iRows,
index_type  iOffset 
)
inline

Definition at line 979 of file matvec.h.

References MATVEC_ASSERT.

980  :pVec(p), iCurrRows(iRows) {
981 
982  MATVEC_ASSERT(iOffset == N_offset);
983  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64

Member Function Documentation

template<typename T , index_type N_offset>
template<typename ScalarType2 >
bool grad::SliceVector< T, DYNAMIC_SIZE, N_offset >::bHaveReferenceTo ( const ScalarType2 *  pFirst,
const ScalarType2 *  pLast 
) const
inline

Definition at line 995 of file matvec.h.

References grad::bArrayOverlap(), and grad::SliceVector< T, N_rows, N_offset >::pVec.

995  {
996  return bArrayOverlap(pVec, pVec + (iCurrRows - 1) * N_offset, pFirst, pLast);
997  }
bool bArrayOverlap(const ScalarType *pFirstArray1, const ScalarType *pLastArray1, const ScalarType *pFirstArray2, const ScalarType *pLastArray2)
Definition: matvec.h:430

Here is the call graph for this function:

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

Definition at line 992 of file matvec.h.

992 { return iCurrRows; }
template<typename T , index_type N_offset>
const ScalarType& grad::SliceVector< T, DYNAMIC_SIZE, N_offset >::operator() ( index_type  iRow) const
inline

Definition at line 985 of file matvec.h.

References grad::SliceVector< T, N_rows, N_offset >::iGetNumRows(), MATVEC_ASSERT, and grad::SliceVector< T, N_rows, N_offset >::pVec.

985  {
986  --iRow; // row index is 1-based
987  MATVEC_ASSERT(iRow >= 0);
988  MATVEC_ASSERT(iRow < iGetNumRows());
989  return *(pVec + iRow * N_offset);
990  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64

Here is the call graph for this function:

Member Data Documentation

template<typename T , index_type N_offset>
const bool grad::SliceVector< T, DYNAMIC_SIZE, N_offset >::bAlias = MatVecHelp::AliasTypeHelper<T>::bAlias
static

Definition at line 974 of file matvec.h.

template<typename T , index_type N_offset>
const index_type grad::SliceVector< T, DYNAMIC_SIZE, N_offset >::iCurrRows
private

Definition at line 1001 of file matvec.h.

template<typename T , index_type N_offset>
const index_type grad::SliceVector< T, DYNAMIC_SIZE, N_offset >::iNumRows = DYNAMIC_SIZE
static

Definition at line 975 of file matvec.h.

template<typename T , index_type N_offset>
const ScalarType* const grad::SliceVector< T, DYNAMIC_SIZE, N_offset >::pVec
private

Definition at line 1000 of file matvec.h.


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