35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_SPARSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_SPARSE_H_ 100 template<
typename MT
102 class StrictlyLowerMatrix<MT,SO,false>
103 :
public SparseMatrix< StrictlyLowerMatrix<MT,SO,false>, SO >
107 using OT = OppositeType_<MT>;
108 using TT = TransposeType_<MT>;
109 using ET = ElementType_<MT>;
114 using This = StrictlyLowerMatrix<MT,SO,false>;
115 using BaseType = SparseMatrix<This,SO>;
122 using Reference = StrictlyLowerProxy<MT>;
131 template<
typename NewType >
134 using Other = StrictlyLowerMatrix< typename MT::template Rebind<NewType>::Other >;
141 template<
size_t NewM
145 using Other = StrictlyLowerMatrix< typename MT::template Resize<NewM,NewN>::Other >;
151 enum :
bool { smpAssignable =
false };
157 explicit inline StrictlyLowerMatrix();
158 explicit inline StrictlyLowerMatrix(
size_t n );
159 explicit inline StrictlyLowerMatrix(
size_t n,
size_t nonzeros );
160 explicit inline StrictlyLowerMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
162 inline StrictlyLowerMatrix(
const StrictlyLowerMatrix& m );
163 inline StrictlyLowerMatrix( StrictlyLowerMatrix&& m ) noexcept;
165 template<
typename MT2,
bool SO2 >
166 inline StrictlyLowerMatrix(
const Matrix<MT2,SO2>& m );
177 inline Reference operator()(
size_t i,
size_t j );
179 inline Reference at(
size_t i,
size_t j );
193 inline StrictlyLowerMatrix& operator=(
const StrictlyLowerMatrix& rhs );
194 inline StrictlyLowerMatrix& operator=( StrictlyLowerMatrix&& rhs ) noexcept;
196 template<
typename MT2,
bool SO2 >
197 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
198 operator=(
const Matrix<MT2,SO2>& rhs );
200 template<
typename MT2,
bool SO2 >
201 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
202 operator=(
const Matrix<MT2,SO2>& rhs );
204 template<
typename MT2,
bool SO2 >
205 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
208 template<
typename MT2,
bool SO2 >
209 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
212 template<
typename MT2,
bool SO2 >
213 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
216 template<
typename MT2,
bool SO2 >
217 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
220 template<
typename MT2,
bool SO2 >
221 inline StrictlyLowerMatrix& operator%=(
const Matrix<MT2,SO2>& rhs );
223 template<
typename MT2,
bool SO2 >
224 inline StrictlyLowerMatrix&
operator*=(
const Matrix<MT2,SO2>& rhs );
226 template<
typename Other >
227 inline EnableIf_< IsNumeric<Other>, StrictlyLowerMatrix >&
operator*=( Other rhs );
229 template<
typename Other >
230 inline EnableIf_< IsNumeric<Other>, StrictlyLowerMatrix >&
operator/=( Other rhs );
237 inline size_t rows() const noexcept;
238 inline
size_t columns() const noexcept;
239 inline
size_t capacity() const noexcept;
240 inline
size_t capacity(
size_t i ) const noexcept;
242 inline
size_t nonZeros(
size_t i ) const;
244 inline
void reset(
size_t i );
246 inline
void resize (
size_t n,
bool preserve=true );
247 inline
void reserve(
size_t nonzeros );
248 inline
void reserve(
size_t i,
size_t nonzeros );
250 inline
void trim(
size_t i );
252 inline
void swap( StrictlyLowerMatrix& m ) noexcept;
254 static inline constexpr
size_t maxNonZeros() noexcept;
255 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
264 inline
void append (
size_t i,
size_t j, const
ElementType& value,
bool check=false );
265 inline
void finalize(
size_t i );
272 inline
void erase(
size_t i,
size_t j );
276 template< typename Pred >
277 inline
void erase( Pred predicate );
279 template< typename Pred >
280 inline
void erase(
size_t i,
Iterator first,
Iterator last, Pred predicate );
287 inline
Iterator find (
size_t i,
size_t j );
289 inline
Iterator lowerBound(
size_t i,
size_t j );
291 inline
Iterator upperBound(
size_t i,
size_t j );
299 template< typename Other > inline StrictlyLowerMatrix& scale( const Other& scalar );
300 template< typename Other > inline StrictlyLowerMatrix& scaleDiagonal( const Other& scale );
307 inline
bool isIntact() const noexcept;
314 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
315 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
317 inline
bool canSMPAssign() const noexcept;
325 inline
void resetUpper();
337 template< typename MT2,
bool SO2,
bool DF2 >
338 friend MT2& derestrict( StrictlyLowerMatrix<MT2,SO2,DF2>& m );
373 template< typename MT
375 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix()
392 template<
typename MT
394 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix(
size_t n )
415 template<
typename MT
417 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix(
size_t n,
size_t nonzeros )
418 : matrix_( n, n,
max( nonzeros, n ) )
442 template<
typename MT
444 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
445 : matrix_( n, n, nonzeros )
461 template<
typename MT
463 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix(
const StrictlyLowerMatrix& m )
464 : matrix_( m.matrix_ )
479 template<
typename MT
481 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix( StrictlyLowerMatrix&& m ) noexcept
482 : matrix_( std::move( m.matrix_ ) )
502 template<
typename MT
504 template<
typename MT2
506 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix(
const Matrix<MT2,SO2>& m )
509 if( IsUniTriangular<MT2>::value ||
514 if( !IsStrictlyLower<MT2>::value )
548 template<
typename MT
551 StrictlyLowerMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
578 template<
typename MT
581 StrictlyLowerMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const 609 template<
typename MT
612 StrictlyLowerMatrix<MT,SO,false>::at(
size_t i,
size_t j )
643 template<
typename MT
646 StrictlyLowerMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const 672 template<
typename MT
677 return matrix_.begin(i);
695 template<
typename MT
700 return matrix_.begin(i);
718 template<
typename MT
723 return matrix_.cbegin(i);
741 template<
typename MT
746 return matrix_.end(i);
764 template<
typename MT
769 return matrix_.end(i);
787 template<
typename MT
792 return matrix_.cend(i);
816 template<
typename MT
818 inline StrictlyLowerMatrix<MT,SO,false>&
819 StrictlyLowerMatrix<MT,SO,false>::operator=(
const StrictlyLowerMatrix& rhs )
821 matrix_ = rhs.matrix_;
839 template<
typename MT
841 inline StrictlyLowerMatrix<MT,SO,false>&
842 StrictlyLowerMatrix<MT,SO,false>::operator=( StrictlyLowerMatrix&& rhs ) noexcept
844 matrix_ = std::move( rhs.matrix_ );
868 template<
typename MT
870 template<
typename MT2
872 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,false>& >
873 StrictlyLowerMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
875 if( IsUniTriangular<MT2>::value ||
882 if( !IsStrictlyLower<MT2>::value )
907 template<
typename MT
909 template<
typename MT2
911 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,false>& >
912 StrictlyLowerMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
914 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
918 if( IsStrictlyLower<MT2>::value ) {
928 matrix_ = std::move( tmp );
931 if( !IsStrictlyLower<MT2>::value )
956 template<
typename MT
958 template<
typename MT2
960 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,false>& >
963 if( IsUniTriangular<MT2>::value ||
970 if( !IsStrictlyLower<MT2>::value )
995 template<
typename MT
997 template<
typename MT2
999 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,false>& >
1002 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1006 if( IsStrictlyLower<MT2>::value ) {
1010 const ResultType_<MT2> tmp( ~rhs );
1019 if( !IsStrictlyLower<MT2>::value )
1044 template<
typename MT
1046 template<
typename MT2
1048 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,false>& >
1051 if( IsUniTriangular<MT2>::value ||
1058 if( !IsStrictlyLower<MT2>::value )
1083 template<
typename MT
1085 template<
typename MT2
1087 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,false>& >
1090 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1094 if( IsStrictlyLower<MT2>::value ) {
1098 const ResultType_<MT2> tmp( ~rhs );
1107 if( !IsStrictlyLower<MT2>::value )
1131 template<
typename MT
1133 template<
typename MT2
1135 inline StrictlyLowerMatrix<MT,SO,false>&
1136 StrictlyLowerMatrix<MT,SO,false>::operator%=(
const Matrix<MT2,SO2>& rhs )
1138 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1144 if( !IsStrictlyLower<MT2>::value )
1168 template<
typename MT
1170 template<
typename MT2
1172 inline StrictlyLowerMatrix<MT,SO,false>&
1175 if( matrix_.rows() != (~rhs).
columns() ) {
1179 MT tmp( matrix_ * ~rhs );
1185 matrix_ = std::move( tmp );
1187 if( !IsStrictlyLower<MT2>::value )
1207 template<
typename MT
1209 template<
typename Other >
1210 inline EnableIf_< IsNumeric<Other>, StrictlyLowerMatrix<MT,SO,false> >&
1227 template<
typename MT
1229 template<
typename Other >
1230 inline EnableIf_< IsNumeric<Other>, StrictlyLowerMatrix<MT,SO,false> >&
1256 template<
typename MT
1260 return matrix_.rows();
1272 template<
typename MT
1276 return matrix_.columns();
1288 template<
typename MT
1292 return matrix_.capacity();
1310 template<
typename MT
1314 return matrix_.capacity(i);
1326 template<
typename MT
1330 return matrix_.nonZeros();
1348 template<
typename MT
1352 return matrix_.nonZeros(i);
1364 template<
typename MT
1369 for(
size_t j=0UL; j<
columns(); ++j ) {
1370 matrix_.erase( j, matrix_.lowerBound(j+1UL,j), matrix_.end(j) );
1374 for(
size_t i=1UL; i<
rows(); ++i ) {
1375 matrix_.erase( i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1396 template<
typename MT
1401 matrix_.erase( i, matrix_.lowerBound(i+1UL,i), matrix_.end(i) );
1404 matrix_.erase( i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1419 template<
typename MT
1425 if( IsResizable<MT>::value ) {
1451 template<
typename MT
1459 matrix_.resize( n, n, preserve );
1476 template<
typename MT
1478 inline void StrictlyLowerMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1480 matrix_.reserve( nonzeros );
1501 template<
typename MT
1503 inline void StrictlyLowerMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1505 matrix_.reserve( i, nonzeros );
1522 template<
typename MT
1524 inline void StrictlyLowerMatrix<MT,SO,false>::trim()
1544 template<
typename MT
1546 inline void StrictlyLowerMatrix<MT,SO,false>::trim(
size_t i )
1564 template<
typename MT
1568 matrix_.shrinkToFit();
1581 template<
typename MT
1587 swap( matrix_, m.matrix_ );
1605 template<
typename MT
1607 inline constexpr
size_t StrictlyLowerMatrix<MT,SO,false>::maxNonZeros() noexcept
1611 return maxNonZeros( Rows<MT>::value );
1627 template<
typename MT
1629 inline constexpr
size_t StrictlyLowerMatrix<MT,SO,false>::maxNonZeros(
size_t n ) noexcept
1631 return ( ( n - 1UL ) * n ) / 2UL;
1643 template<
typename MT
1645 inline void StrictlyLowerMatrix<MT,SO,false>::resetUpper()
1648 for(
size_t j=1UL; j<
columns(); ++j )
1649 matrix_.erase( j, matrix_.begin( j ), matrix_.lowerBound( j, j ) );
1652 for(
size_t i=0UL; i<
rows(); ++i )
1653 matrix_.erase( i, matrix_.upperBound( i, i ), matrix_.end( i ) );
1684 template<
typename MT
1693 return matrix_.set( i, j, value );
1716 template<
typename MT
1719 StrictlyLowerMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1725 return matrix_.insert( i, j, value );
1781 template<
typename MT
1783 inline void StrictlyLowerMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1789 matrix_.append( i, j, value, check );
1809 template<
typename MT
1811 inline void StrictlyLowerMatrix<MT,SO,false>::finalize(
size_t i )
1813 matrix_.finalize( i );
1837 template<
typename MT
1839 inline void StrictlyLowerMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1841 matrix_.erase( i, j );
1859 template<
typename MT
1862 StrictlyLowerMatrix<MT,SO,false>::erase(
size_t i,
Iterator pos )
1864 return matrix_.erase( i, pos );
1884 template<
typename MT
1887 StrictlyLowerMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last )
1889 return matrix_.erase( i, first, last );
1917 template<
typename MT
1919 template<
typename Pred >
1920 inline void StrictlyLowerMatrix<MT,SO,false>::erase( Pred predicate )
1922 matrix_.erase( predicate );
1958 template<
typename MT
1960 template<
typename Pred >
1961 inline void StrictlyLowerMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last, Pred predicate )
1963 matrix_.erase( i, first, last, predicate );
1995 template<
typename MT
1998 StrictlyLowerMatrix<MT,SO,false>::find(
size_t i,
size_t j )
2000 return matrix_.find( i, j );
2022 template<
typename MT
2025 StrictlyLowerMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const 2027 return matrix_.find( i, j );
2049 template<
typename MT
2052 StrictlyLowerMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
2054 return matrix_.lowerBound( i, j );
2076 template<
typename MT
2079 StrictlyLowerMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const 2081 return matrix_.lowerBound( i, j );
2103 template<
typename MT
2106 StrictlyLowerMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
2108 return matrix_.upperBound( i, j );
2130 template<
typename MT
2133 StrictlyLowerMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const 2135 return matrix_.upperBound( i, j );
2167 template<
typename MT
2169 template<
typename Other >
2170 inline StrictlyLowerMatrix<MT,SO,false>&
2171 StrictlyLowerMatrix<MT,SO,false>::scale(
const Other& scalar )
2173 matrix_.scale( scalar );
2190 template<
typename MT
2192 template<
typename Other >
2193 inline StrictlyLowerMatrix<MT,SO,false>&
2194 StrictlyLowerMatrix<MT,SO,false>::scaleDiagonal(
const Other& scalar )
2196 matrix_.scaleDiagonal( scalar );
2221 template<
typename MT
2252 template<
typename MT
2254 template<
typename Other >
2255 inline bool StrictlyLowerMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2257 return matrix_.canAlias( alias );
2274 template<
typename MT
2276 template<
typename Other >
2277 inline bool StrictlyLowerMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2279 return matrix_.isAliased( alias );
2296 template<
typename MT
2298 inline bool StrictlyLowerMatrix<MT,SO,false>::canSMPAssign() const noexcept
2300 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
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1245
#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.
Header file for the implementation of the base template of the StrictlyLowerMatrix.
#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
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
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.
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1809
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.
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.
Headerfile for the generic max algorithm.
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 clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_CONSTRAINT_MUST_BE_STATIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a static data type, i.e. a vector or matrix with dimensions fixed at compile time, a compilation error is created.
Definition: Static.h:61
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.
decltype(auto) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:1027
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
Header file for the SparseElement base class.
Header file for the IsUniTriangular type trait.
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.
Header file for the IsStrictlyLower type trait.
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
Header file for all adaptor forward declarations.
#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.
Header file for the StrictlyLowerProxy class.
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
#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
#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
Header file for the IsResizable type trait.
#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