MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr > Class Template Reference

#include <matvec.h>

Collaboration diagram for grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >:

Public Types

typedef VectorExpr::ScalarType ScalarType
 
typedef VectorExpr::ExpressionType ExpressionType
 

Public Member Functions

 SubVectorExpr (const VectorExpr &u)
 
ExpressionType operator() (index_type i) const
 
index_type iGetNumRows () const
 
template<typename ScalarType2 >
bool bHaveReferenceTo (const ScalarType2 *pFirst, const ScalarType2 *pLast) const
 

Static Public Attributes

static const bool bAlias = VectorExpr::bAlias
 
static const index_type iNumRows = iEndIndex - iStartIndex + 1
 

Private Types

typedef MaxSizeCheck
< iEndIndex
<=VectorExpr::iNumRows >
::CheckType check_iEndIndex;typedef
typename MaxSizeCheck
< iStartIndex >=1 >::CheckType 
check_iStartIndex
 
typedef MaxSizeCheck
< VectorExpr::iNumRows!=DYNAMIC_SIZE >
::CheckType 
check_iStaticSize
 

Private Attributes

const VectorExpr oU
 

Detailed Description

template<index_type iStartIndex, index_type iEndIndex, typename VectorExpr>
class grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >

Definition at line 803 of file matvec.h.

Member Typedef Documentation

template<index_type iStartIndex, index_type iEndIndex, typename VectorExpr >
typedef MaxSizeCheck<iEndIndex <= VectorExpr::iNumRows>::CheckType check_iEndIndex; typedef typename MaxSizeCheck<iStartIndex >= 1>::CheckType grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::check_iStartIndex
private

Definition at line 833 of file matvec.h.

template<index_type iStartIndex, index_type iEndIndex, typename VectorExpr >
typedef MaxSizeCheck<VectorExpr::iNumRows != DYNAMIC_SIZE>::CheckType grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::check_iStaticSize
private

Definition at line 834 of file matvec.h.

template<index_type iStartIndex, index_type iEndIndex, typename VectorExpr >
typedef VectorExpr::ExpressionType grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::ExpressionType

Definition at line 808 of file matvec.h.

template<index_type iStartIndex, index_type iEndIndex, typename VectorExpr >
typedef VectorExpr::ScalarType grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::ScalarType

Definition at line 807 of file matvec.h.

Constructor & Destructor Documentation

template<index_type iStartIndex, index_type iEndIndex, typename VectorExpr >
grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::SubVectorExpr ( const VectorExpr &  u)
inline

Definition at line 810 of file matvec.h.

811  :oU(u) {
812 
813  }
const VectorExpr oU
Definition: matvec.h:835

Member Function Documentation

template<index_type iStartIndex, index_type iEndIndex, typename VectorExpr >
template<typename ScalarType2 >
bool grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::bHaveReferenceTo ( const ScalarType2 *  pFirst,
const ScalarType2 *  pLast 
) const
inline

Definition at line 827 of file matvec.h.

References grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::oU.

827  {
828  return oU.bHaveReferenceTo(pFirst, pLast);
829  }
const VectorExpr oU
Definition: matvec.h:835
template<index_type iStartIndex, index_type iEndIndex, typename VectorExpr >
index_type grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::iGetNumRows ( void  ) const
inline

Definition at line 821 of file matvec.h.

References grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::iNumRows, MATVEC_ASSERT, and grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::oU.

821  {
822  MATVEC_ASSERT(oU.iGetNumRows() == VectorExpr::iNumRows);
823  return iNumRows;
824  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
static const index_type iNumRows
Definition: matvec.h:806
const VectorExpr oU
Definition: matvec.h:835
template<index_type iStartIndex, index_type iEndIndex, typename VectorExpr >
ExpressionType grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::operator() ( index_type  i) const
inline

Definition at line 815 of file matvec.h.

References grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::iNumRows, MATVEC_ASSERT, and grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::oU.

815  {
816  MATVEC_ASSERT(i >= 1);
817  MATVEC_ASSERT(i <= iNumRows);
818  return oU(i + iStartIndex - 1);
819  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
static const index_type iNumRows
Definition: matvec.h:806
const VectorExpr oU
Definition: matvec.h:835

Member Data Documentation

template<index_type iStartIndex, index_type iEndIndex, typename VectorExpr >
const bool grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::bAlias = VectorExpr::bAlias
static

Definition at line 805 of file matvec.h.

template<index_type iStartIndex, index_type iEndIndex, typename VectorExpr >
const index_type grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::iNumRows = iEndIndex - iStartIndex + 1
static
template<index_type iStartIndex, index_type iEndIndex, typename VectorExpr >
const VectorExpr grad::SubVectorExpr< iStartIndex, iEndIndex, VectorExpr >::oU
private

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