MBDyn-1.7.3
|
#include <matvec.h>
Public Types | |
typedef ScalarTypeTraits< T > ::ScalarType | ScalarType |
typedef ScalarTypeTraits< T > ::DirectExpressionType | ExpressionType |
typedef VectorExpression < SliceVector< T, N_cols, 1 > , N_cols > | RowVectorType |
typedef VectorExpression < SliceVector< T, N_rows, N_cols >, N_rows > | ColumnVectorType |
Public Member Functions | |
Matrix () | |
Matrix (index_type iRows, index_type iCols) | |
Matrix (const T &A11, const T &A21, const T &A12, const T &A22) | |
Matrix (const Matrix &A) | |
Matrix (const Mat3x3 &A) | |
template<typename InitClass > | |
Matrix (const MatrixInit< InitClass, T, N_rows, N_cols > &func) | |
template<typename Expression > | |
Matrix (const MatrixExpression< Expression, N_rows, N_cols > &A) | |
template<typename T2 > | |
Matrix (const Matrix< T2, N_rows, N_cols > &A, LocalDofMap *pDofMap) | |
template<typename T2 > | |
void | Copy (const Matrix< T2, N_rows, N_cols > &A, LocalDofMap *pDofMap) |
void | Reset () |
void | Resize (index_type iRows, index_type iCols) |
template<typename Expression > | |
Matrix & | operator= (const MatrixExpression< Expression, N_rows, N_cols > &A) |
template<typename T_Rhs > | |
Matrix & | operator+= (const Matrix< T_Rhs, N_rows, N_cols > &A) |
template<typename T_Rhs > | |
Matrix & | operator-= (const Matrix< T_Rhs, N_rows, N_cols > &A) |
template<typename Expression > | |
Matrix & | operator+= (const MatrixExpression< Expression, N_rows, N_cols > &A) |
template<typename Expression > | |
Matrix & | operator-= (const MatrixExpression< Expression, N_rows, N_cols > &A) |
template<typename T_Rhs > | |
Matrix & | operator*= (const T_Rhs &a) |
template<typename T_Rhs > | |
Matrix & | operator/= (const T_Rhs &a) |
template<typename ScalarExpression > | |
Matrix & | operator*= (const GradientExpression< ScalarExpression > &a) |
template<typename ScalarExpression > | |
Matrix & | operator/= (const GradientExpression< ScalarExpression > &a) |
Matrix & | operator= (const Mat3x3 &A) |
const ScalarType & | operator() (index_type iRow, index_type iCol) const |
ScalarType & | operator() (index_type iRow, index_type iCol) |
RowVectorType | GetRow (index_type iRow) const |
ColumnVectorType | GetCol (index_type iCol) const |
index_type | iGetNumRows () const |
index_type | iGetNumCols () const |
const ScalarType * | pGetMat () const |
template<typename ScalarType2 > | |
bool | bHaveReferenceTo (const ScalarType2 *pFirst, const ScalarType2 *pLast) const |
Static Public Attributes | |
static const index_type | iNumRows = N_rows |
static const index_type | iNumCols = N_cols |
static const index_type | iInitNumRows = iNumRows == DYNAMIC_SIZE ? 0 : iNumRows |
static const index_type | iInitNumCols = iNumCols == DYNAMIC_SIZE ? 0 : iNumCols |
Private Member Functions | |
const ScalarType * | pGetFirstElem () const |
const ScalarType * | pGetLastElem () const |
template<typename Func , typename U > | |
void | ApplyScalarFunc (const U &a) |
template<typename Func , typename Expression > | |
void | ApplyMatrixFunc (const MatrixExpression< Expression, N_rows, N_cols > &A) |
template<typename Func , typename Expression > | |
void | ApplyMatrixFuncNoAlias (const MatrixExpression< Expression, N_rows, N_cols > &A, const Func &) |
template<typename Func , typename Expression > | |
void | ApplyMatrixFuncAlias (const MatrixExpression< Expression, N_rows, N_cols > &A, const Func &f) |
Private Attributes | |
MatrixData< ScalarType, iNumRows, iNumCols > | rgMat |
Friends | |
struct | MatVecHelp::ApplyAliasHelperMatrix< false > |
struct | MatVecHelp::ApplyAliasHelperMatrix< true > |
typedef VectorExpression<SliceVector<T, N_rows, N_cols>, N_rows> grad::Matrix< T, N_rows, N_cols >::ColumnVectorType |
typedef ScalarTypeTraits<T>::DirectExpressionType grad::Matrix< T, N_rows, N_cols >::ExpressionType |
typedef VectorExpression<SliceVector<T, N_cols, 1>, N_cols> grad::Matrix< T, N_rows, N_cols >::RowVectorType |
typedef ScalarTypeTraits<T>::ScalarType grad::Matrix< T, N_rows, N_cols >::ScalarType |
|
inline |
Definition at line 1922 of file matvec.h.
Referenced by grad::Matrix< T, N_rows, N_cols >::ApplyMatrixFuncAlias().
|
inline |
|
inline |
Definition at line 1930 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::iNumCols, and grad::Matrix< T, N_rows, N_cols >::iNumRows.
|
inline |
|
inlineexplicit |
Definition at line 2233 of file matvec.h.
References grad::Direct().
|
inlineexplicit |
Definition at line 1948 of file matvec.h.
|
inline |
Definition at line 1954 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::ApplyMatrixFuncNoAlias().
|
inline |
Definition at line 1962 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::Copy().
|
inlineprivate |
Definition at line 2152 of file matvec.h.
Referenced by grad::Vector< T, N_rows >::ApplyMatrixFunc().
|
inlineprivate |
Definition at line 2175 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::ApplyMatrixFuncNoAlias(), and grad::Matrix< T, N_rows, N_cols >::Matrix().
|
inlineprivate |
Definition at line 2159 of file matvec.h.
References grad::MatrixExpression< Expression, N_rows, N_cols, CLEAR_ALIAS >::iGetNumCols(), grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), grad::MatrixExpression< Expression, N_rows, N_cols, CLEAR_ALIAS >::iGetNumRows(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), MATVEC_ASSERT, grad::Matrix< T, N_rows, N_cols >::pGetFirstElem(), grad::Matrix< T, N_rows, N_cols >::pGetLastElem(), grad::MatrixData< T, N_rows, N_cols >::Resize(), and grad::Matrix< T, N_rows, N_cols >::rgMat.
Referenced by grad::Matrix< T, N_rows, N_cols >::ApplyMatrixFuncAlias(), grad::Vector< T, N_rows >::ApplyMatrixFuncAlias(), grad::Matrix< T, N_rows, N_cols >::Matrix(), and grad::Vector< T, N_rows >::Vector().
|
inlineprivate |
Definition at line 2143 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), and grad::Matrix< T, N_rows, N_cols >::iGetNumRows().
|
inline |
Definition at line 2123 of file matvec.h.
References grad::bArrayOverlap(), grad::Matrix< T, N_rows, N_cols >::pGetFirstElem(), and grad::Matrix< T, N_rows, N_cols >::pGetLastElem().
|
inline |
Definition at line 1968 of file matvec.h.
References grad::Copy(), grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), MATVEC_ASSERT, grad::MatrixData< T, N_rows, N_cols >::Resize(), and grad::Matrix< T, N_rows, N_cols >::rgMat.
Referenced by grad::Matrix< T, N_rows, N_cols >::Matrix(), and grad::Vector< T, N_rows >::Vector().
|
inline |
Definition at line 2112 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), MATVEC_ASSERT, and grad::Matrix< T, N_rows, N_cols >::rgMat.
Referenced by grad::VecRotInit< T, MatrixExpr >::Initialize(), MatDynamicT_test_grad(), testMatVecProduct(), and testMatVecProductGradient().
|
inline |
Definition at line 2105 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), MATVEC_ASSERT, and grad::Matrix< T, N_rows, N_cols >::rgMat.
Referenced by MatDynamicT_test_grad(), testMatVecProduct(), and testMatVecProductGradient().
|
inline |
Definition at line 2119 of file matvec.h.
References grad::MatrixData< T, N_rows, N_cols >::iGetNumCols(), and grad::Matrix< T, N_rows, N_cols >::rgMat.
Referenced by grad::Matrix< T, N_rows, N_cols >::ApplyMatrixFuncNoAlias(), grad::Matrix< T, N_rows, N_cols >::ApplyScalarFunc(), grad::Matrix< T, N_rows, N_cols >::Copy(), grad::Matrix< T, N_rows, N_cols >::GetCol(), grad::Matrix< T, N_rows, N_cols >::GetRow(), MatDynamic_test(), MatDynamic_test_grad(), MatDynamicT_test(), MatDynamicT_test_grad(), grad::Matrix< T, N_rows, N_cols >::operator()(), grad::Matrix< T, N_rows, N_cols >::operator+=(), grad::Matrix< T, N_rows, N_cols >::operator-=(), grad::Matrix< T, N_rows, N_cols >::Reset(), testMatVecProduct(), testMatVecProductGradient(), and testMatVecProductGradient2().
|
inline |
Definition at line 2118 of file matvec.h.
References grad::MatrixData< T, N_rows, N_cols >::iGetNumRows(), and grad::Matrix< T, N_rows, N_cols >::rgMat.
Referenced by grad::Matrix< T, N_rows, N_cols >::ApplyMatrixFuncNoAlias(), grad::Vector< T, N_rows >::ApplyMatrixFuncNoAlias(), grad::Matrix< T, N_rows, N_cols >::ApplyScalarFunc(), grad::Vector< T, N_rows >::ApplyScalarFunc(), grad::Matrix< T, N_rows, N_cols >::Copy(), grad::Vector< T, N_rows >::Copy(), grad::Matrix< T, N_rows, N_cols >::GetCol(), grad::Matrix< T, N_rows, N_cols >::GetRow(), MatDynamic_test(), MatDynamic_test_grad(), MatDynamicT_test(), MatDynamicT_test_grad(), grad::Matrix< T, N_rows, N_cols >::operator()(), grad::Vector< T, N_rows >::operator()(), grad::Matrix< T, N_rows, N_cols >::operator+=(), grad::Vector< T, N_rows >::operator+=(), grad::Matrix< T, N_rows, N_cols >::operator-=(), grad::Vector< T, N_rows >::operator-=(), grad::Matrix< T, N_rows, N_cols >::Reset(), grad::Vector< T, N_rows >::Reset(), testMatVecProduct(), testMatVecProductGradient(), testMatVecProductGradient2(), and grad::Vector< T, N_rows >::Vector().
|
inline |
Definition at line 2088 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), MATVEC_ASSERT, and grad::Matrix< T, N_rows, N_cols >::rgMat.
|
inline |
Definition at line 2096 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), MATVEC_ASSERT, and grad::Matrix< T, N_rows, N_cols >::rgMat.
|
inline |
|
inline |
|
inline |
Definition at line 2006 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), and MATVEC_ASSERT.
|
inline |
Definition at line 2029 of file matvec.h.
References grad::MatrixExpression< Expression, N_rows, N_cols, CLEAR_ALIAS >::iGetNumCols(), grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), grad::MatrixExpression< Expression, N_rows, N_cols, CLEAR_ALIAS >::iGetNumRows(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), and MATVEC_ASSERT.
|
inline |
Definition at line 2017 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), and MATVEC_ASSERT.
|
inline |
Definition at line 2040 of file matvec.h.
References grad::MatrixExpression< Expression, N_rows, N_cols, CLEAR_ALIAS >::iGetNumCols(), grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), grad::MatrixExpression< Expression, N_rows, N_cols, CLEAR_ALIAS >::iGetNumRows(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), and MATVEC_ASSERT.
|
inline |
|
inline |
|
inline |
Definition at line 1994 of file matvec.h.
References grad::MatrixExpression< Expression, N_rows, N_cols, CLEAR_ALIAS >::iGetNumCols(), grad::MatrixExpression< Expression, N_rows, N_cols, CLEAR_ALIAS >::iGetNumRows(), grad::MatrixData< T, N_rows, N_cols >::Resize(), and grad::Matrix< T, N_rows, N_cols >::rgMat.
|
inline |
Definition at line 2242 of file matvec.h.
References grad::Direct(), grad::MatrixData< T, N_rows, N_cols >::Resize(), and grad::Matrix< T, N_rows, N_cols >::rgMat.
|
inlineprivate |
Definition at line 2131 of file matvec.h.
References grad::MatrixData< T, N_rows, N_cols >::pGetFirstElem(), and grad::Matrix< T, N_rows, N_cols >::rgMat.
Referenced by grad::Matrix< T, N_rows, N_cols >::ApplyMatrixFuncNoAlias(), grad::Vector< T, N_rows >::ApplyMatrixFuncNoAlias(), grad::Matrix< T, N_rows, N_cols >::bHaveReferenceTo(), grad::Vector< T, N_rows >::bHaveReferenceTo(), grad::Matrix< T, N_rows, N_cols >::pGetMat(), and grad::Vector< T, N_rows >::pGetVec().
|
inlineprivate |
Definition at line 2135 of file matvec.h.
References grad::MatrixData< T, N_rows, N_cols >::pGetLastElem(), and grad::Matrix< T, N_rows, N_cols >::rgMat.
Referenced by grad::Matrix< T, N_rows, N_cols >::ApplyMatrixFuncNoAlias(), grad::Vector< T, N_rows >::ApplyMatrixFuncNoAlias(), grad::Matrix< T, N_rows, N_cols >::bHaveReferenceTo(), and grad::Vector< T, N_rows >::bHaveReferenceTo().
|
inline |
Definition at line 2120 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::pGetFirstElem().
Referenced by callFunc2().
|
inline |
Definition at line 1981 of file matvec.h.
References grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), and grad::Reset().
Referenced by testMatVecProductGradient().
|
inline |
Definition at line 1989 of file matvec.h.
References grad::MatrixData< T, N_rows, N_cols >::Resize(), and grad::Matrix< T, N_rows, N_cols >::rgMat.
|
friend |
|
friend |
|
static |
|
static |
|
static |
Definition at line 1913 of file matvec.h.
Referenced by grad::Matrix< T, N_rows, N_cols >::Matrix().
|
static |
Definition at line 1912 of file matvec.h.
Referenced by grad::Matrix< T, N_rows, N_cols >::Matrix(), and grad::Vector< T, N_rows >::Vector().
|
private |
Definition at line 2180 of file matvec.h.
Referenced by grad::Matrix< T, N_rows, N_cols >::ApplyMatrixFuncNoAlias(), grad::Matrix< T, N_rows, N_cols >::Copy(), grad::Matrix< T, N_rows, N_cols >::GetCol(), grad::Matrix< T, N_rows, N_cols >::GetRow(), grad::Matrix< T, N_rows, N_cols >::iGetNumCols(), grad::Matrix< T, N_rows, N_cols >::iGetNumRows(), grad::Matrix< T, N_rows, N_cols >::operator()(), grad::Matrix< T, N_rows, N_cols >::operator=(), grad::Matrix< T, N_rows, N_cols >::pGetFirstElem(), grad::Matrix< T, N_rows, N_cols >::pGetLastElem(), and grad::Matrix< T, N_rows, N_cols >::Resize().