MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
grad::VectorDirectExpr< VectorType, ALIAS > Class Template Reference

#include <matvec.h>

Collaboration diagram for grad::VectorDirectExpr< VectorType, ALIAS >:

Public Types

typedef VectorType::ScalarType ScalarType
 
typedef VectorType::ExpressionType ExpressionType
 

Public Member Functions

 VectorDirectExpr (const VectorType &u)
 
const ScalarTypeoperator() (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 = ALIAS
 
static const index_type iNumRows = VectorType::iNumRows
 

Private Attributes

const VectorType & oU
 

Detailed Description

template<typename VectorType, bool ALIAS = false>
class grad::VectorDirectExpr< VectorType, ALIAS >

Definition at line 839 of file matvec.h.

Member Typedef Documentation

template<typename VectorType , bool ALIAS = false>
typedef VectorType::ExpressionType grad::VectorDirectExpr< VectorType, ALIAS >::ExpressionType

Definition at line 844 of file matvec.h.

template<typename VectorType , bool ALIAS = false>
typedef VectorType::ScalarType grad::VectorDirectExpr< VectorType, ALIAS >::ScalarType

Definition at line 843 of file matvec.h.

Constructor & Destructor Documentation

template<typename VectorType , bool ALIAS = false>
grad::VectorDirectExpr< VectorType, ALIAS >::VectorDirectExpr ( const VectorType &  u)
inline

Definition at line 846 of file matvec.h.

847  :oU(u) {
848  }
const VectorType & oU
Definition: matvec.h:867

Member Function Documentation

template<typename VectorType , bool ALIAS = false>
template<typename ScalarType2 >
bool grad::VectorDirectExpr< VectorType, ALIAS >::bHaveReferenceTo ( const ScalarType2 *  pFirst,
const ScalarType2 *  pLast 
) const
inline

Definition at line 862 of file matvec.h.

References grad::VectorDirectExpr< VectorType, ALIAS >::oU.

862  {
863  return oU.bHaveReferenceTo(pFirst, pLast);
864  }
const VectorType & oU
Definition: matvec.h:867
template<typename VectorType , bool ALIAS = false>
index_type grad::VectorDirectExpr< VectorType, ALIAS >::iGetNumRows ( void  ) const
inline

Definition at line 856 of file matvec.h.

References grad::DYNAMIC_SIZE, grad::VectorDirectExpr< VectorType, ALIAS >::iNumRows, MATVEC_ASSERT, and grad::VectorDirectExpr< VectorType, ALIAS >::oU.

Referenced by grad::VectorDirectExpr< VectorType, ALIAS >::operator()().

856  {
857  MATVEC_ASSERT((oU.iGetNumRows() == iNumRows) || (iNumRows == DYNAMIC_SIZE && oU.iGetNumRows() >= 0));
858  return oU.iGetNumRows();
859  }
static const index_type DYNAMIC_SIZE
Definition: gradient.h:141
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
const VectorType & oU
Definition: matvec.h:867
static const index_type iNumRows
Definition: matvec.h:842
template<typename VectorType , bool ALIAS = false>
const ScalarType& grad::VectorDirectExpr< VectorType, ALIAS >::operator() ( index_type  i) const
inline

Definition at line 850 of file matvec.h.

References grad::VectorDirectExpr< VectorType, ALIAS >::iGetNumRows(), MATVEC_ASSERT, and grad::VectorDirectExpr< VectorType, ALIAS >::oU.

850  {
851  MATVEC_ASSERT(i >= 1);
852  MATVEC_ASSERT(i <= iGetNumRows());
853  return oU(i);
854  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
index_type iGetNumRows() const
Definition: matvec.h:856
const VectorType & oU
Definition: matvec.h:867

Here is the call graph for this function:

Member Data Documentation

template<typename VectorType , bool ALIAS = false>
const bool grad::VectorDirectExpr< VectorType, ALIAS >::bAlias = ALIAS
static

Definition at line 841 of file matvec.h.

template<typename VectorType , bool ALIAS = false>
const index_type grad::VectorDirectExpr< VectorType, ALIAS >::iNumRows = VectorType::iNumRows
static

Definition at line 842 of file matvec.h.

Referenced by grad::VectorDirectExpr< VectorType, ALIAS >::iGetNumRows().

template<typename VectorType , bool ALIAS = false>
const VectorType& grad::VectorDirectExpr< VectorType, ALIAS >::oU
private

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