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

#include <matvec.h>

Collaboration diagram for grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >:

Public Types

typedef ScalarUnaryFunc::ScalarType ScalarType
 
typedef
ScalarUnaryFunc::ExpressionType 
ExpressionType
 

Public Member Functions

 VectorVectorUnaryExpr (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 = VectorExpr::iNumRows
 

Private Attributes

const VectorExpr oU
 

Detailed Description

template<typename ScalarUnaryFunc, typename VectorExpr>
class grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >

This class handles expressions of the form f(vector1) = vector2

Definition at line 770 of file matvec.h.

Member Typedef Documentation

template<typename ScalarUnaryFunc , typename VectorExpr >
typedef ScalarUnaryFunc::ExpressionType grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::ExpressionType

Definition at line 775 of file matvec.h.

template<typename ScalarUnaryFunc , typename VectorExpr >
typedef ScalarUnaryFunc::ScalarType grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::ScalarType

Definition at line 774 of file matvec.h.

Constructor & Destructor Documentation

template<typename ScalarUnaryFunc , typename VectorExpr >
grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::VectorVectorUnaryExpr ( const VectorExpr &  u)
inline

Definition at line 777 of file matvec.h.

778  :oU(u) {
779 
780  }
const VectorExpr oU
Definition: matvec.h:799

Member Function Documentation

template<typename ScalarUnaryFunc , typename VectorExpr >
template<typename ScalarType2 >
bool grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::bHaveReferenceTo ( const ScalarType2 *  pFirst,
const ScalarType2 *  pLast 
) const
inline

Definition at line 794 of file matvec.h.

References grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::oU.

794  {
795  return oU.bHaveReferenceTo(pFirst, pLast);
796  }
const VectorExpr oU
Definition: matvec.h:799
template<typename ScalarUnaryFunc , typename VectorExpr >
index_type grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::iGetNumRows ( void  ) const
inline

Definition at line 788 of file matvec.h.

References grad::DYNAMIC_SIZE, grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::iNumRows, MATVEC_ASSERT, and grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::oU.

Referenced by grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::operator()().

788  {
789  MATVEC_ASSERT((oU.iGetNumRows() == iNumRows) || (iNumRows == DYNAMIC_SIZE && oU.iGetNumRows() >= 0));
790  return oU.iGetNumRows();
791  }
static const index_type DYNAMIC_SIZE
Definition: gradient.h:141
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
const VectorExpr oU
Definition: matvec.h:799
static const index_type iNumRows
Definition: matvec.h:773
template<typename ScalarUnaryFunc , typename VectorExpr >
ExpressionType grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::operator() ( index_type  i) const
inline

Definition at line 782 of file matvec.h.

References grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::iGetNumRows(), MATVEC_ASSERT, and grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::oU.

782  {
783  MATVEC_ASSERT(i >= 1);
784  MATVEC_ASSERT(i <= iGetNumRows());
785  return ScalarUnaryFunc::f(oU(i));
786  }
index_type iGetNumRows() const
Definition: matvec.h:788
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
const VectorExpr oU
Definition: matvec.h:799

Here is the call graph for this function:

Member Data Documentation

template<typename ScalarUnaryFunc , typename VectorExpr >
const bool grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::bAlias = VectorExpr::bAlias
static

Definition at line 772 of file matvec.h.

template<typename ScalarUnaryFunc , typename VectorExpr >
const index_type grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::iNumRows = VectorExpr::iNumRows
static
template<typename ScalarUnaryFunc , typename VectorExpr >
const VectorExpr grad::VectorVectorUnaryExpr< ScalarUnaryFunc, VectorExpr >::oU
private

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