MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr > Class Template Reference

#include <matvec.h>

Collaboration diagram for grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >:

Public Types

typedef VectorExpression
< SubVectorExpr< iColStart,
iColEnd, typename
MatrixExpr::RowVectorType >
, iNumCols
RowVectorType
 
typedef VectorExpression
< SubVectorExpr< iRowStart,
iRowEnd, typename
MatrixExpr::ColumnVectorType >
, iNumRows
ColumnVectorType
 
typedef MatrixExpr::ScalarType ScalarType
 
typedef MatrixExpr::ExpressionType ExpressionType
 

Public Member Functions

 SubMatrixExpr (const MatrixExpr &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 = MatrixExpr::bAlias
 
static const index_type iNumRows = iRowEnd - iRowStart + 1
 
static const index_type iNumCols = iColEnd - iColStart + 1
 

Private Types

typedef MaxSizeCheck< iRowEnd
<=MatrixExpr::iNumRows >
::CheckType check_iRowEnd;typedef
typename MaxSizeCheck
< iColStart >=1 >::CheckType 
check_iColStart
 

Private Attributes

typedef MaxSizeCheck< iRowStart > = 1>::CheckType check_iRowStart
 

Detailed Description

template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr>
class grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >

Definition at line 1165 of file matvec.h.

Member Typedef Documentation

template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
typedef MaxSizeCheck<iRowEnd <= MatrixExpr::iNumRows>::CheckType check_iRowEnd; typedef typename MaxSizeCheck<iColStart >= 1>::CheckType grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::check_iColStart
private

Definition at line 1218 of file matvec.h.

template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
typedef VectorExpression<SubVectorExpr<iRowStart, iRowEnd, typename MatrixExpr::ColumnVectorType>, iNumRows> grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::ColumnVectorType

Definition at line 1172 of file matvec.h.

template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
typedef MatrixExpr::ExpressionType grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::ExpressionType

Definition at line 1174 of file matvec.h.

template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
typedef VectorExpression<SubVectorExpr<iColStart, iColEnd, typename MatrixExpr::RowVectorType>, iNumCols> grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::RowVectorType

Definition at line 1171 of file matvec.h.

template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
typedef MatrixExpr::ScalarType grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::ScalarType

Definition at line 1173 of file matvec.h.

Constructor & Destructor Documentation

template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::SubMatrixExpr ( const MatrixExpr &  A)
inline

Definition at line 1176 of file matvec.h.

References MATVEC_ASSERT.

1177  :A(A) {
1178  MATVEC_ASSERT(MatrixExpr::iNumCols == A.iGetNumCols());
1179  MATVEC_ASSERT(MatrixExpr::iNumRows == A.iGetNumRows());
1180  }
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64

Member Function Documentation

template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
template<typename ScalarType2 >
bool grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::bHaveReferenceTo ( const ScalarType2 *  pFirst,
const ScalarType2 *  pLast 
) const
inline

Definition at line 1211 of file matvec.h.

1211  {
1212  return A.bHaveReferenceTo(pFirst, pLast);
1213  }
template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
ColumnVectorType grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::GetCol ( index_type  iCol) const
inline

Definition at line 1204 of file matvec.h.

References grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::iGetNumCols(), and MATVEC_ASSERT.

1204  {
1205  MATVEC_ASSERT(iCol >= 1);
1206  MATVEC_ASSERT(iCol <= iGetNumCols());
1207  return ColumnVectorType(A.GetCol(iCol + iColStart - 1));
1208  }
index_type iGetNumCols() const
Definition: matvec.h:1194
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
VectorExpression< SubVectorExpr< iRowStart, iRowEnd, typename MatrixExpr::ColumnVectorType >, iNumRows > ColumnVectorType
Definition: matvec.h:1172

Here is the call graph for this function:

template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
RowVectorType grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::GetRow ( index_type  iRow) const
inline

Definition at line 1198 of file matvec.h.

References grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::iGetNumRows(), and MATVEC_ASSERT.

1198  {
1199  MATVEC_ASSERT(iRow >= 1);
1200  MATVEC_ASSERT(iRow <= iGetNumRows());
1201  return RowVectorType(A.GetRow(iRow + iRowStart - 1));
1202  }
index_type iGetNumRows() const
Definition: matvec.h:1190
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64
VectorExpression< SubVectorExpr< iColStart, iColEnd, typename MatrixExpr::RowVectorType >, iNumCols > RowVectorType
Definition: matvec.h:1171

Here is the call graph for this function:

template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
index_type grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::iGetNumCols ( void  ) const
inline
template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
index_type grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::iGetNumRows ( void  ) const
inline
template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
const ScalarType& grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::operator() ( index_type  i,
index_type  j 
) const
inline

Definition at line 1182 of file matvec.h.

References grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::iGetNumCols(), grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::iGetNumRows(), and MATVEC_ASSERT.

1182  {
1183  MATVEC_ASSERT(i >= 1);
1184  MATVEC_ASSERT(i <= iGetNumRows());
1185  MATVEC_ASSERT(j >= 1);
1186  MATVEC_ASSERT(j <= iGetNumCols());
1187  return A(i + iRowStart - 1, j + iColStart - 1);
1188  }
index_type iGetNumCols() const
Definition: matvec.h:1194
index_type iGetNumRows() const
Definition: matvec.h:1190
#define MATVEC_ASSERT(expr)
Definition: matvec.h:64

Here is the call graph for this function:

Member Data Documentation

template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
const bool grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::bAlias = MatrixExpr::bAlias
static

Definition at line 1167 of file matvec.h.

template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
const index_type grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::iNumCols = iColEnd - iColStart + 1
static
template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
const index_type grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::iNumRows = iRowEnd - iRowStart + 1
static
template<index_type iRowStart, index_type iRowEnd, index_type iColStart, index_type iColEnd, typename MatrixExpr >
typedef grad::SubMatrixExpr< iRowStart, iRowEnd, iColStart, iColEnd, MatrixExpr >::MaxSizeCheck< iRowStart > = 1>::CheckType check_iRowStart
private

Definition at line 1216 of file matvec.h.


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