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 typedef OppositeType_<MT> OT;
102 typedef TransposeType_<MT> TT;
103 typedef ElementType_<MT> ET;
108 typedef DiagonalMatrix<MT,SO,false>
This;
109 typedef SparseMatrix<This,SO>
BaseType;
125 template<
typename ET >
128 typedef DiagonalMatrix< typename MT::template Rebind<ET>::Other > Other;
134 enum :
bool { smpAssignable =
false };
140 explicit inline DiagonalMatrix();
141 explicit inline DiagonalMatrix(
size_t n );
142 explicit inline DiagonalMatrix(
size_t n,
size_t nonzeros );
143 explicit inline DiagonalMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
145 inline DiagonalMatrix(
const DiagonalMatrix& m );
146 inline DiagonalMatrix( DiagonalMatrix&& m ) noexcept;
148 template< typename MT2,
bool SO2 >
149 inline DiagonalMatrix( const Matrix<MT2,SO2>& m );
160 inline Reference operator()(
size_t i,
size_t j );
161 inline ConstReference operator()(
size_t i,
size_t j ) const;
162 inline Reference at(
size_t i,
size_t j );
163 inline ConstReference at(
size_t i,
size_t j ) const;
164 inline Iterator
begin (
size_t i );
165 inline ConstIterator
begin (
size_t i ) const;
166 inline ConstIterator
cbegin(
size_t i ) const;
167 inline Iterator
end (
size_t i );
168 inline ConstIterator
end (
size_t i ) const;
169 inline ConstIterator
cend (
size_t i ) const;
176 inline DiagonalMatrix& operator=( const DiagonalMatrix& rhs );
177 inline DiagonalMatrix& operator=( DiagonalMatrix&& rhs ) noexcept;
179 template< typename MT2,
bool SO2 >
180 inline
DisableIf_< IsComputation<MT2>, DiagonalMatrix& > operator=( const Matrix<MT2,SO2>& rhs );
182 template< typename MT2,
bool SO2 >
183 inline
EnableIf_< IsComputation<MT2>, DiagonalMatrix& > operator=( const Matrix<MT2,SO2>& rhs );
185 template< typename MT2,
bool SO2 >
186 inline
DisableIf_< IsComputation<MT2>, DiagonalMatrix& > operator+=( const Matrix<MT2,SO2>& rhs );
188 template< typename MT2,
bool SO2 >
189 inline
EnableIf_< IsComputation<MT2>, DiagonalMatrix& > operator+=( const Matrix<MT2,SO2>& rhs );
191 template< typename MT2,
bool SO2 >
192 inline
DisableIf_< IsComputation<MT2>, DiagonalMatrix& > operator-=( const Matrix<MT2,SO2>& rhs );
194 template< typename MT2,
bool SO2 >
195 inline
EnableIf_< IsComputation<MT2>, DiagonalMatrix& > operator-=( const Matrix<MT2,SO2>& rhs );
197 template< typename MT2,
bool SO2 >
198 inline DiagonalMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
200 template< typename Other >
201 inline
EnableIf_< IsNumeric<Other>, DiagonalMatrix >& operator*=( Other rhs );
203 template< typename Other >
204 inline
EnableIf_< IsNumeric<Other>, DiagonalMatrix >& operator/=( Other rhs );
211 inline
size_t rows() const noexcept;
212 inline
size_t columns() const noexcept;
213 inline
size_t capacity() const noexcept;
214 inline
size_t capacity(
size_t i ) const noexcept;
216 inline
size_t nonZeros(
size_t i ) const;
218 inline
void reset(
size_t i );
220 inline Iterator
set(
size_t i,
size_t j, const ElementType& value );
221 inline Iterator insert(
size_t i,
size_t j, const ElementType& value );
222 inline
void erase(
size_t i,
size_t j );
223 inline Iterator erase(
size_t i, Iterator pos );
224 inline Iterator erase(
size_t i, Iterator first, Iterator last );
225 inline
void resize (
size_t n,
bool preserve=true );
226 inline
void reserve(
size_t nonzeros );
227 inline
void reserve(
size_t i,
size_t nonzeros );
229 inline
void trim(
size_t i );
230 template< typename Other > inline DiagonalMatrix& scale( const Other& scalar );
231 template< typename Other > inline DiagonalMatrix& scaleDiagonal( Other scale );
232 inline
void swap( DiagonalMatrix& m ) noexcept;
239 inline Iterator find (
size_t i,
size_t j );
240 inline ConstIterator find (
size_t i,
size_t j ) const;
241 inline Iterator lowerBound(
size_t i,
size_t j );
242 inline ConstIterator lowerBound(
size_t i,
size_t j ) const;
243 inline Iterator upperBound(
size_t i,
size_t j );
244 inline ConstIterator upperBound(
size_t i,
size_t j ) const;
251 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
252 inline
void finalize(
size_t i );
259 inline
bool isIntact() const noexcept;
266 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
267 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
269 inline
bool canSMPAssign() const noexcept;
277 inline
void resetNonDiagonal();
289 template< typename MT2,
bool SO2,
bool DF2 >
290 friend
bool isDefault( const DiagonalMatrix<MT2,SO2,DF2>& m );
292 template< typename MT2,
bool SO2,
bool DF2 >
293 friend MT2& derestrict( DiagonalMatrix<MT2,SO2,DF2>& m );
328 template< typename MT
330 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix()
347 template<
typename MT
349 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
size_t n )
369 template<
typename MT
371 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
size_t n,
size_t nonzeros )
372 : matrix_( n, n, nonzeros )
393 template<
typename MT
395 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
396 : matrix_( n, n, nonzeros )
412 template<
typename MT
414 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
const DiagonalMatrix& m )
415 : matrix_( m.matrix_ )
430 template<
typename MT
432 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix( DiagonalMatrix&& m ) noexcept
433 : matrix_(
std::move( m.matrix_ ) )
452 template<
typename MT
454 template<
typename MT2
456 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
const Matrix<MT2,SO2>& m )
459 if( !IsDiagonal<MT2>::value && !
isDiagonal( matrix_ ) ) {
463 if( !IsDiagonal<MT2>::value )
497 template<
typename MT
500 DiagonalMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
527 template<
typename MT
530 DiagonalMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const
558 template<
typename MT
561 DiagonalMatrix<MT,SO,false>::at(
size_t i,
size_t j )
592 template<
typename MT
595 DiagonalMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const
621 template<
typename MT
626 return matrix_.begin(i);
644 template<
typename MT
649 return matrix_.begin(i);
667 template<
typename MT
672 return matrix_.cbegin(i);
690 template<
typename MT
695 return matrix_.end(i);
713 template<
typename MT
718 return matrix_.end(i);
736 template<
typename MT
741 return matrix_.cend(i);
765 template<
typename MT
767 inline DiagonalMatrix<MT,SO,false>&
768 DiagonalMatrix<MT,SO,false>::operator=(
const DiagonalMatrix& rhs )
770 matrix_ = rhs.matrix_;
788 template<
typename MT
790 inline DiagonalMatrix<MT,SO,false>&
791 DiagonalMatrix<MT,SO,false>::operator=( DiagonalMatrix&& rhs ) noexcept
793 matrix_ = std::move( rhs.matrix_ );
817 template<
typename MT
819 template<
typename MT2
821 inline DisableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
822 DiagonalMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
824 if( !IsDiagonal<MT2>::value && !
isDiagonal( ~rhs ) ) {
830 if( !IsDiagonal<MT2>::value )
855 template<
typename MT
857 template<
typename MT2
859 inline EnableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
860 DiagonalMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
862 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
866 if( IsDiagonal<MT2>::value ) {
876 matrix_ = std::move( tmp );
879 if( !IsDiagonal<MT2>::value )
904 template<
typename MT
906 template<
typename MT2
908 inline DisableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
911 if( !IsDiagonal<MT2>::value && !
isDiagonal( ~rhs ) ) {
917 if( !IsDiagonal<MT2>::value )
942 template<
typename MT
944 template<
typename MT2
946 inline EnableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
949 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
953 if( IsDiagonal<MT2>::value ) {
957 const ResultType_<MT2> tmp( ~rhs );
966 if( !IsDiagonal<MT2>::value )
991 template<
typename MT
993 template<
typename MT2
995 inline DisableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
998 if( !IsDiagonal<MT2>::value && !
isDiagonal( ~rhs ) ) {
1004 if( !IsDiagonal<MT2>::value )
1029 template<
typename MT
1031 template<
typename MT2
1033 inline EnableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
1036 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1040 if( IsDiagonal<MT2>::value ) {
1044 const ResultType_<MT2> tmp( ~rhs );
1053 if( !IsDiagonal<MT2>::value )
1077 template<
typename MT
1079 template<
typename MT2
1081 inline DiagonalMatrix<MT,SO,false>&
1084 if( matrix_.rows() != (~rhs).
columns() ) {
1088 MT tmp( matrix_ * ~rhs );
1094 matrix_ = std::move( tmp );
1096 if( !IsDiagonal<MT2>::value )
1116 template<
typename MT
1118 template<
typename Other >
1119 inline EnableIf_< IsNumeric<Other>, DiagonalMatrix<MT,SO,false> >&
1136 template<
typename MT
1138 template<
typename Other >
1139 inline EnableIf_< IsNumeric<Other>, DiagonalMatrix<MT,SO,false> >&
1165 template<
typename MT
1169 return matrix_.rows();
1181 template<
typename MT
1185 return matrix_.columns();
1197 template<
typename MT
1201 return matrix_.capacity();
1219 template<
typename MT
1223 return matrix_.capacity(i);
1235 template<
typename MT
1239 return matrix_.nonZeros();
1257 template<
typename MT
1261 return matrix_.nonZeros(i);
1273 template<
typename MT
1296 template<
typename MT
1314 template<
typename MT
1342 template<
typename MT
1351 return matrix_.set( i, j, value );
1374 template<
typename MT
1377 DiagonalMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1383 return matrix_.insert( i, j, value );
1399 template<
typename MT
1401 inline void DiagonalMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1403 matrix_.erase( i, j );
1421 template<
typename MT
1424 DiagonalMatrix<MT,SO,false>::erase(
size_t i, Iterator pos )
1426 return matrix_.erase( i, pos );
1446 template<
typename MT
1449 DiagonalMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last )
1451 return matrix_.erase( i, first, last );
1472 template<
typename MT
1480 matrix_.resize( n, n, preserve );
1497 template<
typename MT
1499 inline void DiagonalMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1501 matrix_.reserve( nonzeros );
1521 template<
typename MT
1523 inline void DiagonalMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1525 matrix_.reserve( i, nonzeros );
1542 template<
typename MT
1544 inline void DiagonalMatrix<MT,SO,false>::trim()
1564 template<
typename MT
1566 inline void DiagonalMatrix<MT,SO,false>::trim(
size_t i )
1581 template<
typename MT
1583 template<
typename Other >
1584 inline DiagonalMatrix<MT,SO,false>&
1585 DiagonalMatrix<MT,SO,false>::scale(
const Other& scalar )
1587 matrix_.scale( scalar );
1601 template<
typename MT
1603 template<
typename Other >
1604 inline DiagonalMatrix<MT,SO,false>&
1605 DiagonalMatrix<MT,SO,false>::scaleDiagonal( Other scalar )
1607 matrix_.scaleDiagonal( scalar );
1621 template<
typename MT
1627 swap( matrix_, m.matrix_ );
1639 template<
typename MT
1641 inline void DiagonalMatrix<MT,SO,false>::resetNonDiagonal()
1643 for(
size_t i=0UL; i<
rows(); ++i ) {
1644 matrix_.erase( i, matrix_.begin( i ), matrix_.lowerBound( i, i ) );
1645 matrix_.erase( i, matrix_.upperBound( i, i ), matrix_.end( i ) );
1676 template<
typename MT
1679 DiagonalMatrix<MT,SO,false>::find(
size_t i,
size_t j )
1681 return matrix_.find( i, j );
1703 template<
typename MT
1706 DiagonalMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const
1708 return matrix_.find( i, j );
1730 template<
typename MT
1733 DiagonalMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
1735 return matrix_.lowerBound( i, j );
1757 template<
typename MT
1760 DiagonalMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const
1762 return matrix_.lowerBound( i, j );
1784 template<
typename MT
1787 DiagonalMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
1789 return matrix_.upperBound( i, j );
1811 template<
typename MT
1814 DiagonalMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const
1816 return matrix_.upperBound( i, j );
1880 template<
typename MT
1882 inline void DiagonalMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1888 matrix_.append( i, j, value, check );
1908 template<
typename MT
1910 inline void DiagonalMatrix<MT,SO,false>::finalize(
size_t i )
1912 matrix_.finalize( i );
1936 template<
typename MT
1967 template<
typename MT
1969 template<
typename Other >
1970 inline bool DiagonalMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
1972 return matrix_.canAlias( alias );
1989 template<
typename MT
1991 template<
typename Other >
1992 inline bool DiagonalMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
1994 return matrix_.isAliased( alias );
2011 template<
typename MT
2013 inline bool DiagonalMatrix<MT,SO,false>::canSMPAssign() const noexcept
2015 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.
#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
bool isDiagonal(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is diagonal.
Definition: DenseMatrix.h:1499
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:346
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:1339
Constraint on the data type.
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:188
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2643
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:5077
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2636
#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
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:384
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:1321
Constraint on the data type.
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2639
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:298
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:232
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
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.
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:5148
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5131
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
#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
#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.
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:330
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2640
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:538
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:254
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2641
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2645
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
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
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2642
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:1285
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
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2646
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:258
Constraint on the data type.
Constraint on the data type.
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:314
Header file for the implementation of the base template of the DiagonalMatrix.
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2637
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE(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.
#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
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2638
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:240
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2644
#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:1303
#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:609
#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