35#ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_H_
36#define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_H_
120template< RelaxationFlag RF,
typename MT,
bool SO,
bool DF,
bool SF >
123template<
typename MT,
bool SO,
bool DF,
bool SF >
126template<
typename MT,
bool SO,
bool DF,
bool SF >
165 return m.rows() == 0UL;
266 m.matrix_ = std::move( tmp );
290template<
typename MT1
308 const size_t M( (*rhs).rows() );
309 const size_t N( (*rhs).columns() );
320 const size_t subrow( lower ? 0UL :
column -
row );
321 const size_t subcol( lower ?
row -
column : 0UL );
345template<
typename MT1
354 return tryAssign( lhs, *rhs,
row,
column );
377template<
typename MT1
386 return tryAssign( lhs, *rhs,
row,
column );
409template<
typename MT1
418 return tryAssign( lhs, *rhs,
row,
column );
434template<
typename MT,
bool SO,
bool DF,
bool SF >
436 :
public Size<MT,0UL>
439template<
typename MT,
bool SO,
bool DF,
bool SF >
441 :
public Size<MT,1UL>
457template<
typename MT,
bool SO,
bool DF,
bool SF >
462template<
typename MT,
bool SO,
bool DF,
bool SF >
480template<
typename MT,
bool SO,
bool DF,
bool SF >
498template<
typename MT,
bool SO,
bool DF,
bool SF >
516template<
typename MT,
bool SO,
bool DF,
bool SF >
534template<
typename MT,
bool SO,
bool DF,
bool SF >
552template<
typename MT,
bool SO,
bool DF,
bool SF >
570template<
typename MT,
bool SO,
bool DF,
bool SF >
588template<
typename MT,
bool SO,
bool DF,
bool SF >
606template<
typename MT,
bool SO,
bool DF,
bool SF >
624template<
typename MT,
bool SO,
bool SF >
642template<
typename MT,
bool SO,
bool DF,
bool SF >
660template<
typename MT,
bool SO,
bool DF,
bool SF >
678template<
typename MT,
bool SO,
bool DF,
bool SF >
696template<
typename MT,
bool SO,
bool DF,
bool SF >
715template<
typename T1,
typename T2 >
716struct AddTraitEval1< T1, T2
742template<
typename T1,
typename T2 >
743struct SubTraitEval1< T1, T2
769template<
typename T1,
typename T2 >
770struct SchurTraitEval1< T1, T2
794template<
typename T1,
typename T2 >
795struct MultTraitEval1< T1, T2
803template<
typename T1,
typename T2 >
804struct MultTraitEval1< T1, T2
825template<
typename T1,
typename T2 >
826struct KronTraitEval1< T1, T2
850template<
typename T1,
typename T2 >
851struct DivTraitEval1< T1, T2
870template<
typename T,
typename OP >
871struct UnaryMapTraitEval1< T, OP
885template<
typename T1,
typename T2,
typename OP >
886struct BinaryMapTraitEval1< T1, T2, OP
908template<
typename T,
size_t R0,
size_t R1 >
909struct RepeatTraitEval1< T, R0, R1,
inf
929template<
typename MT,
bool SO,
bool DF,
bool SF >
932 using Type = SymmetricMatrix<MT,SO,DF,SF>;
948template<
typename MT,
bool SO,
bool DF,
bool SF >
951 using Type = HermitianMatrix<MT,SO,DF>;
967template<
typename MT,
bool SO,
bool DF,
bool SF >
970 using Type = DiagonalMatrix<MT,SO,DF>;
986template<
typename MT,
bool SO,
bool DF,
bool SF >
989 using Type = IdentityMatrix< ElementType_t<MT>, SO >;
1005template<
typename MT,
bool SO,
bool DF,
bool SF >
1008 using Type = ZeroMatrix< ElementType_t<MT>, SO >;
1024template<
typename MT,
bool SO,
bool DF,
bool SF >
1027 using Type = DiagonalMatrix<MT,SO,DF>;
1043template<
typename MT,
bool SO,
bool DF,
bool SF >
1046 using Type = IdentityMatrix< ElementType_t<MT>, SO >;
1062template<
typename MT,
bool SO,
bool DF,
bool SF >
1065 using Type = ZeroMatrix< ElementType_t<MT>, SO >;
1081template<
typename MT,
bool SO,
bool DF,
bool SF >
1084 using Type = DiagonalMatrix<MT,SO,DF>;
1100template<
typename MT1,
bool SO1,
bool DF1,
bool SF1,
typename MT2,
bool SO2,
bool DF2,
bool SF2 >
1103 using Type = SymmetricMatrix< typename HighType<MT1,MT2>::Type >;
1119template<
typename MT1,
bool SO1,
bool DF1,
bool SF1,
typename MT2,
bool SO2,
bool DF2,
bool SF2 >
1122 using Type = SymmetricMatrix< typename LowType<MT1,MT2>::Type >;
1138template<
typename MT,
size_t I,
size_t N >
1139struct SubmatrixTraitEval1< MT, I, I, N, N
Header file for the addition trait.
Header file for auxiliary alias declarations.
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition Aliases.h:190
Header file for run time assertion macros.
Constraint on the data type.
Header file for the decldiag trait.
Header file for the declherm trait.
Header file for the decllow trait.
Header file for the declstrlow trait.
Header file for the declstrupp trait.
Header file for the declsym trait.
Header file for the declunilow trait.
Header file for the decluniupp trait.
Header file for the declupp trait.
SymmetricMatrix specialization for dense matrices with non-scalar element type.
SymmetricMatrix specialization for dense matrices with scalar element type.
Header file for the division trait.
Header file for the EnableIf class template.
Header file for the HasConstDataAccess type trait.
Header file for the HighType type trait.
Header file for the IntegralConstant class template.
Header file for the dense matrix inversion flags.
Header file for the IsAdaptor type trait.
Header file for the IsAligned type trait.
Header file for the IsBuiltin type trait.
Header file for the IsContiguous type trait.
Header file for the isDefault shim.
Header file for the IsDiagonal type trait.
Header file for the isDivisor shim.
Header file for the IsHermitian type trait.
Header file for the IsMatrix type trait.
Header file for the IsPadded type trait.
Header file for the IsRestricted type trait.
Header file for the IsScalar type trait.
Header file for the IsSquare type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Header file for the Kron product trait.
Header file for the LowType type trait.
Header file for the map trait.
Header file for the MaxSize type trait.
Header file for the MAYBE_UNUSED function template.
Header file for the multiplication trait.
Header file for the relaxation flag enumeration.
Header file for the RemoveAdaptor type trait.
Header file for the repeat trait.
Header file for the Schur product trait.
SymmetricMatrix specialization for sparse matrices with non-scalar element type.
SymmetricMatrix specialization for sparse matrices with scalar element type.
Header file for the subtraction trait.
Header file for the submatrix trait.
Header file for the YieldsDiagonal type trait.
Header file for the YieldsHermitian type trait.
Header file for the YieldsIdentity type trait.
Header file for the YieldsSymmetric type trait.
Header file for the implementation of the base template of the SymmetricMatrix.
Base class for matrices.
Definition Matrix.h:85
Matrix adapter for symmetric matrices.
Definition BaseTemplate.h:614
Constraint on the data type.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition Column.h:137
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition DenseMatrix.h:2096
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition DMatDMatMapExpr.h:1339
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition DenseMatrix.h:1456
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an identity matrix.
Definition DenseMatrix.h:2561
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition DiagonalMatrix.h:207
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition DiagonalMatrix.h:225
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition DiagonalMatrix.h:169
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition HermitianProxy.h:693
#define BLAZE_CONSTRAINT_MUST_BE_BLAS_COMPATIBLE_TYPE(T)
Constraint on the data type.
Definition BLASCompatible.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.
Definition RequiresEvaluation.h:81
constexpr bool IsSymmetric_v
Auxiliary variable template for the IsSymmetric type trait.
Definition IsSymmetric.h:172
constexpr bool YieldsIdentity_v
Auxiliary variable template for the YieldsIdentity type trait.
Definition YieldsIdentity.h:126
constexpr bool IsScalar_v
Auxiliary variable template for the IsScalar type trait.
Definition IsScalar.h:104
constexpr bool IsUniform_v
Auxiliary variable template for the IsUniform type trait.
Definition IsUniform.h:164
constexpr bool YieldsDiagonal_v
Auxiliary variable template for the YieldsDiagonal type trait.
Definition YieldsDiagonal.h:126
constexpr ptrdiff_t Size_v
Auxiliary variable template for the Size type trait.
Definition Size.h:176
constexpr ptrdiff_t DefaultSize_v
Default size of the Size type trait.
Definition Size.h:72
constexpr bool IsDiagonal_v
Auxiliary variable template for the IsDiagonal type trait.
Definition IsDiagonal.h:148
constexpr bool StorageOrder_v
Auxiliary variable template for the StorageOrder type trait.
Definition StorageOrder.h:93
constexpr bool IsZero_v
Auxiliary variable template for the IsZero type trait.
Definition IsZero.h:166
constexpr bool IsMatrix_v
Auxiliary variable template for the IsMatrix type trait.
Definition IsMatrix.h:124
constexpr bool YieldsHermitian_v
Auxiliary variable template for the YieldsHermitian type trait.
Definition YieldsHermitian.h:124
constexpr bool YieldsSymmetric_v
Auxiliary variable template for the YieldsSymmetric type trait.
Definition YieldsSymmetric.h:124
RelaxationFlag
Relaxation flag for strict or relaxed semantics.
Definition RelaxationFlag.h:66
constexpr Infinity inf
Global Infinity instance.
Definition Infinity.h:1080
InversionFlag
Inversion flag.
Definition InversionFlag.h:102
@ byLDLT
Flag for the Bunch-Kaufman-based inversion for symmetric matrices.
Definition InversionFlag.h:104
@ asHermitian
Flag for the inversion of a Hermitian matrix (same as byLDLH).
Definition InversionFlag.h:110
@ asUniLower
Flag for the inversion of a lower unitriangular matrix.
Definition InversionFlag.h:112
@ asSymmetric
Flag for the inversion of a symmetric matrix (same as byLDLT).
Definition InversionFlag.h:109
@ asUniUpper
Flag for the inversion of a upper unitriangular matrix.
Definition InversionFlag.h:114
@ byLDLH
Flag for the Bunch-Kaufman-based inversion for Hermitian matrices.
Definition InversionFlag.h:105
@ asDiagonal
Flag for the inversion of a diagonal matrix.
Definition InversionFlag.h:115
@ byLU
Flag for the LU-based matrix inversion.
Definition InversionFlag.h:103
@ byLLH
Flag for the Cholesky-based inversion for positive-definite matrices.
Definition InversionFlag.h:106
@ asGeneral
Flag for the inversion of a general matrix (same as byLU).
Definition InversionFlag.h:108
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition Matrix.h:676
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition Row.h:137
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
decltype(auto) submatrix(Matrix< MT, SO > &, RSAs...)
Creating a view on a specific submatrix of the given matrix.
Definition Submatrix.h:181
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition MaybeUnused.h:81
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
BoolConstant< true > TrueType
Type traits base class.
Definition IntegralConstant.h:132
Header file for the exception macros of the math module.
Header file for all forward declarations of the math module.
Header file for the Size type trait.
Header file for the StorageOrder type trait.
Base template for the DeclDiagTrait class.
Definition DeclDiagTrait.h:127
Base template for the DeclHermTrait class.
Definition DeclHermTrait.h:126
Base template for the DeclLowTrait class.
Definition DeclLowTrait.h:126
Base template for the DeclStrLowTrait class.
Definition DeclStrLowTrait.h:128
Base template for the DeclStrUppTrait class.
Definition DeclStrUppTrait.h:128
Base template for the DeclSymTrait class.
Definition DeclSymTrait.h:126
Base template for the DeclUniLowTrait class.
Definition DeclUniLowTrait.h:128
Base template for the DeclUniUppTrait class.
Definition DeclUniUppTrait.h:128
Base template for the DeclUppTrait class.
Definition DeclUppTrait.h:126
Compile time check for low-level access to constant data.
Definition HasConstDataAccess.h:76
Base template for the HighType type trait.
Definition HighType.h:322
Compile time check for adaptors.
Definition IsAdaptor.h:89
Compile time check for the alignment of data types.
Definition IsAligned.h:88
Compile time check for built-in data types.
Definition IsBuiltin.h:77
Compile time check for the memory layout of data types.
Definition IsContiguous.h:87
Compile time check for Hermitian matrices.
Definition IsHermitian.h:115
Compile time check for data types with padding.
Definition IsPadded.h:77
Compile time check for data types with restricted data access.
Definition IsRestricted.h:83
Compile time check for square matrices.
Definition IsSquare.h:89
Compile time check for strictly lower triangular matrices.
Definition IsStrictlyLower.h:116
Compile time check for strictly upper triangular matrices.
Definition IsStrictlyUpper.h:116
Compile time check for symmetric matrices.
Definition IsSymmetric.h:115
Compile time check for zero vectors or matrices.
Definition IsZero.h:109
Base template for the LowType type trait.
Definition LowType.h:322
Compile time evaluation of the maximum size of vectors and matrices.
Definition MaxSize.h:118
Removal of top level adaptor types.
Definition RemoveAdaptor.h:77
Compile time evaluation of the size of vectors and matrices.
Definition Size.h:119
Header file for the IsZero type trait.
Header file for the generic min algorithm.