35 #ifndef _BLAZE_MATH_ADAPTORS_DIAGONALMATRIX_SPARSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_DIAGONALMATRIX_SPARSE_H_ 98 class DiagonalMatrix<MT,SO,false>
99 :
public SparseMatrix< DiagonalMatrix<MT,SO,false>, SO >
103 using OT = OppositeType_t<MT>;
104 using TT = TransposeType_t<MT>;
105 using ET = ElementType_t<MT>;
110 using This = DiagonalMatrix<MT,SO,false>;
111 using BaseType = SparseMatrix<This,SO>;
112 using ResultType = This;
113 using OppositeType = DiagonalMatrix<OT,!SO,false>;
114 using TransposeType = DiagonalMatrix<TT,!SO,false>;
115 using ElementType = ET;
116 using ReturnType = ReturnType_t<MT>;
117 using CompositeType =
const This&;
118 using Reference = DiagonalProxy<MT>;
119 using ConstReference = ConstReference_t<MT>;
120 using Iterator = Iterator_t<MT>;
121 using ConstIterator = ConstIterator_t<MT>;
127 template<
typename NewType >
130 using Other = DiagonalMatrix< typename MT::template Rebind<NewType>::Other >;
137 template<
size_t NewM
141 using Other = DiagonalMatrix< typename MT::template Resize<NewM,NewN>::Other >;
147 static constexpr
bool smpAssignable =
false;
153 explicit inline DiagonalMatrix();
154 explicit inline DiagonalMatrix(
size_t n );
155 explicit inline DiagonalMatrix(
size_t n,
size_t nonzeros );
156 explicit inline DiagonalMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
157 inline DiagonalMatrix( initializer_list< initializer_list<ElementType> > list );
159 inline DiagonalMatrix(
const DiagonalMatrix& m );
160 inline DiagonalMatrix( DiagonalMatrix&& m ) noexcept;
162 template<
typename MT2,
bool SO2 >
163 inline DiagonalMatrix(
const Matrix<MT2,SO2>& m );
170 ~DiagonalMatrix() =
default;
177 inline Reference operator()(
size_t i,
size_t j );
178 inline ConstReference operator()(
size_t i,
size_t j )
const;
179 inline Reference at(
size_t i,
size_t j );
180 inline ConstReference at(
size_t i,
size_t j )
const;
181 inline Iterator
begin (
size_t i );
182 inline ConstIterator
begin (
size_t i )
const;
183 inline ConstIterator
cbegin(
size_t i )
const;
184 inline Iterator
end (
size_t i );
185 inline ConstIterator
end (
size_t i )
const;
186 inline ConstIterator
cend (
size_t i )
const;
193 inline DiagonalMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
195 inline DiagonalMatrix& operator=(
const DiagonalMatrix& rhs );
196 inline DiagonalMatrix& operator=( DiagonalMatrix&& rhs ) noexcept;
198 template<
typename MT2,
bool SO2 >
199 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
200 -> DisableIf_t< IsComputation_v<MT2>, DiagonalMatrix& >;
202 template<
typename MT2,
bool SO2 >
203 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
204 -> EnableIf_t< IsComputation_v<MT2>, DiagonalMatrix& >;
206 template<
typename MT2,
bool SO2 >
207 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
208 -> DisableIf_t< IsComputation_v<MT2>, DiagonalMatrix& >;
210 template<
typename MT2,
bool SO2 >
211 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
212 -> EnableIf_t< IsComputation_v<MT2>, DiagonalMatrix& >;
214 template<
typename MT2,
bool SO2 >
215 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
216 -> DisableIf_t< IsComputation_v<MT2>, DiagonalMatrix& >;
218 template<
typename MT2,
bool SO2 >
219 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
220 -> EnableIf_t< IsComputation_v<MT2>, DiagonalMatrix& >;
222 template<
typename MT2,
bool SO2 >
223 inline auto operator%=(
const Matrix<MT2,SO2>& rhs ) -> DiagonalMatrix&;
230 inline size_t rows() const noexcept;
231 inline
size_t columns() const noexcept;
232 inline
size_t capacity() const noexcept;
233 inline
size_t capacity(
size_t i ) const noexcept;
235 inline
size_t nonZeros(
size_t i ) const;
237 inline
void reset(
size_t i );
239 inline
void resize (
size_t n,
bool preserve=true );
240 inline
void reserve(
size_t nonzeros );
241 inline
void reserve(
size_t i,
size_t nonzeros );
243 inline
void trim(
size_t i );
245 inline
void swap( DiagonalMatrix& m ) noexcept;
252 inline Iterator
set (
size_t i,
size_t j, const ElementType& value );
253 inline Iterator insert (
size_t i,
size_t j, const ElementType& value );
254 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
255 inline
void finalize(
size_t i );
262 inline
void erase(
size_t i,
size_t j );
263 inline Iterator erase(
size_t i, Iterator pos );
264 inline Iterator erase(
size_t i, Iterator first, Iterator last );
266 template< typename Pred >
267 inline
void erase( Pred predicate );
269 template< typename Pred >
270 inline
void erase(
size_t i, Iterator first, Iterator last, Pred predicate );
277 inline Iterator find (
size_t i,
size_t j );
278 inline ConstIterator find (
size_t i,
size_t j ) const;
279 inline Iterator lowerBound(
size_t i,
size_t j );
280 inline ConstIterator lowerBound(
size_t i,
size_t j ) const;
281 inline Iterator upperBound(
size_t i,
size_t j );
282 inline ConstIterator upperBound(
size_t i,
size_t j ) const;
289 template< typename Other > inline DiagonalMatrix& scale( const Other& scalar );
296 inline
bool isIntact() const noexcept;
303 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
304 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
306 inline
bool canSMPAssign() const noexcept;
314 inline
void resetNonDiagonal();
326 template<
bool RF, typename MT2,
bool SO2,
bool DF2 >
327 friend
bool isDefault( const DiagonalMatrix<MT2,SO2,DF2>& m );
329 template< typename MT2,
bool SO2,
bool DF2 >
330 friend MT2& derestrict( DiagonalMatrix<MT2,SO2,DF2>& m );
367 template< typename MT
369 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix()
386 template<
typename MT
388 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
size_t n )
408 template<
typename MT
410 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
size_t n,
size_t nonzeros )
411 : matrix_( n, n, nonzeros )
432 template<
typename MT
434 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
435 : matrix_( n, n, nonzeros )
469 template<
typename MT
471 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix( initializer_list< initializer_list<ElementType> > list )
490 template<
typename MT
492 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
const DiagonalMatrix& m )
493 : matrix_( m.matrix_ )
508 template<
typename MT
510 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix( DiagonalMatrix&& m ) noexcept
511 : matrix_( std::move( m.matrix_ ) )
530 template<
typename MT
532 template<
typename MT2
534 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
const Matrix<MT2,SO2>& m )
537 if( !IsDiagonal_v<MT2> && !
isDiagonal( matrix_ ) ) {
541 if( !IsDiagonal_v<MT2> )
575 template<
typename MT
577 inline typename DiagonalMatrix<MT,SO,false>::Reference
578 DiagonalMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
583 return Reference( matrix_, i, j );
605 template<
typename MT
607 inline typename DiagonalMatrix<MT,SO,false>::ConstReference
608 DiagonalMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const 636 template<
typename MT
638 inline typename DiagonalMatrix<MT,SO,false>::Reference
639 DiagonalMatrix<MT,SO,false>::at(
size_t i,
size_t j )
670 template<
typename MT
672 inline typename DiagonalMatrix<MT,SO,false>::ConstReference
673 DiagonalMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const 699 template<
typename MT
701 inline typename DiagonalMatrix<MT,SO,false>::Iterator
704 return matrix_.begin(i);
722 template<
typename MT
724 inline typename DiagonalMatrix<MT,SO,false>::ConstIterator
727 return matrix_.begin(i);
745 template<
typename MT
747 inline typename DiagonalMatrix<MT,SO,false>::ConstIterator
750 return matrix_.cbegin(i);
768 template<
typename MT
770 inline typename DiagonalMatrix<MT,SO,false>::Iterator
773 return matrix_.end(i);
791 template<
typename MT
793 inline typename DiagonalMatrix<MT,SO,false>::ConstIterator
796 return matrix_.end(i);
814 template<
typename MT
816 inline typename DiagonalMatrix<MT,SO,false>::ConstIterator
819 return matrix_.cend(i);
858 template<
typename MT
860 inline DiagonalMatrix<MT,SO,false>&
861 DiagonalMatrix<MT,SO,false>::operator=( initializer_list< initializer_list<ElementType> > list )
863 const InitializerMatrix<ElementType> tmp( list, list.size() );
890 template<
typename MT
892 inline DiagonalMatrix<MT,SO,false>&
893 DiagonalMatrix<MT,SO,false>::operator=(
const DiagonalMatrix& rhs )
895 matrix_ = rhs.matrix_;
913 template<
typename MT
915 inline DiagonalMatrix<MT,SO,false>&
916 DiagonalMatrix<MT,SO,false>::operator=( DiagonalMatrix&& rhs ) noexcept
918 matrix_ = std::move( rhs.matrix_ );
942 template<
typename MT
944 template<
typename MT2
946 inline auto DiagonalMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
947 -> DisableIf_t< IsComputation_v<MT2>, DiagonalMatrix& >
949 if( !IsDiagonal_v<MT2> && !
isDiagonal( ~rhs ) ) {
955 if( !IsDiagonal_v<MT2> )
980 template<
typename MT
982 template<
typename MT2
984 inline auto DiagonalMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
985 -> EnableIf_t< IsComputation_v<MT2>, DiagonalMatrix& >
987 if( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) {
991 if( IsDiagonal_v<MT2> ) {
1001 matrix_ = std::move( tmp );
1004 if( !IsDiagonal_v<MT2> )
1029 template<
typename MT
1031 template<
typename MT2
1034 -> DisableIf_t< IsComputation_v<MT2>, DiagonalMatrix& >
1036 if( !IsDiagonal_v<MT2> && !
isDiagonal( ~rhs ) ) {
1042 if( !IsDiagonal_v<MT2> )
1067 template<
typename MT
1069 template<
typename MT2
1072 -> EnableIf_t< IsComputation_v<MT2>, DiagonalMatrix& >
1074 if( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) {
1078 if( IsDiagonal_v<MT2> ) {
1082 const ResultType_t<MT2> tmp( ~rhs );
1091 if( !IsDiagonal_v<MT2> )
1116 template<
typename MT
1118 template<
typename MT2
1121 -> DisableIf_t< IsComputation_v<MT2>, DiagonalMatrix& >
1123 if( !IsDiagonal_v<MT2> && !
isDiagonal( ~rhs ) ) {
1129 if( !IsDiagonal_v<MT2> )
1154 template<
typename MT
1156 template<
typename MT2
1159 -> EnableIf_t< IsComputation_v<MT2>, DiagonalMatrix& >
1161 if( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) {
1165 if( IsDiagonal_v<MT2> ) {
1169 const ResultType_t<MT2> tmp( ~rhs );
1178 if( !IsDiagonal_v<MT2> )
1201 template<
typename MT
1203 template<
typename MT2
1205 inline auto DiagonalMatrix<MT,SO,false>::operator%=(
const Matrix<MT2,SO2>& rhs )
1208 if( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) {
1214 if( !IsDiagonal_v<MT2> )
1240 template<
typename MT
1244 return matrix_.rows();
1256 template<
typename MT
1260 return matrix_.columns();
1272 template<
typename MT
1276 return matrix_.capacity();
1294 template<
typename MT
1298 return matrix_.capacity(i);
1310 template<
typename MT
1314 return matrix_.nonZeros();
1332 template<
typename MT
1336 return matrix_.nonZeros(i);
1348 template<
typename MT
1371 template<
typename MT
1389 template<
typename MT
1416 template<
typename MT
1424 matrix_.resize( n, n, preserve );
1441 template<
typename MT
1443 inline void DiagonalMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1445 matrix_.reserve( nonzeros );
1465 template<
typename MT
1467 inline void DiagonalMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1469 matrix_.reserve( i, nonzeros );
1486 template<
typename MT
1488 inline void DiagonalMatrix<MT,SO,false>::trim()
1508 template<
typename MT
1510 inline void DiagonalMatrix<MT,SO,false>::trim(
size_t i )
1528 template<
typename MT
1532 matrix_.shrinkToFit();
1545 template<
typename MT
1551 swap( matrix_, m.matrix_ );
1563 template<
typename MT
1565 inline void DiagonalMatrix<MT,SO,false>::resetNonDiagonal()
1569 for(
size_t i=0UL; i<
rows(); ++i ) {
1570 erase( matrix_, i, matrix_.begin( i ), matrix_.lowerBound( i, i ) );
1571 erase( matrix_, i, matrix_.upperBound( i, i ), matrix_.end( i ) );
1602 template<
typename MT
1604 inline typename DiagonalMatrix<MT,SO,false>::Iterator
1611 return matrix_.set( i, j, value );
1634 template<
typename MT
1636 inline typename DiagonalMatrix<MT,SO,false>::Iterator
1637 DiagonalMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1643 return matrix_.insert( i, j, value );
1699 template<
typename MT
1701 inline void DiagonalMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1707 matrix_.append( i, j, value, check );
1727 template<
typename MT
1729 inline void DiagonalMatrix<MT,SO,false>::finalize(
size_t i )
1731 matrix_.finalize( i );
1755 template<
typename MT
1757 inline void DiagonalMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1761 erase( matrix_, i, j );
1779 template<
typename MT
1781 inline typename DiagonalMatrix<MT,SO,false>::Iterator
1782 DiagonalMatrix<MT,SO,false>::erase(
size_t i, Iterator pos )
1786 return erase( matrix_, i, pos );
1806 template<
typename MT
1808 inline typename DiagonalMatrix<MT,SO,false>::Iterator
1809 DiagonalMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last )
1813 return erase( matrix_, i, first, last );
1841 template<
typename MT
1843 template<
typename Pred >
1844 inline void DiagonalMatrix<MT,SO,false>::erase( Pred predicate )
1848 erase( matrix_, predicate );
1884 template<
typename MT
1886 template<
typename Pred >
1887 inline void DiagonalMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last, Pred predicate )
1891 erase( matrix_, i, first, last, predicate );
1923 template<
typename MT
1925 inline typename DiagonalMatrix<MT,SO,false>::Iterator
1926 DiagonalMatrix<MT,SO,false>::find(
size_t i,
size_t j )
1928 return matrix_.find( i, j );
1950 template<
typename MT
1952 inline typename DiagonalMatrix<MT,SO,false>::ConstIterator
1953 DiagonalMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const 1955 return matrix_.find( i, j );
1977 template<
typename MT
1979 inline typename DiagonalMatrix<MT,SO,false>::Iterator
1980 DiagonalMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
1982 return matrix_.lowerBound( i, j );
2004 template<
typename MT
2006 inline typename DiagonalMatrix<MT,SO,false>::ConstIterator
2007 DiagonalMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const 2009 return matrix_.lowerBound( i, j );
2031 template<
typename MT
2033 inline typename DiagonalMatrix<MT,SO,false>::Iterator
2034 DiagonalMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
2036 return matrix_.upperBound( i, j );
2058 template<
typename MT
2060 inline typename DiagonalMatrix<MT,SO,false>::ConstIterator
2061 DiagonalMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const 2063 return matrix_.upperBound( i, j );
2095 template<
typename MT
2097 template<
typename Other >
2098 inline DiagonalMatrix<MT,SO,false>&
2099 DiagonalMatrix<MT,SO,false>::scale(
const Other& scalar )
2101 matrix_.scale( scalar );
2126 template<
typename MT
2157 template<
typename MT
2159 template<
typename Other >
2160 inline bool DiagonalMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2162 return matrix_.canAlias( alias );
2179 template<
typename MT
2181 template<
typename Other >
2182 inline bool DiagonalMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2184 return matrix_.isAliased( alias );
2201 template<
typename MT
2203 inline bool DiagonalMatrix<MT,SO,false>::canSMPAssign() const noexcept
2205 return matrix_.canSMPAssign();
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSFORMATION_TYPE(T)
Constraint on the data type.In case the given data type T is a transformation expression (i....
Definition: Transformation.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type,...
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
Constraint on the data type.
Header file for auxiliary alias declarations.
auto operator-=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Subtraction assignment operator for the subtraction of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:432
constexpr ptrdiff_t Size_v
Auxiliary variable template for the Size type trait.The Size_v variable template provides a convenien...
Definition: Size.h:176
decltype(auto) decldiag(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as diagonal.
Definition: DMatDeclDiagExpr.h:975
Constraint on the data type.
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression,...
Definition: Assert.h:117
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:546
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.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.In case the given data type T is a computational expression (i....
Definition: Computation.h:81
Constraint on the data type.
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition: Matrix.h:799
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type,...
Definition: Volatile.h:79
bool isDiagonal(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is diagonal.
Definition: DenseMatrix.h:2328
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:584
Header file for the extended initializer_list functionality.
Constraint on the data type.
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
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:482
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:416
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 implementation of a matrix representation of an initializer list.
Header file for the DisableIf class template.
Header file for the DiagonalProxy class.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#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
auto operator+=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Addition assignment operator for the addition of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:370
Constraint on the data type.
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
void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:738
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:438
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:615
#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,...
Definition: Symmetric.h:79
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,...
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:282
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:75
Constraint on the data type.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VIEW_TYPE(T)
Constraint on the data type.In case the given data type T is a view type (i.e. a subvector,...
Definition: View.h:81
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
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.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:264
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:635
#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,...
Definition: Hermitian.h:79
#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
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:951
Header file for the Size type trait.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression,...
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
Header file for the clear shim.