35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATINVEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DMATINVEXPR_H_ 84 :
public MatInvExpr< DenseMatrix< DMatInvExpr<MT,SO>, SO > >
133 inline size_t rows() const noexcept {
134 return dm_.columns();
164 template<
typename T >
165 inline bool canAlias(
const T* alias )
const noexcept {
166 return dm_.isAliased( alias );
176 template<
typename T >
177 inline bool isAliased(
const T* alias )
const noexcept {
178 return dm_.isAliased( alias );
218 template<
typename MT2
228 assign( ~lhs, rhs.
dm_ );
231 invert< DMatInvExpr::getInversionFlag() >( ~lhs );
248 template<
typename MT2
250 friend inline void assign( SparseMatrix<MT2,SO2>& lhs,
const DMatInvExpr& rhs )
254 using TmpType = If_t< SO == SO2, ResultType, OppositeType >;
266 const TmpType tmp(
serial( rhs ) );
284 template<
typename MT2
286 friend inline void addAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatInvExpr& rhs )
294 addAssign( ~lhs, tmp );
315 template<
typename MT2
317 friend inline void subAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatInvExpr& rhs )
325 subAssign( ~lhs, tmp );
346 template<
typename MT2
348 friend inline void schurAssign( DenseMatrix<MT2,SO2>& lhs,
const DMatInvExpr& rhs )
356 schurAssign( ~lhs, tmp );
421 template<
typename MT
465 template<
typename MT
467 inline decltype(
auto)
inv( const DMatInvExpr<MT,SO>& dm )
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
CompositeType_t< MT > CT
Composite type of the dense matrix expression.
Definition: DMatInvExpr.h:90
Header file for auxiliary alias declarations.
ReturnType_t< MT > ReturnType
Return type for expression template evaluations.
Definition: DMatInvExpr.h:101
Operand dm_
Dense matrix of the inversion expression.
Definition: DMatInvExpr.h:184
Header file for the IsUniUpper type trait.
Flag for the inversion of a diagonal matrix.
Definition: InversionFlag.h:115
bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b) noexcept
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:992
Header file for basic type definitions.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias declaration for the If class template.The If_t alias declaration provides a convenien...
Definition: If.h:109
Flag for the inversion of a general matrix (same as byLU).
Definition: InversionFlag.h:108
Flag for the inversion of a upper unitriangular matrix.
Definition: InversionFlag.h:114
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
Flag for the inversion of a lower unitriangular matrix.
Definition: InversionFlag.h:112
Header file for the serial shim.
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.In case the given data type T is not a dense or sparse matrix type and in...
Definition: StorageOrder.h:63
static constexpr bool simdEnabled
Compilation switch for the expression template evaluation strategy.
Definition: DMatInvExpr.h:112
Header file for the IsDiagonal type trait.
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:61
ElementType_t< MT > ElementType
Resulting element type.
Definition: DMatInvExpr.h:100
Header file for the Computation base class.
Header file for the MatInvExpr base class.
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatInvExpr.h:165
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
Header file for the IsUniLower type trait.
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:80
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatInvExpr.h:133
OppositeType_t< MT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatInvExpr.h:98
ResultType_t< MT > ResultType
Result type for expression template evaluations.
Definition: DMatInvExpr.h:97
DMatInvExpr(const MT &dm) noexcept
Constructor for the DMatInvExpr class.
Definition: DMatInvExpr.h:123
Constraint on the data type.
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatInvExpr.h:177
Flag for the inversion of a upper triangular matrix.
Definition: InversionFlag.h:113
Flag for the inversion of a lower triangular matrix.
Definition: InversionFlag.h:111
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DMatInvExpr.h:115
Header file for the DenseMatrix base class.
decltype(auto) inv(const DenseMatrix< MT, SO > &dm)
Calculation of the inverse of the given dense matrix.
Definition: DMatInvExpr.h:423
Flag for the inversion of a Hermitian matrix (same as byLDLH).
Definition: InversionFlag.h:110
Header file for the IsLower type trait.
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
Constraint on the data type.
Header file for all forward declarations for expression class templates.
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
Flag for the inversion of a symmetric matrix (same as byLDLT).
Definition: InversionFlag.h:109
Operand operand() const noexcept
Returns the dense matrix operand.
Definition: DMatInvExpr.h:153
If_t< IsExpression_v< MT >, const MT, const MT &> Operand
Composite data type of the dense matrix expression.
Definition: DMatInvExpr.h:107
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
Header file for run time assertion macros.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.The CompositeType_t alias declaration pro...
Definition: Aliases.h:90
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
Base class for all matrix inversion expression templates.The MatInvExpr class serves as a tag for all...
Definition: MatInvExpr.h:66
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
#define BLAZE_CONSTRAINT_MATRICES_MUST_HAVE_SAME_STORAGE_ORDER(T1, T2)
Constraint on the data type.In case either of the two given data types T1 or T2 is not a matrix type ...
Definition: StorageOrder.h:84
Expression object for dense matrix inversions.The DMatInvExpr class represents the compile time expre...
Definition: DMatInvExpr.h:83
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3081
const ResultType CompositeType
Data type for composite expression templates.
Definition: DMatInvExpr.h:104
TransposeType_t< MT > TransposeType
Transpose type for expression template evaluations.
Definition: DMatInvExpr.h:99
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
ResultType_t< MT > RT
Result type of the dense matrix expression.
Definition: DMatInvExpr.h:89
Header file for the IsUpper type trait.
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatInvExpr.h:143
Header file for the IsHermitian type trait.
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:951
InversionFlag
Inversion flag.The InversionFlag type enumeration represents the different types of matrix inversion ...
Definition: InversionFlag.h:101
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the IsExpression type trait class.
Header file for the function trace functionality.