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

#include <matvec.h>

Collaboration diagram for grad::SliceVector< T, N_rows, 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 = N_rows
 

Private Types

typedef MaxSizeCheck
< iNumRows!=DYNAMIC_SIZE >
::CheckType 
check_iNumRows
 

Private Attributes

const ScalarType *const pVec
 
const index_type iOffset
 

Detailed Description

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

Definition at line 937 of file matvec.h.

Member Typedef Documentation

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

Definition at line 968 of file matvec.h.

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

Definition at line 942 of file matvec.h.

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

Definition at line 941 of file matvec.h.

Constructor & Destructor Documentation

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

Definition at line 944 of file matvec.h.

References grad::SliceVector< T, N_rows, N_offset >::iNumRows, and MATVEC_ASSERT.

945  :pVec(p), iOffset(iOffset) {
946 
947  MATVEC_ASSERT(iRows == iNumRows);
948  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
static const index_type iNumRows
Definition: matvec.h:940

Member Function Documentation

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

Definition at line 960 of file matvec.h.

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

960  {
961  return bArrayOverlap(pVec, pVec + (iNumRows - 1) * iOffset, pFirst, pLast);
962  }
bool bArrayOverlap(const ScalarType *pFirstArray1, const ScalarType *pLastArray1, const ScalarType *pFirstArray2, const ScalarType *pLastArray2)
Definition: matvec.h:430
static const index_type iNumRows
Definition: matvec.h:940

Here is the call graph for this function:

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

Definition at line 957 of file matvec.h.

References grad::SliceVector< T, N_rows, N_offset >::iNumRows.

957 { return iNumRows; }
static const index_type iNumRows
Definition: matvec.h:940
template<typename T , index_type N_rows>
const ScalarType& grad::SliceVector< T, N_rows, DYNAMIC_SIZE >::operator() ( index_type  iRow) const
inline

Definition at line 950 of file matvec.h.

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

950  {
951  --iRow; // row index is 1-based
952  MATVEC_ASSERT(iRow >= 0);
953  MATVEC_ASSERT(iRow < iGetNumRows());
954  return *(pVec + iRow * iOffset);
955  }
#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_rows>
const bool grad::SliceVector< T, N_rows, DYNAMIC_SIZE >::bAlias = MatVecHelp::AliasTypeHelper<T>::bAlias
static

Definition at line 939 of file matvec.h.

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

Definition at line 940 of file matvec.h.

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

Definition at line 966 of file matvec.h.

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

Definition at line 965 of file matvec.h.


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