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

#include <matvec.h>

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

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
< iNumRows!=DYNAMIC_SIZE >
::CheckType 
check_iNumRows
 

Private Attributes

const ScalarType *const pVec
 
const index_type iCurrRows
 
const index_type iOffset
 

Detailed Description

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

Definition at line 1008 of file matvec.h.

Member Typedef Documentation

template<typename T >
typedef MaxSizeCheck<iNumRows != DYNAMIC_SIZE>::CheckType grad::SliceVector< T, DYNAMIC_SIZE, DYNAMIC_SIZE >::check_iNumRows
private

Definition at line 1039 of file matvec.h.

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

Definition at line 1013 of file matvec.h.

Definition at line 1012 of file matvec.h.

Constructor & Destructor Documentation

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

Definition at line 1015 of file matvec.h.

Member Function Documentation

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

Definition at line 1030 of file matvec.h.

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

1030  {
1031  return bArrayOverlap(pVec, pVec + (iCurrRows - 1) * iOffset, pFirst, pLast);
1032  }
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 grad::SliceVector< T, DYNAMIC_SIZE, DYNAMIC_SIZE >::iGetNumRows ( void  ) const
inline

Definition at line 1027 of file matvec.h.

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

Definition at line 1020 of file matvec.h.

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

1020  {
1021  --iRow; // row index is 1-based
1022  MATVEC_ASSERT(iRow >= 0);
1023  MATVEC_ASSERT(iRow < iGetNumRows());
1024  return *(pVec + iRow * iOffset);
1025  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64

Here is the call graph for this function:

Member Data Documentation

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

Definition at line 1010 of file matvec.h.

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

Definition at line 1036 of file matvec.h.

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

Definition at line 1011 of file matvec.h.

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

Definition at line 1037 of file matvec.h.

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

Definition at line 1035 of file matvec.h.


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