MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr > Class Template Reference

#include <matvec.h>

Collaboration diagram for grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >:

Public Types

typedef MatrixLhsExpr::ScalarType MatrixLhsScalarExpr
 
typedef VectorRhsExpr::ScalarType VectorRhsScalarExpr
 
typedef
MatrixLhsExpr::RowVectorType 
MatrixLhsRowVector
 
typedef CommonScalarType
< typename BasicScalarType
< MatrixLhsScalarExpr >
::ScalarType, typename
BasicScalarType
< VectorRhsScalarExpr >
::ScalarType >::ScalarType 
ScalarType
 
typedef DotTraits
< MatrixLhsRowVector,
VectorRhsExpr,
MatrixLhsExpr::iNumCols,
MatrixLhsExpr::iNumCols >
::ExpressionType 
ExpressionType
 

Public Member Functions

 MatrixVectorProduct (const MatrixLhsExpr &A, const VectorRhsExpr &x)
 
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 = MatrixLhsExpr::bAlias || VectorRhsExpr::bAlias
 
static const index_type iNumRows = MatrixLhsExpr::iNumRows
 

Private Types

typedef IndexCheck< N_rows-MatrixLhsExpr::iNumRows >
::CheckType 
check_iNumRowsLhs
 
typedef IndexCheck< N_cols-MatrixLhsExpr::iNumCols >
::CheckType 
check_iNumColsLhs
 
typedef IndexCheck< N_cols-VectorRhsExpr::iNumRows >
::CheckType 
check_iNumRowsRhs
 
typedef MaxSizeCheck< N_rows!=DYNAMIC_SIZE >
::CheckType 
check_iNumRowsDynamic
 
typedef MaxSizeCheck< N_cols!=DYNAMIC_SIZE >
::CheckType 
check_iNumColsDynamic
 

Private Attributes

const MatrixLhsExpr A
 
const VectorRhsExpr x
 

Detailed Description

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr, typename VectorRhsExpr>
class grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >

Definition at line 3292 of file matvec.h.

Member Typedef Documentation

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
typedef MaxSizeCheck<N_cols != DYNAMIC_SIZE>::CheckType grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::check_iNumColsDynamic
private

Definition at line 3329 of file matvec.h.

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
typedef IndexCheck<N_cols - MatrixLhsExpr::iNumCols>::CheckType grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::check_iNumColsLhs
private

Definition at line 3326 of file matvec.h.

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
typedef MaxSizeCheck<N_rows != DYNAMIC_SIZE>::CheckType grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::check_iNumRowsDynamic
private

Definition at line 3328 of file matvec.h.

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
typedef IndexCheck<N_rows - MatrixLhsExpr::iNumRows>::CheckType grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::check_iNumRowsLhs
private

Definition at line 3325 of file matvec.h.

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
typedef IndexCheck<N_cols - VectorRhsExpr::iNumRows>::CheckType grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::check_iNumRowsRhs
private

Definition at line 3327 of file matvec.h.

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
typedef DotTraits<MatrixLhsRowVector, VectorRhsExpr, MatrixLhsExpr::iNumCols, MatrixLhsExpr::iNumCols>::ExpressionType grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::ExpressionType

Definition at line 3301 of file matvec.h.

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
typedef MatrixLhsExpr::RowVectorType grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::MatrixLhsRowVector

Definition at line 3298 of file matvec.h.

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
typedef MatrixLhsExpr::ScalarType grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::MatrixLhsScalarExpr

Definition at line 3296 of file matvec.h.

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
typedef CommonScalarType<typename BasicScalarType<MatrixLhsScalarExpr>::ScalarType, typename BasicScalarType<VectorRhsScalarExpr>::ScalarType>::ScalarType grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::ScalarType

Definition at line 3300 of file matvec.h.

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
typedef VectorRhsExpr::ScalarType grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::VectorRhsScalarExpr

Definition at line 3297 of file matvec.h.

Constructor & Destructor Documentation

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::MatrixVectorProduct ( const MatrixLhsExpr &  A,
const VectorRhsExpr &  x 
)
inline

Definition at line 3303 of file matvec.h.

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

3304  :A(A), x(x) {
3305  MATVEC_ASSERT(iNumRows == A.iGetNumRows());
3306  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
const MatrixLhsExpr A
Definition: matvec.h:3331
static const index_type iNumRows
Definition: matvec.h:3295
const VectorRhsExpr x
Definition: matvec.h:3332

Member Function Documentation

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
template<typename ScalarType2 >
bool grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::bHaveReferenceTo ( const ScalarType2 *  pFirst,
const ScalarType2 *  pLast 
) const
inline

Definition at line 3320 of file matvec.h.

3320  {
3321  return A.bHaveReferenceTo(pFirst, pLast) || x.bHaveReferenceTo(pFirst, pLast);
3322  }
const MatrixLhsExpr A
Definition: matvec.h:3331
const VectorRhsExpr x
Definition: matvec.h:3332
template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
index_type grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::iGetNumRows ( void  ) const
inline

Definition at line 3314 of file matvec.h.

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

3314  {
3315  MATVEC_ASSERT(iNumRows == A.iGetNumRows());
3316  return A.iGetNumRows();
3317  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
const MatrixLhsExpr A
Definition: matvec.h:3331
static const index_type iNumRows
Definition: matvec.h:3295
template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
ExpressionType grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::operator() ( index_type  i) const
inline

Definition at line 3308 of file matvec.h.

References grad::Dot(), grad::Vector< T, N_rows >::iGetNumRows(), and MATVEC_ASSERT.

3308  {
3309  MATVEC_ASSERT(i >= 1);
3310  MATVEC_ASSERT(i <= iGetNumRows());
3311  return Dot(A.GetRow(i), x);
3312  }
index_type iGetNumRows() const
Definition: matvec.h:3314
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
const MatrixLhsExpr A
Definition: matvec.h:3331
DotTraits< VectorExprLhs, VectorExprRhs, N_rows, N_rows >::ExpressionType Dot(const VectorExpression< VectorExprLhs, N_rows > &u, const VectorExpression< VectorExprRhs, N_rows > &v)
Definition: matvec.h:3133
const VectorRhsExpr x
Definition: matvec.h:3332

Here is the call graph for this function:

Member Data Documentation

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
const MatrixLhsExpr grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::A
private

Definition at line 3331 of file matvec.h.

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
const bool grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::bAlias = MatrixLhsExpr::bAlias || VectorRhsExpr::bAlias
static

Definition at line 3294 of file matvec.h.

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
const index_type grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::iNumRows = MatrixLhsExpr::iNumRows
static

Definition at line 3295 of file matvec.h.

template<index_type N_rows, index_type N_cols, typename MatrixLhsExpr , typename VectorRhsExpr >
const VectorRhsExpr grad::MatrixVectorProduct< N_rows, N_cols, MatrixLhsExpr, VectorRhsExpr >::x
private

Definition at line 3332 of file matvec.h.


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