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 NewType >
128 typedef DiagonalMatrix< typename MT::template Rebind<NewType>::Other > Other;
135 template<
size_t NewM
139 typedef DiagonalMatrix< typename MT::template Resize<NewM,NewN>::Other > 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 );
172 inline ConstReference operator()(
size_t i,
size_t j )
const;
173 inline Reference at(
size_t i,
size_t j );
174 inline ConstReference at(
size_t i,
size_t j )
const;
175 inline Iterator
begin (
size_t i );
176 inline ConstIterator
begin (
size_t i )
const;
177 inline ConstIterator
cbegin(
size_t i )
const;
178 inline Iterator
end (
size_t i );
179 inline ConstIterator
end (
size_t i )
const;
180 inline ConstIterator
cend (
size_t i )
const;
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 Other >
212 inline EnableIf_< IsNumeric<Other>, DiagonalMatrix >&
operator*=( Other rhs );
214 template<
typename Other >
215 inline EnableIf_< IsNumeric<Other>, DiagonalMatrix >&
operator/=( Other rhs );
222 inline size_t rows() const noexcept;
223 inline
size_t columns() const noexcept;
224 inline
size_t capacity() const noexcept;
225 inline
size_t capacity(
size_t i ) const noexcept;
227 inline
size_t nonZeros(
size_t i ) const;
229 inline
void reset(
size_t i );
231 inline
void resize (
size_t n,
bool preserve=true );
232 inline
void reserve(
size_t nonzeros );
233 inline
void reserve(
size_t i,
size_t nonzeros );
235 inline
void trim(
size_t i );
236 inline
void swap( DiagonalMatrix& m ) noexcept;
243 inline Iterator
set (
size_t i,
size_t j, const ElementType& value );
244 inline Iterator insert (
size_t i,
size_t j, const ElementType& value );
245 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
246 inline
void finalize(
size_t i );
253 inline
void erase(
size_t i,
size_t j );
254 inline Iterator erase(
size_t i, Iterator pos );
255 inline Iterator erase(
size_t i, Iterator first, Iterator last );
257 template< typename Pred >
258 inline
void erase( Pred predicate );
260 template< typename Pred >
261 inline
void erase(
size_t i, Iterator first, Iterator last, Pred predicate );
268 inline Iterator find (
size_t i,
size_t j );
269 inline ConstIterator find (
size_t i,
size_t j ) const;
270 inline Iterator lowerBound(
size_t i,
size_t j );
271 inline ConstIterator lowerBound(
size_t i,
size_t j ) const;
272 inline Iterator upperBound(
size_t i,
size_t j );
273 inline ConstIterator upperBound(
size_t i,
size_t j ) const;
280 template< typename Other > inline DiagonalMatrix& scale( const Other& scalar );
281 template< typename Other > inline DiagonalMatrix& scaleDiagonal( const Other& scale );
288 inline
bool isIntact() const noexcept;
295 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
296 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
298 inline
bool canSMPAssign() const noexcept;
306 inline
void resetNonDiagonal();
318 template<
bool RF, typename MT2,
bool SO2,
bool DF2 >
319 friend
bool isDefault( const DiagonalMatrix<MT2,SO2,DF2>& m );
321 template< typename MT2,
bool SO2,
bool DF2 >
322 friend MT2& derestrict( DiagonalMatrix<MT2,SO2,DF2>& m );
357 template< typename MT
359 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix()
376 template<
typename MT
378 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
size_t n )
398 template<
typename MT
400 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
size_t n,
size_t nonzeros )
401 : matrix_( n, n, nonzeros )
422 template<
typename MT
424 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
425 : matrix_( n, n, nonzeros )
441 template<
typename MT
443 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
const DiagonalMatrix& m )
444 : matrix_( m.matrix_ )
459 template<
typename MT
461 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix( DiagonalMatrix&& m ) noexcept
462 : matrix_( std::move( m.matrix_ ) )
481 template<
typename MT
483 template<
typename MT2
485 inline DiagonalMatrix<MT,SO,false>::DiagonalMatrix(
const Matrix<MT2,SO2>& m )
488 if( !IsDiagonal<MT2>::value && !
isDiagonal( matrix_ ) ) {
492 if( !IsDiagonal<MT2>::value )
526 template<
typename MT
529 DiagonalMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
556 template<
typename MT
559 DiagonalMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const 587 template<
typename MT
590 DiagonalMatrix<MT,SO,false>::at(
size_t i,
size_t j )
621 template<
typename MT
624 DiagonalMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const 650 template<
typename MT
655 return matrix_.begin(i);
673 template<
typename MT
678 return matrix_.begin(i);
696 template<
typename MT
701 return matrix_.cbegin(i);
719 template<
typename MT
724 return matrix_.end(i);
742 template<
typename MT
747 return matrix_.end(i);
765 template<
typename MT
770 return matrix_.cend(i);
794 template<
typename MT
796 inline DiagonalMatrix<MT,SO,false>&
797 DiagonalMatrix<MT,SO,false>::operator=(
const DiagonalMatrix& rhs )
799 matrix_ = rhs.matrix_;
817 template<
typename MT
819 inline DiagonalMatrix<MT,SO,false>&
820 DiagonalMatrix<MT,SO,false>::operator=( DiagonalMatrix&& rhs ) noexcept
822 matrix_ = std::move( rhs.matrix_ );
846 template<
typename MT
848 template<
typename MT2
850 inline DisableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
851 DiagonalMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
853 if( !IsDiagonal<MT2>::value && !
isDiagonal( ~rhs ) ) {
859 if( !IsDiagonal<MT2>::value )
884 template<
typename MT
886 template<
typename MT2
888 inline EnableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
889 DiagonalMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
891 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
895 if( IsDiagonal<MT2>::value ) {
905 matrix_ = std::move( tmp );
908 if( !IsDiagonal<MT2>::value )
933 template<
typename MT
935 template<
typename MT2
937 inline DisableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
940 if( !IsDiagonal<MT2>::value && !
isDiagonal( ~rhs ) ) {
946 if( !IsDiagonal<MT2>::value )
971 template<
typename MT
973 template<
typename MT2
975 inline EnableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
978 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
982 if( IsDiagonal<MT2>::value ) {
986 const ResultType_<MT2> tmp( ~rhs );
995 if( !IsDiagonal<MT2>::value )
1020 template<
typename MT
1022 template<
typename MT2
1024 inline DisableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
1027 if( !IsDiagonal<MT2>::value && !
isDiagonal( ~rhs ) ) {
1033 if( !IsDiagonal<MT2>::value )
1058 template<
typename MT
1060 template<
typename MT2
1062 inline EnableIf_< IsComputation<MT2>, DiagonalMatrix<MT,SO,false>& >
1065 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1069 if( IsDiagonal<MT2>::value ) {
1073 const ResultType_<MT2> tmp( ~rhs );
1082 if( !IsDiagonal<MT2>::value )
1106 template<
typename MT
1108 template<
typename MT2
1110 inline DiagonalMatrix<MT,SO,false>&
1113 if( matrix_.rows() != (~rhs).
columns() ) {
1117 MT tmp( matrix_ * ~rhs );
1123 matrix_ = std::move( tmp );
1125 if( !IsDiagonal<MT2>::value )
1145 template<
typename MT
1147 template<
typename Other >
1148 inline EnableIf_< IsNumeric<Other>, DiagonalMatrix<MT,SO,false> >&
1165 template<
typename MT
1167 template<
typename Other >
1168 inline EnableIf_< IsNumeric<Other>, DiagonalMatrix<MT,SO,false> >&
1194 template<
typename MT
1198 return matrix_.rows();
1210 template<
typename MT
1214 return matrix_.columns();
1226 template<
typename MT
1230 return matrix_.capacity();
1248 template<
typename MT
1252 return matrix_.capacity(i);
1264 template<
typename MT
1268 return matrix_.nonZeros();
1286 template<
typename MT
1290 return matrix_.nonZeros(i);
1302 template<
typename MT
1325 template<
typename MT
1343 template<
typename MT
1370 template<
typename MT
1378 matrix_.resize( n, n, preserve );
1395 template<
typename MT
1397 inline void DiagonalMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1399 matrix_.reserve( nonzeros );
1419 template<
typename MT
1421 inline void DiagonalMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1423 matrix_.reserve( i, nonzeros );
1440 template<
typename MT
1442 inline void DiagonalMatrix<MT,SO,false>::trim()
1462 template<
typename MT
1464 inline void DiagonalMatrix<MT,SO,false>::trim(
size_t i )
1479 template<
typename MT
1485 swap( matrix_, m.matrix_ );
1497 template<
typename MT
1499 inline void DiagonalMatrix<MT,SO,false>::resetNonDiagonal()
1501 for(
size_t i=0UL; i<
rows(); ++i ) {
1502 matrix_.erase( i, matrix_.begin( i ), matrix_.lowerBound( i, i ) );
1503 matrix_.erase( i, matrix_.upperBound( i, i ), matrix_.end( i ) );
1534 template<
typename MT
1543 return matrix_.set( i, j, value );
1566 template<
typename MT
1569 DiagonalMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1575 return matrix_.insert( i, j, value );
1631 template<
typename MT
1633 inline void DiagonalMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1639 matrix_.append( i, j, value, check );
1659 template<
typename MT
1661 inline void DiagonalMatrix<MT,SO,false>::finalize(
size_t i )
1663 matrix_.finalize( i );
1687 template<
typename MT
1689 inline void DiagonalMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1691 matrix_.erase( i, j );
1709 template<
typename MT
1712 DiagonalMatrix<MT,SO,false>::erase(
size_t i, Iterator pos )
1714 return matrix_.erase( i, pos );
1734 template<
typename MT
1737 DiagonalMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last )
1739 return matrix_.erase( i, first, last );
1767 template<
typename MT
1769 template<
typename Pred >
1770 inline void DiagonalMatrix<MT,SO,false>::erase( Pred predicate )
1772 matrix_.erase( predicate );
1808 template<
typename MT
1810 template<
typename Pred >
1811 inline void DiagonalMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last, Pred predicate )
1813 matrix_.erase( i, first, last, predicate );
1845 template<
typename MT
1848 DiagonalMatrix<MT,SO,false>::find(
size_t i,
size_t j )
1850 return matrix_.find( i, j );
1872 template<
typename MT
1875 DiagonalMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const 1877 return matrix_.find( i, j );
1899 template<
typename MT
1902 DiagonalMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
1904 return matrix_.lowerBound( i, j );
1926 template<
typename MT
1929 DiagonalMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const 1931 return matrix_.lowerBound( i, j );
1953 template<
typename MT
1956 DiagonalMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
1958 return matrix_.upperBound( i, j );
1980 template<
typename MT
1983 DiagonalMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const 1985 return matrix_.upperBound( i, j );
2006 template<
typename MT
2008 template<
typename Other >
2009 inline DiagonalMatrix<MT,SO,false>&
2010 DiagonalMatrix<MT,SO,false>::scale(
const Other& scalar )
2012 matrix_.scale( scalar );
2026 template<
typename MT
2028 template<
typename Other >
2029 inline DiagonalMatrix<MT,SO,false>&
2030 DiagonalMatrix<MT,SO,false>::scaleDiagonal(
const Other& scalar )
2032 matrix_.scaleDiagonal( scalar );
2057 template<
typename MT
2088 template<
typename MT
2090 template<
typename Other >
2091 inline bool DiagonalMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2093 return matrix_.canAlias( alias );
2110 template<
typename MT
2112 template<
typename Other >
2113 inline bool DiagonalMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2115 return matrix_.isAliased( alias );
2132 template<
typename MT
2134 inline bool DiagonalMatrix<MT,SO,false>::canSMPAssign() const noexcept
2136 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
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:352
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:194
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:2935
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:5556
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2928
#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:1577
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:390
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:2931
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:304
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:238
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:5635
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5618
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
#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:336
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2932
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:544
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:260
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:2933
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2937
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:2934
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:2938
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:267
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:320
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:2929
#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:2930
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:249
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2936
#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:677
#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