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

#include <matvec.h>

Collaboration diagram for grad::MatrixDirectExpr< MatrixType, ALIAS >:

Public Types

typedef MatrixType::ScalarType ScalarType
 
typedef MatrixType::ExpressionType ExpressionType
 
typedef MatrixType::RowVectorType RowVectorType
 
typedef
MatrixType::ColumnVectorType 
ColumnVectorType
 

Public Member Functions

 MatrixDirectExpr (const MatrixType &A)
 
const ScalarTypeoperator() (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 = ALIAS
 
static const index_type iNumRows = MatrixType::iNumRows
 
static const index_type iNumCols = MatrixType::iNumCols
 

Private Attributes

const MatrixType & A
 

Detailed Description

template<typename MatrixType, bool ALIAS = false>
class grad::MatrixDirectExpr< MatrixType, ALIAS >

Definition at line 1410 of file matvec.h.

Member Typedef Documentation

template<typename MatrixType , bool ALIAS = false>
typedef MatrixType::ColumnVectorType grad::MatrixDirectExpr< MatrixType, ALIAS >::ColumnVectorType

Definition at line 1418 of file matvec.h.

template<typename MatrixType , bool ALIAS = false>
typedef MatrixType::ExpressionType grad::MatrixDirectExpr< MatrixType, ALIAS >::ExpressionType

Definition at line 1416 of file matvec.h.

template<typename MatrixType , bool ALIAS = false>
typedef MatrixType::RowVectorType grad::MatrixDirectExpr< MatrixType, ALIAS >::RowVectorType

Definition at line 1417 of file matvec.h.

template<typename MatrixType , bool ALIAS = false>
typedef MatrixType::ScalarType grad::MatrixDirectExpr< MatrixType, ALIAS >::ScalarType

Definition at line 1415 of file matvec.h.

Constructor & Destructor Documentation

template<typename MatrixType , bool ALIAS = false>
grad::MatrixDirectExpr< MatrixType, ALIAS >::MatrixDirectExpr ( const MatrixType &  A)
inline

Definition at line 1420 of file matvec.h.

References grad::DYNAMIC_SIZE, grad::MatrixDirectExpr< MatrixType, ALIAS >::iNumCols, grad::MatrixDirectExpr< MatrixType, ALIAS >::iNumRows, and MATVEC_ASSERT.

1421  :A(A) {
1422  MATVEC_ASSERT((iNumRows == A.iGetNumRows()) || (iNumRows == DYNAMIC_SIZE && A.iGetNumRows() >= 0));
1423  MATVEC_ASSERT((iNumCols == A.iGetNumCols()) || (iNumCols == DYNAMIC_SIZE && A.iGetNumCols() >= 0));
1424  }
static const index_type iNumRows
Definition: matvec.h:1413
static const index_type DYNAMIC_SIZE
Definition: gradient.h:141
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
static const index_type iNumCols
Definition: matvec.h:1414
const MatrixType & A
Definition: matvec.h:1462

Member Function Documentation

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

Definition at line 1457 of file matvec.h.

References grad::MatrixDirectExpr< MatrixType, ALIAS >::A.

1457  {
1458  return A.bHaveReferenceTo(pFirst, pLast);
1459  }
const MatrixType & A
Definition: matvec.h:1462
template<typename MatrixType , bool ALIAS = false>
ColumnVectorType grad::MatrixDirectExpr< MatrixType, ALIAS >::GetCol ( index_type  iCol) const
inline

Definition at line 1450 of file matvec.h.

References grad::MatrixDirectExpr< MatrixType, ALIAS >::A, grad::MatrixDirectExpr< MatrixType, ALIAS >::iGetNumCols(), and MATVEC_ASSERT.

1450  {
1451  MATVEC_ASSERT(iCol >= 1);
1452  MATVEC_ASSERT(iCol <= iGetNumCols());
1453  return A.GetCol(iCol);
1454  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
index_type iGetNumCols() const
Definition: matvec.h:1439
const MatrixType & A
Definition: matvec.h:1462

Here is the call graph for this function:

template<typename MatrixType , bool ALIAS = false>
RowVectorType grad::MatrixDirectExpr< MatrixType, ALIAS >::GetRow ( index_type  iRow) const
inline

Definition at line 1444 of file matvec.h.

References grad::MatrixDirectExpr< MatrixType, ALIAS >::A, grad::MatrixDirectExpr< MatrixType, ALIAS >::iGetNumRows(), and MATVEC_ASSERT.

1444  {
1445  MATVEC_ASSERT(iRow >= 1);
1446  MATVEC_ASSERT(iRow <= iGetNumRows());
1447  return A.GetRow(iRow);
1448  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
const MatrixType & A
Definition: matvec.h:1462
index_type iGetNumRows() const
Definition: matvec.h:1434

Here is the call graph for this function:

template<typename MatrixType , bool ALIAS = false>
index_type grad::MatrixDirectExpr< MatrixType, ALIAS >::iGetNumCols ( void  ) const
inline

Definition at line 1439 of file matvec.h.

References grad::MatrixDirectExpr< MatrixType, ALIAS >::A, grad::DYNAMIC_SIZE, grad::MatrixDirectExpr< MatrixType, ALIAS >::iNumCols, and MATVEC_ASSERT.

Referenced by grad::MatrixDirectExpr< MatrixType, ALIAS >::GetCol(), and grad::MatrixDirectExpr< MatrixType, ALIAS >::operator()().

1439  {
1440  MATVEC_ASSERT((iNumCols == A.iGetNumCols()) || (iNumCols == DYNAMIC_SIZE && A.iGetNumCols() >= 0));
1441  return A.iGetNumCols();
1442  }
static const index_type DYNAMIC_SIZE
Definition: gradient.h:141
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
static const index_type iNumCols
Definition: matvec.h:1414
const MatrixType & A
Definition: matvec.h:1462
template<typename MatrixType , bool ALIAS = false>
index_type grad::MatrixDirectExpr< MatrixType, ALIAS >::iGetNumRows ( void  ) const
inline

Definition at line 1434 of file matvec.h.

References grad::MatrixDirectExpr< MatrixType, ALIAS >::A, grad::DYNAMIC_SIZE, grad::MatrixDirectExpr< MatrixType, ALIAS >::iNumRows, and MATVEC_ASSERT.

Referenced by grad::MatrixDirectExpr< MatrixType, ALIAS >::GetRow(), and grad::MatrixDirectExpr< MatrixType, ALIAS >::operator()().

1434  {
1435  MATVEC_ASSERT((iNumRows == A.iGetNumRows()) || (iNumRows == DYNAMIC_SIZE && A.iGetNumRows() >= 0));
1436  return A.iGetNumRows();
1437  }
static const index_type iNumRows
Definition: matvec.h:1413
static const index_type DYNAMIC_SIZE
Definition: gradient.h:141
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
const MatrixType & A
Definition: matvec.h:1462
template<typename MatrixType , bool ALIAS = false>
const ScalarType& grad::MatrixDirectExpr< MatrixType, ALIAS >::operator() ( index_type  i,
index_type  j 
) const
inline

Definition at line 1426 of file matvec.h.

References grad::MatrixDirectExpr< MatrixType, ALIAS >::A, grad::MatrixDirectExpr< MatrixType, ALIAS >::iGetNumCols(), grad::MatrixDirectExpr< MatrixType, ALIAS >::iGetNumRows(), and MATVEC_ASSERT.

1426  {
1427  MATVEC_ASSERT(i >= 1);
1428  MATVEC_ASSERT(i <= iGetNumRows());
1429  MATVEC_ASSERT(j >= 1);
1430  MATVEC_ASSERT(j <= iGetNumCols());
1431  return A(i, j);
1432  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
index_type iGetNumCols() const
Definition: matvec.h:1439
const MatrixType & A
Definition: matvec.h:1462
index_type iGetNumRows() const
Definition: matvec.h:1434

Here is the call graph for this function:

Member Data Documentation

template<typename MatrixType , bool ALIAS = false>
const bool grad::MatrixDirectExpr< MatrixType, ALIAS >::bAlias = ALIAS
static

Definition at line 1412 of file matvec.h.

template<typename MatrixType , bool ALIAS = false>
const index_type grad::MatrixDirectExpr< MatrixType, ALIAS >::iNumCols = MatrixType::iNumCols
static
template<typename MatrixType , bool ALIAS = false>
const index_type grad::MatrixDirectExpr< MatrixType, ALIAS >::iNumRows = MatrixType::iNumRows
static

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