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

#include <matvec.h>

Collaboration diagram for grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >:

Public Types

typedef ScalarUnaryFunc::ScalarType ScalarType
 
typedef
ScalarUnaryFunc::ExpressionType 
ExpressionType
 
typedef VectorExpression
< RowVectorExpr
< MatrixMatrixUnaryExpr >
, iNumCols
RowVectorType
 
typedef VectorExpression
< ColumnVectorExpr
< MatrixMatrixUnaryExpr >
, iNumRows
ColumnVectorType
 

Public Member Functions

 MatrixMatrixUnaryExpr (const MatrixExpr &u)
 
ExpressionType operator() (index_type i, index_type j) const
 
index_type iGetNumRows () const
 
index_type iGetNumCols () const
 
RowVectorType GetRow (index_type iRow) const
 
ColumnVectorType GetCol (index_type iCol) const
 
template<typename ScalarType2 >
bool bHaveReferenceTo (const ScalarType2 *pFirst, const ScalarType2 *pLast) const
 

Static Public Attributes

static const bool bAlias = MatrixExpr::bAlias
 
static const index_type iNumRows = MatrixExpr::iNumRows
 
static const index_type iNumCols = MatrixExpr::iNumCols
 

Private Attributes

const MatrixExpr oU
 

Detailed Description

template<typename ScalarUnaryFunc, typename MatrixExpr>
class grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >

Definition at line 1354 of file matvec.h.

Member Typedef Documentation

template<typename ScalarUnaryFunc , typename MatrixExpr >
typedef VectorExpression<ColumnVectorExpr<MatrixMatrixUnaryExpr>, iNumRows> grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::ColumnVectorType

Definition at line 1362 of file matvec.h.

template<typename ScalarUnaryFunc , typename MatrixExpr >
typedef ScalarUnaryFunc::ExpressionType grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::ExpressionType

Definition at line 1360 of file matvec.h.

template<typename ScalarUnaryFunc , typename MatrixExpr >
typedef VectorExpression<RowVectorExpr<MatrixMatrixUnaryExpr>, iNumCols> grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::RowVectorType

Definition at line 1361 of file matvec.h.

template<typename ScalarUnaryFunc , typename MatrixExpr >
typedef ScalarUnaryFunc::ScalarType grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::ScalarType

Definition at line 1359 of file matvec.h.

Constructor & Destructor Documentation

template<typename ScalarUnaryFunc , typename MatrixExpr >
grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::MatrixMatrixUnaryExpr ( const MatrixExpr &  u)
inline

Definition at line 1364 of file matvec.h.

References grad::DYNAMIC_SIZE, grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::iNumCols, grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::iNumRows, MATVEC_ASSERT, and grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::oU.

1365  :oU(u) {
1366  MATVEC_ASSERT((iNumRows == oU.iGetNumRows()) || (iNumRows == DYNAMIC_SIZE && oU.iGetNumRows() >= 0));
1367  MATVEC_ASSERT((iNumCols == oU.iGetNumCols()) || (iNumCols == DYNAMIC_SIZE && oU.iGetNumCols() >= 0));
1368  }
static const index_type DYNAMIC_SIZE
Definition: gradient.h:141
static const index_type iNumCols
Definition: matvec.h:1358
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
const MatrixExpr oU
Definition: matvec.h:1406
static const index_type iNumRows
Definition: matvec.h:1357

Member Function Documentation

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

Definition at line 1401 of file matvec.h.

References grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::oU.

1401  {
1402  return oU.bHaveReferenceTo(pFirst, pLast);
1403  }
const MatrixExpr oU
Definition: matvec.h:1406
template<typename ScalarUnaryFunc , typename MatrixExpr >
ColumnVectorType grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::GetCol ( index_type  iCol) const
inline

Definition at line 1394 of file matvec.h.

References grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::iGetNumCols(), and MATVEC_ASSERT.

1394  {
1395  MATVEC_ASSERT(iCol >= 1);
1396  MATVEC_ASSERT(iCol <= iGetNumCols());
1397  return ColumnVectorType(*this, iCol);
1398  }
VectorExpression< ColumnVectorExpr< MatrixMatrixUnaryExpr >, iNumRows > ColumnVectorType
Definition: matvec.h:1362
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
index_type iGetNumCols() const
Definition: matvec.h:1383

Here is the call graph for this function:

template<typename ScalarUnaryFunc , typename MatrixExpr >
RowVectorType grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::GetRow ( index_type  iRow) const
inline

Definition at line 1388 of file matvec.h.

References grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::iGetNumRows(), and MATVEC_ASSERT.

1388  {
1389  MATVEC_ASSERT(iRow >= 1);
1390  MATVEC_ASSERT(iRow <= iGetNumRows());
1391  return RowVectorType(*this, iRow);
1392  }
index_type iGetNumRows() const
Definition: matvec.h:1378
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
VectorExpression< RowVectorExpr< MatrixMatrixUnaryExpr >, iNumCols > RowVectorType
Definition: matvec.h:1361

Here is the call graph for this function:

template<typename ScalarUnaryFunc , typename MatrixExpr >
index_type grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::iGetNumCols ( void  ) const
inline
template<typename ScalarUnaryFunc , typename MatrixExpr >
index_type grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::iGetNumRows ( void  ) const
inline

Definition at line 1378 of file matvec.h.

References grad::DYNAMIC_SIZE, grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::iNumRows, MATVEC_ASSERT, and grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::oU.

Referenced by grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::GetRow(), and grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::operator()().

1378  {
1379  MATVEC_ASSERT((iNumRows == oU.iGetNumRows()) || (iNumRows == DYNAMIC_SIZE && oU.iGetNumRows() >= 0));
1380  return oU.iGetNumRows();
1381  }
static const index_type DYNAMIC_SIZE
Definition: gradient.h:141
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
const MatrixExpr oU
Definition: matvec.h:1406
static const index_type iNumRows
Definition: matvec.h:1357
template<typename ScalarUnaryFunc , typename MatrixExpr >
ExpressionType grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::operator() ( index_type  i,
index_type  j 
) const
inline

Definition at line 1370 of file matvec.h.

References grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::iGetNumCols(), grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::iGetNumRows(), MATVEC_ASSERT, and grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::oU.

1370  {
1371  MATVEC_ASSERT(i >= 1);
1372  MATVEC_ASSERT(i <= iGetNumRows());
1373  MATVEC_ASSERT(j >= 1);
1374  MATVEC_ASSERT(j <= iGetNumCols());
1375  return ScalarUnaryFunc::f(oU(i, j));
1376  }
index_type iGetNumRows() const
Definition: matvec.h:1378
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
index_type iGetNumCols() const
Definition: matvec.h:1383
const MatrixExpr oU
Definition: matvec.h:1406

Here is the call graph for this function:

Member Data Documentation

template<typename ScalarUnaryFunc , typename MatrixExpr >
const bool grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::bAlias = MatrixExpr::bAlias
static

Definition at line 1356 of file matvec.h.

template<typename ScalarUnaryFunc , typename MatrixExpr >
const index_type grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::iNumCols = MatrixExpr::iNumCols
static
template<typename ScalarUnaryFunc , typename MatrixExpr >
const index_type grad::MatrixMatrixUnaryExpr< ScalarUnaryFunc, MatrixExpr >::iNumRows = MatrixExpr::iNumRows
static

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