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

#include <matvec.h>

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

Private Types

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

Private Attributes

const ScalarType *const pVec
 

Detailed Description

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

Definition at line 902 of file matvec.h.

Member Typedef Documentation

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

Definition at line 932 of file matvec.h.

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

Definition at line 933 of file matvec.h.

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

Definition at line 907 of file matvec.h.

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

Definition at line 906 of file matvec.h.

Constructor & Destructor Documentation

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

Definition at line 909 of file matvec.h.

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

910  :pVec(p) {
911  MATVEC_ASSERT(iRows == iNumRows);
912  MATVEC_ASSERT(iOffset = N_offset);
913  }
const ScalarType *const pVec
Definition: matvec.h:930
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
static const index_type iNumRows
Definition: matvec.h:905

Member Function Documentation

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

Definition at line 925 of file matvec.h.

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

925  {
926  return bArrayOverlap(pVec, pVec + (iNumRows - 1) * N_offset, pFirst, pLast);
927  }
const ScalarType *const pVec
Definition: matvec.h:930
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:905

Here is the call graph for this function:

template<typename T , index_type N_rows, index_type N_offset>
index_type grad::SliceVector< T, N_rows, N_offset >::iGetNumRows ( void  ) const
inline
template<typename T , index_type N_rows, index_type N_offset>
const ScalarType& grad::SliceVector< T, N_rows, N_offset >::operator() ( index_type  iRow) const
inline

Definition at line 915 of file matvec.h.

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

915  {
916  --iRow; // row index is 1-based
917  MATVEC_ASSERT(iRow >= 0);
918  MATVEC_ASSERT(iRow < iGetNumRows());
919  return *(pVec + iRow * N_offset);
920  }
const ScalarType *const pVec
Definition: matvec.h:930
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
index_type iGetNumRows() const
Definition: matvec.h:922

Here is the call graph for this function:

Member Data Documentation

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

Definition at line 904 of file matvec.h.


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