35 #ifndef _BLAZE_MATH_ADAPTORS_DIAGONALMATRIX_SPARSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_DIAGONALMATRIX_SPARSE_H_ 96 class DiagonalMatrix<MT,SO,false>
97 :
public SparseMatrix< DiagonalMatrix<MT,SO,false>, SO >
101 using OT = OppositeType_<MT>;
102 using TT = TransposeType_<MT>;
103 using ET = ElementType_<MT>;
108 using This = DiagonalMatrix<MT,SO,false>;
109 using BaseType = SparseMatrix<This,SO>;
125 template<
typename NewType >
128 using Other = DiagonalMatrix< typename MT::template Rebind<NewType>::Other >;
135 template<
size_t NewM
139 using Other = DiagonalMatrix< typename MT::template Resize<NewM,NewN>::Other >;
145 enum :
bool { smpAssignable =
false };
151 explicit inline DiagonalMatrix();
152 explicit inline DiagonalMatrix(
size_t n );
153 explicit inline DiagonalMatrix(
size_t n,
size_t nonzeros );
154 explicit inline DiagonalMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
156 inline DiagonalMatrix(
const DiagonalMatrix& m );
157 inline DiagonalMatrix( DiagonalMatrix&& m ) noexcept;
159 template<
typename MT2,
bool SO2 >
160 inline DiagonalMatrix(
const Matrix<MT2,SO2>& m );
171 inline Reference operator()(
size_t i,
size_t j );
173 inline Reference at(
size_t i,
size_t j );
187 inline DiagonalMatrix& operator=(
const DiagonalMatrix& rhs );
188 inline DiagonalMatrix& operator=( DiagonalMatrix&& rhs ) noexcept;
190 template<
typename MT2,
bool SO2 >
191 inline DisableIf_< IsComputation<MT2>, DiagonalMatrix& > operator=(
const Matrix<MT2,SO2>& rhs );
193 template<
typename MT2,
bool SO2 >
194 inline EnableIf_< IsComputation<MT2>, DiagonalMatrix& > operator=(
const Matrix<MT2,SO2>& rhs );
196 template<
typename MT2,
bool SO2 >
197 inline DisableIf_< IsComputation<MT2>, DiagonalMatrix& >
operator+=(
const Matrix<MT2,SO2>& rhs );
199 template<
typename MT2,
bool SO2 >
200 inline EnableIf_< IsComputation<MT2>, DiagonalMatrix& >
operator+=(
const Matrix<MT2,SO2>& rhs );
202 template<
typename MT2,
bool SO2 >
203 inline DisableIf_< IsComputation<MT2>, DiagonalMatrix& >
operator-=(
const Matrix<MT2,SO2>& rhs );
205 template<
typename MT2,
bool SO2 >
206 inline EnableIf_< IsComputation<MT2>, DiagonalMatrix& >
operator-=(
const Matrix<MT2,SO2>& rhs );
208 template<
typename MT2,
bool SO2 >
209 inline DiagonalMatrix& operator%=(
const Matrix<MT2,SO2>& rhs );
211 template<
typename MT2,
bool SO2 >
212 inline DiagonalMatrix&
operator*=(
const Matrix<MT2,SO2>& rhs );
214 template<
typename Other >
215 inline EnableIf_< IsNumeric<Other>, DiagonalMatrix >&
operator*=( Other rhs );
217 template<
typename Other >
218 inline EnableIf_< IsNumeric<Other>, DiagonalMatrix >&
operator/=( Other rhs );
225 inline size_t rows() const noexcept;
226 inline
size_t columns() const noexcept;
227 inline
size_t capacity() const noexcept;
228 inline
size_t capacity(
size_t i ) const noexcept;
230 inline
size_t nonZeros(
size_t i ) const;
232 inline
void reset(
size_t i );
234 inline
void resize (
size_t n,
bool preserve=true );
235 inline
void reserve(
size_t nonzeros );
236 inline
void reserve(
size_t i,
size_t nonzeros );
238 inline
void trim(
size_t i );
240 inline
void swap( DiagonalMatrix& m ) noexcept;
249 inline
void append (
size_t i,
size_t j, const
ElementType& value,
bool check=false );
250 inline
void finalize(
size_t i );
257 inline
void erase(
size_t i,
size_t j );
261 template< typename Pred >
262 inline
void erase( Pred predicate );
264 template< typename Pred >
265 inline
void erase(
size_t i,
Iterator first,
Iterator last, Pred predicate );
272 inline
Iterator find (
size_t i,
size_t j );
274 inline
Iterator lowerBound(
size_t i,
size_t j );
276 inline
Iterator upperBound(
size_t i,
size_t j );
284 template< typename Other > inline DiagonalMatrix& scale( const Other& scalar );
285 template< typename Other > inline DiagonalMatrix& scaleDiagonal( const Other& scale );
292 inline
bool isIntact() const noexcept;
299 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
300 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
302 inline
bool canSMPAssign() const noexcept;
310 inline
void resetNonDiagonal();
322 template<
bool RF, typename MT2,
bool SO2,
bool DF2 >
323 friend
bool isDefault( const DiagonalMatrix<MT2,SO2,DF2>& m );
325 template< typename MT2,
bool SO2,
bool DF2 >
326 friend MT2& derestrict( DiagonalMatrix<MT2,SO2,DF2>& m );
361 template< typename MT
363 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix()
380 template<
typename MT
382 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
size_t n )
402 template<
typename MT
404 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
size_t n,
size_t nonzeros )
405 : matrix_( n, n, nonzeros )
426 template<
typename MT
428 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
429 : matrix_( n, n, nonzeros )
445 template<
typename MT
447 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
const DiagonalMatrix& m )
448 : matrix_( m.matrix_ )
463 template<
typename MT
465 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix( DiagonalMatrix&& m ) noexcept
466 : matrix_( std::move( m.matrix_ ) )
485 template<
typename MT
487 template<
typename MT2
489 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
const Matrix<MT2,SO2>& m )
492 if( !IsDiagonal<MT2>::value && !
isDiagonal( matrix_ ) ) {
496 if( !IsDiagonal<MT2>::value )
530 template<
typename MT
533 DiagonalMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
560 template<
typename MT
563 DiagonalMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const 591 template<
typename MT
594 DiagonalMatrix<MT,SO,false>::at(
size_t i,
size_t j )
625 template<
typename MT
628 DiagonalMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const 654 template<
typename MT
659 return matrix_.begin(i);
677 template<
typename MT
682 return matrix_.begin(i);
700 template<
typename MT
705 return matrix_.cbegin(i);
723 template<
typename MT
728 return matrix_.end(i);
746 template<
typename MT
751 return matrix_.end(i);
769 template<
typename MT
774 return matrix_.cend(i);
798 template<
typename MT
800 inline DiagonalMatrix<MT,SO,false>&
801 DiagonalMatrix<MT,SO,false>::operator=(
const DiagonalMatrix& rhs )
803 matrix_ = rhs.matrix_;
821 template<
typename MT
823 inline DiagonalMatrix<MT,SO,false>&
824 DiagonalMatrix<MT,SO,false>::operator=( DiagonalMatrix&& rhs ) noexcept
826 matrix_ = std::move( rhs.matrix_ );
850 template<
typename MT
852 template<
typename MT2
854 inline DisableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
855 DiagonalMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
857 if( !IsDiagonal<MT2>::value && !
isDiagonal( ~rhs ) ) {
863 if( !IsDiagonal<MT2>::value )
888 template<
typename MT
890 template<
typename MT2
892 inline EnableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
893 DiagonalMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
895 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
899 if( IsDiagonal<MT2>::value ) {
909 matrix_ = std::move( tmp );
912 if( !IsDiagonal<MT2>::value )
937 template<
typename MT
939 template<
typename MT2
941 inline DisableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
944 if( !IsDiagonal<MT2>::value && !
isDiagonal( ~rhs ) ) {
950 if( !IsDiagonal<MT2>::value )
975 template<
typename MT
977 template<
typename MT2
979 inline EnableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
982 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
986 if( IsDiagonal<MT2>::value ) {
990 const ResultType_<MT2> tmp( ~rhs );
999 if( !IsDiagonal<MT2>::value )
1024 template<
typename MT
1026 template<
typename MT2
1028 inline DisableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
1031 if( !IsDiagonal<MT2>::value && !
isDiagonal( ~rhs ) ) {
1037 if( !IsDiagonal<MT2>::value )
1062 template<
typename MT
1064 template<
typename MT2
1066 inline EnableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
1069 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1073 if( IsDiagonal<MT2>::value ) {
1077 const ResultType_<MT2> tmp( ~rhs );
1086 if( !IsDiagonal<MT2>::value )
1109 template<
typename MT
1111 template<
typename MT2
1113 inline DiagonalMatrix<MT,SO,false>&
1114 DiagonalMatrix<MT,SO,false>::operator%=(
const Matrix<MT2,SO2>& rhs )
1116 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1122 if( !IsDiagonal<MT2>::value )
1146 template<
typename MT
1148 template<
typename MT2
1150 inline DiagonalMatrix<MT,SO,false>&
1153 if( matrix_.rows() != (~rhs).
columns() ) {
1157 MT tmp( matrix_ * ~rhs );
1163 matrix_ = std::move( tmp );
1165 if( !IsDiagonal<MT2>::value )
1185 template<
typename MT
1187 template<
typename Other >
1188 inline EnableIf_< IsNumeric<Other>, DiagonalMatrix<MT,SO,false> >&
1205 template<
typename MT
1207 template<
typename Other >
1208 inline EnableIf_< IsNumeric<Other>, DiagonalMatrix<MT,SO,false> >&
1234 template<
typename MT
1238 return matrix_.rows();
1250 template<
typename MT
1254 return matrix_.columns();
1266 template<
typename MT
1270 return matrix_.capacity();
1288 template<
typename MT
1292 return matrix_.capacity(i);
1304 template<
typename MT
1308 return matrix_.nonZeros();
1326 template<
typename MT
1330 return matrix_.nonZeros(i);
1342 template<
typename MT
1365 template<
typename MT
1383 template<
typename MT
1410 template<
typename MT
1418 matrix_.resize( n, n, preserve );
1435 template<
typename MT
1437 inline void DiagonalMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1439 matrix_.reserve( nonzeros );
1459 template<
typename MT
1461 inline void DiagonalMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1463 matrix_.reserve( i, nonzeros );
1480 template<
typename MT
1482 inline void DiagonalMatrix<MT,SO,false>::trim()
1502 template<
typename MT
1504 inline void DiagonalMatrix<MT,SO,false>::trim(
size_t i )
1522 template<
typename MT
1526 matrix_.shrinkToFit();
1539 template<
typename MT
1545 swap( matrix_, m.matrix_ );
1557 template<
typename MT
1559 inline void DiagonalMatrix<MT,SO,false>::resetNonDiagonal()
1561 for(
size_t i=0UL; i<
rows(); ++i ) {
1562 matrix_.erase( i, matrix_.begin( i ), matrix_.lowerBound( i, i ) );
1563 matrix_.erase( i, matrix_.upperBound( i, i ), matrix_.end( i ) );
1594 template<
typename MT
1603 return matrix_.set( i, j, value );
1626 template<
typename MT
1629 DiagonalMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1635 return matrix_.insert( i, j, value );
1691 template<
typename MT
1693 inline void DiagonalMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1699 matrix_.append( i, j, value, check );
1719 template<
typename MT
1721 inline void DiagonalMatrix<MT,SO,false>::finalize(
size_t i )
1723 matrix_.finalize( i );
1747 template<
typename MT
1749 inline void DiagonalMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1751 matrix_.erase( i, j );
1769 template<
typename MT
1772 DiagonalMatrix<MT,SO,false>::erase(
size_t i,
Iterator pos )
1774 return matrix_.erase( i, pos );
1794 template<
typename MT
1797 DiagonalMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last )
1799 return matrix_.erase( i, first, last );
1827 template<
typename MT
1829 template<
typename Pred >
1830 inline void DiagonalMatrix<MT,SO,false>::erase( Pred predicate )
1832 matrix_.erase( predicate );
1868 template<
typename MT
1870 template<
typename Pred >
1871 inline void DiagonalMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last, Pred predicate )
1873 matrix_.erase( i, first, last, predicate );
1905 template<
typename MT
1908 DiagonalMatrix<MT,SO,false>::find(
size_t i,
size_t j )
1910 return matrix_.find( i, j );
1932 template<
typename MT
1935 DiagonalMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const 1937 return matrix_.find( i, j );
1959 template<
typename MT
1962 DiagonalMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
1964 return matrix_.lowerBound( i, j );
1986 template<
typename MT
1989 DiagonalMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const 1991 return matrix_.lowerBound( i, j );
2013 template<
typename MT
2016 DiagonalMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
2018 return matrix_.upperBound( i, j );
2040 template<
typename MT
2043 DiagonalMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const 2045 return matrix_.upperBound( i, j );
2077 template<
typename MT
2079 template<
typename Other >
2080 inline DiagonalMatrix<MT,SO,false>&
2081 DiagonalMatrix<MT,SO,false>::scale(
const Other& scalar )
2083 matrix_.scale( scalar );
2100 template<
typename MT
2102 template<
typename Other >
2103 inline DiagonalMatrix<MT,SO,false>&
2104 DiagonalMatrix<MT,SO,false>::scaleDiagonal(
const Other& scalar )
2106 matrix_.scaleDiagonal( scalar );
2131 template<
typename MT
2162 template<
typename MT
2164 template<
typename Other >
2165 inline bool DiagonalMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2167 return matrix_.canAlias( alias );
2184 template<
typename MT
2186 template<
typename Other >
2187 inline bool DiagonalMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2189 return matrix_.isAliased( alias );
2206 template<
typename MT
2208 inline bool DiagonalMatrix<MT,SO,false>::canSMPAssign() const noexcept
2210 return matrix_.canSMPAssign();
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type, a compilation error is created.
Definition: Const.h:79
#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
Header file for auxiliary alias declarations.
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:3079
decltype(auto) decldiag(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as diagonal.
Definition: DMatDeclDiagExpr.h:996
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for the Rows type trait.
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:356
Header file for basic type definitions.
#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
Header file for the IsDiagonal type trait.
BLAZE_ALWAYS_INLINE T1 & operator/=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Division assignment operator for the division of two SIMD packs.
Definition: BasicTypes.h:1411
Constraint on the data type.
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:3078
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:198
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3076
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:560
BLAZE_ALWAYS_INLINE void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition: Matrix.h:609
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:5845
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:3080
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:3085
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type, a compilation error is created.
Definition: Volatile.h:79
bool isDiagonal(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is diagonal.
Definition: DenseMatrix.h:1584
BLAZE_ALWAYS_INLINE size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:394
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:3086
BLAZE_ALWAYS_INLINE T1 & operator*=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Multiplication assignment operator for the multiplication of two SIMD packs.
Definition: BasicTypes.h:1393
Constraint on the data type.
BLAZE_ALWAYS_INLINE MT::ConstIterator cend(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:308
BLAZE_ALWAYS_INLINE MT::ConstIterator cbegin(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:242
Constraint on the data type.
Constraint on the data type.
Header file for the SparseMatrix base class.
Header file for utility functions for sparse matrices.
Header file for the IsSquare type trait.
Constraint on the data type.
Header file for the DisableIf class template.
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:3084
Header file for the DiagonalProxy class.
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5924
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5907
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3077
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:79
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:3081
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the Columns type trait.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3087
Constraint on the data type.
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:340
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a upper triangular matrix type...
Definition: Upper.h:81
BLAZE_ALWAYS_INLINE void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:548
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:264
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:580
Header file for the IsNumeric type trait.
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:76
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:79
BLAZE_ALWAYS_INLINE T1 & operator+=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Addition assignment operator for the addition of two SIMD packs.
Definition: BasicTypes.h:1357
Header file for run time assertion macros.
Constraint on the data type.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower triangular matrix type...
Definition: Lower.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:79
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:270
Constraint on the data type.
Constraint on the data type.
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:324
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3082
Header file for the implementation of the base template of the DiagonalMatrix.
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE_TYPE(T)
Constraint on the data type.In case the given data type T is not resizable, i.e. does not have a 'res...
Definition: Resizable.h:61
Header file for the IsComputation type trait class.
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:3083
#define BLAZE_CONSTRAINT_MUST_NOT_BE_EXPRESSION_TYPE(T)
Constraint on the data type.In case the given data type T is an expression (i.e. a type derived from ...
Definition: Expression.h:81
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:252
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:600
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is an Hermitian matrix type, a compilation error is created.
Definition: Hermitian.h:79
BLAZE_ALWAYS_INLINE T1 & operator-=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Subtraction assignment operator for the subtraction of two SIMD packs.
Definition: BasicTypes.h:1375
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:742
#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
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:61