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

#include <matvec.h>

Collaboration diagram for grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >:

Public Types

typedef MatrixLhsExpr::ScalarType MatrixLhsScalarExpr
 
typedef MatrixRhsExpr::ScalarType MatrixRhsScalarExpr
 
typedef
MatrixLhsExpr::RowVectorType 
MatrixLhsRowVector
 
typedef
MatrixRhsExpr::ColumnVectorType 
MatrixRhsColumnVector
 
typedef VectorExpression
< RowVectorExpr
< MatrixMatrixProduct >
, iNumCols
RowVectorType
 
typedef VectorExpression
< ColumnVectorExpr
< MatrixMatrixProduct >
, iNumRows
ColumnVectorType
 
typedef CommonScalarType
< typename BasicScalarType
< MatrixLhsScalarExpr >
::ScalarType, typename
BasicScalarType
< MatrixRhsScalarExpr >
::ScalarType >::ScalarType 
ScalarType
 
typedef DotTraits
< MatrixLhsRowVector,
MatrixRhsColumnVector,
MatrixLhsExpr::iNumCols,
MatrixLhsExpr::iNumCols >
::ExpressionType 
ExpressionType
 

Public Member Functions

 MatrixMatrixProduct (const MatrixLhsExpr &A, const MatrixRhsExpr &B)
 
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 = MatrixLhsExpr::bAlias || MatrixRhsExpr::bAlias
 
static const index_type iNumRows = MatrixLhsExpr::iNumRows
 
static const index_type iNumCols = MatrixRhsExpr::iNumCols
 

Private Attributes

const MatrixLhsExpr A
 
const MatrixRhsExpr B
 

Detailed Description

template<typename MatrixLhsExpr, typename MatrixRhsExpr>
class grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >

Definition at line 3399 of file matvec.h.

Member Typedef Documentation

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
typedef VectorExpression<ColumnVectorExpr<MatrixMatrixProduct>, iNumRows> grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::ColumnVectorType

Definition at line 3409 of file matvec.h.

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
typedef DotTraits<MatrixLhsRowVector, MatrixRhsColumnVector, MatrixLhsExpr::iNumCols, MatrixLhsExpr::iNumCols>::ExpressionType grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::ExpressionType

Definition at line 3412 of file matvec.h.

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
typedef MatrixLhsExpr::RowVectorType grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::MatrixLhsRowVector

Definition at line 3406 of file matvec.h.

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
typedef MatrixLhsExpr::ScalarType grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::MatrixLhsScalarExpr

Definition at line 3404 of file matvec.h.

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
typedef MatrixRhsExpr::ColumnVectorType grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::MatrixRhsColumnVector

Definition at line 3407 of file matvec.h.

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
typedef MatrixRhsExpr::ScalarType grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::MatrixRhsScalarExpr

Definition at line 3405 of file matvec.h.

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
typedef VectorExpression<RowVectorExpr<MatrixMatrixProduct>, iNumCols> grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::RowVectorType

Definition at line 3408 of file matvec.h.

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
typedef CommonScalarType<typename BasicScalarType<MatrixLhsScalarExpr>::ScalarType, typename BasicScalarType<MatrixRhsScalarExpr>::ScalarType>::ScalarType grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::ScalarType

Definition at line 3411 of file matvec.h.

Constructor & Destructor Documentation

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::MatrixMatrixProduct ( const MatrixLhsExpr &  A,
const MatrixRhsExpr &  B 
)
inline

Definition at line 3414 of file matvec.h.

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

3415  :A(A), B(B) {
3416  MATVEC_ASSERT(A.iGetNumRows() == iNumRows);
3417  MATVEC_ASSERT(B.iGetNumCols() == iNumCols);
3418  MATVEC_ASSERT(A.iGetNumCols() == B.iGetNumRows());
3419  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
const MatrixLhsExpr A
Definition: matvec.h:3457
static const index_type iNumCols
Definition: matvec.h:3403
const MatrixRhsExpr B
Definition: matvec.h:3458
static const index_type iNumRows
Definition: matvec.h:3402

Member Function Documentation

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
template<typename ScalarType2 >
bool grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::bHaveReferenceTo ( const ScalarType2 *  pFirst,
const ScalarType2 *  pLast 
) const
inline

Definition at line 3452 of file matvec.h.

3452  {
3453  return A.bHaveReferenceTo(pFirst, pLast) || B.bHaveReferenceTo(pFirst, pLast);
3454  }
const MatrixLhsExpr A
Definition: matvec.h:3457
const MatrixRhsExpr B
Definition: matvec.h:3458
template<typename MatrixLhsExpr , typename MatrixRhsExpr >
ColumnVectorType grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::GetCol ( index_type  iCol) const
inline

Definition at line 3445 of file matvec.h.

References MATVEC_ASSERT.

3445  {
3446  MATVEC_ASSERT(iCol >= 1);
3447  MATVEC_ASSERT(iCol <= iNumCols);
3448  return ColumnVectorType(*this, iCol);
3449  }
VectorExpression< ColumnVectorExpr< MatrixMatrixProduct >, iNumRows > ColumnVectorType
Definition: matvec.h:3409
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
static const index_type iNumCols
Definition: matvec.h:3403
template<typename MatrixLhsExpr , typename MatrixRhsExpr >
RowVectorType grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::GetRow ( index_type  iRow) const
inline

Definition at line 3439 of file matvec.h.

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

3439  {
3440  MATVEC_ASSERT(iRow >= 1);
3441  MATVEC_ASSERT(iRow <= iNumRows);
3442  return RowVectorType(*this, iRow);
3443  }
VectorExpression< RowVectorExpr< MatrixMatrixProduct >, iNumCols > RowVectorType
Definition: matvec.h:3408
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
static const index_type iNumRows
Definition: matvec.h:3402
template<typename MatrixLhsExpr , typename MatrixRhsExpr >
index_type grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::iGetNumCols ( void  ) const
inline

Definition at line 3434 of file matvec.h.

References MATVEC_ASSERT.

3434  {
3435  MATVEC_ASSERT(iNumCols == B.iGetNumCols());
3436  return B.iGetNumCols();
3437  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
static const index_type iNumCols
Definition: matvec.h:3403
const MatrixRhsExpr B
Definition: matvec.h:3458
template<typename MatrixLhsExpr , typename MatrixRhsExpr >
index_type grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::iGetNumRows ( void  ) const
inline

Definition at line 3429 of file matvec.h.

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

3429  {
3430  MATVEC_ASSERT(iNumRows == A.iGetNumRows());
3431  return A.iGetNumRows();
3432  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
const MatrixLhsExpr A
Definition: matvec.h:3457
static const index_type iNumRows
Definition: matvec.h:3402
template<typename MatrixLhsExpr , typename MatrixRhsExpr >
ExpressionType grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::operator() ( index_type  i,
index_type  j 
) const
inline

Definition at line 3421 of file matvec.h.

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

3421  {
3422  MATVEC_ASSERT(i >= 1);
3423  MATVEC_ASSERT(i <= iGetNumRows());
3424  MATVEC_ASSERT(j >= 1);
3425  MATVEC_ASSERT(j <= iGetNumCols());
3426  return Dot(A.GetRow(i), B.GetCol(j));
3427  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
index_type iGetNumRows() const
Definition: matvec.h:3429
index_type iGetNumCols() const
Definition: matvec.h:3434
const MatrixLhsExpr A
Definition: matvec.h:3457
const MatrixRhsExpr B
Definition: matvec.h:3458
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

Here is the call graph for this function:

Member Data Documentation

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
const MatrixLhsExpr grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::A
private

Definition at line 3457 of file matvec.h.

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
const MatrixRhsExpr grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::B
private

Definition at line 3458 of file matvec.h.

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
const bool grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::bAlias = MatrixLhsExpr::bAlias || MatrixRhsExpr::bAlias
static

Definition at line 3401 of file matvec.h.

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
const index_type grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::iNumCols = MatrixRhsExpr::iNumCols
static

Definition at line 3403 of file matvec.h.

template<typename MatrixLhsExpr , typename MatrixRhsExpr >
const index_type grad::MatrixMatrixProduct< MatrixLhsExpr, MatrixRhsExpr >::iNumRows = MatrixLhsExpr::iNumRows
static

Definition at line 3402 of file matvec.h.


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