35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_SPARSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_SPARSE_H_ 102 template<
typename MT
104 class StrictlyLowerMatrix<MT,SO,false>
105 :
public SparseMatrix< StrictlyLowerMatrix<MT,SO,false>, SO >
109 using OT = OppositeType_t<MT>;
110 using TT = TransposeType_t<MT>;
111 using ET = ElementType_t<MT>;
116 using This = StrictlyLowerMatrix<MT,SO,false>;
117 using BaseType = SparseMatrix<This,SO>;
118 using ResultType = This;
119 using OppositeType = StrictlyLowerMatrix<OT,!SO,false>;
120 using TransposeType = StrictlyUpperMatrix<TT,!SO,false>;
121 using ElementType = ET;
122 using ReturnType = ReturnType_t<MT>;
123 using CompositeType =
const This&;
124 using Reference = StrictlyLowerProxy<MT>;
125 using ConstReference = ConstReference_t<MT>;
126 using Iterator = Iterator_t<MT>;
127 using ConstIterator = ConstIterator_t<MT>;
133 template<
typename NewType >
136 using Other = StrictlyLowerMatrix< typename MT::template Rebind<NewType>::Other >;
143 template<
size_t NewM
147 using Other = StrictlyLowerMatrix< typename MT::template Resize<NewM,NewN>::Other >;
153 static constexpr
bool smpAssignable =
false;
159 explicit inline StrictlyLowerMatrix();
160 explicit inline StrictlyLowerMatrix(
size_t n );
161 explicit inline StrictlyLowerMatrix(
size_t n,
size_t nonzeros );
162 explicit inline StrictlyLowerMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
163 inline StrictlyLowerMatrix( initializer_list< initializer_list<ElementType> > list );
165 inline StrictlyLowerMatrix(
const StrictlyLowerMatrix& m );
166 inline StrictlyLowerMatrix( StrictlyLowerMatrix&& m ) noexcept;
168 template<
typename MT2,
bool SO2 >
169 inline StrictlyLowerMatrix(
const Matrix<MT2,SO2>& m );
176 ~StrictlyLowerMatrix() =
default;
183 inline Reference operator()(
size_t i,
size_t j );
184 inline ConstReference operator()(
size_t i,
size_t j )
const;
185 inline Reference at(
size_t i,
size_t j );
186 inline ConstReference at(
size_t i,
size_t j )
const;
187 inline Iterator
begin (
size_t i );
188 inline ConstIterator
begin (
size_t i )
const;
189 inline ConstIterator
cbegin(
size_t i )
const;
190 inline Iterator
end (
size_t i );
191 inline ConstIterator
end (
size_t i )
const;
192 inline ConstIterator
cend (
size_t i )
const;
199 inline StrictlyLowerMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
201 inline StrictlyLowerMatrix& operator=(
const StrictlyLowerMatrix& rhs );
202 inline StrictlyLowerMatrix& operator=( StrictlyLowerMatrix&& rhs ) noexcept;
204 template<
typename MT2,
bool SO2 >
205 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
206 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >;
208 template<
typename MT2,
bool SO2 >
209 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
210 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >;
212 template<
typename MT2,
bool SO2 >
213 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
214 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >;
216 template<
typename MT2,
bool SO2 >
217 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
218 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >;
220 template<
typename MT2,
bool SO2 >
221 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
222 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >;
224 template<
typename MT2,
bool SO2 >
225 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
226 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >;
228 template<
typename MT2,
bool SO2 >
229 inline auto operator%=(
const Matrix<MT2,SO2>& rhs ) -> StrictlyLowerMatrix&;
236 inline size_t rows() const noexcept;
237 inline
size_t columns() const noexcept;
238 inline
size_t capacity() const noexcept;
239 inline
size_t capacity(
size_t i ) const noexcept;
241 inline
size_t nonZeros(
size_t i ) const;
243 inline
void reset(
size_t i );
245 inline
void resize (
size_t n,
bool preserve=true );
246 inline
void reserve(
size_t nonzeros );
247 inline
void reserve(
size_t i,
size_t nonzeros );
249 inline
void trim(
size_t i );
251 inline
void swap( StrictlyLowerMatrix& m ) noexcept;
253 static inline constexpr
size_t maxNonZeros() noexcept;
254 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
261 inline Iterator
set (
size_t i,
size_t j, const ElementType& value );
262 inline Iterator insert (
size_t i,
size_t j, const ElementType& value );
263 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
264 inline
void finalize(
size_t i );
271 inline
void erase(
size_t i,
size_t j );
272 inline Iterator erase(
size_t i, Iterator pos );
273 inline Iterator erase(
size_t i, Iterator first, Iterator last );
275 template< typename Pred >
276 inline
void erase( Pred predicate );
278 template< typename Pred >
279 inline
void erase(
size_t i, Iterator first, Iterator last, Pred predicate );
286 inline Iterator find (
size_t i,
size_t j );
287 inline ConstIterator find (
size_t i,
size_t j ) const;
288 inline Iterator lowerBound(
size_t i,
size_t j );
289 inline ConstIterator lowerBound(
size_t i,
size_t j ) const;
290 inline Iterator upperBound(
size_t i,
size_t j );
291 inline ConstIterator upperBound(
size_t i,
size_t j ) const;
298 template< typename Other > inline StrictlyLowerMatrix& scale( const Other& scalar );
305 inline
bool isIntact() const noexcept;
312 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
313 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
315 inline
bool canSMPAssign() const noexcept;
323 inline
void resetUpper();
335 template< typename MT2,
bool SO2,
bool DF2 >
336 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 )
479 template<
typename MT
481 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix( initializer_list< initializer_list<ElementType> > list )
500 template<
typename MT
502 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix(
const StrictlyLowerMatrix& m )
503 : matrix_( m.matrix_ )
518 template<
typename MT
520 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix( StrictlyLowerMatrix&& m ) noexcept
521 : matrix_( std::move( m.matrix_ ) )
541 template<
typename MT
543 template<
typename MT2
545 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix(
const Matrix<MT2,SO2>& m )
548 if( IsUniTriangular_v<MT2> ||
553 if( !IsStrictlyLower_v<MT2> )
587 template<
typename MT
589 inline typename StrictlyLowerMatrix<MT,SO,false>::Reference
590 StrictlyLowerMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
595 return Reference( matrix_, i, j );
617 template<
typename MT
619 inline typename StrictlyLowerMatrix<MT,SO,false>::ConstReference
620 StrictlyLowerMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const 648 template<
typename MT
650 inline typename StrictlyLowerMatrix<MT,SO,false>::Reference
651 StrictlyLowerMatrix<MT,SO,false>::at(
size_t i,
size_t j )
682 template<
typename MT
684 inline typename StrictlyLowerMatrix<MT,SO,false>::ConstReference
685 StrictlyLowerMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const 711 template<
typename MT
713 inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
716 return matrix_.begin(i);
734 template<
typename MT
736 inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
739 return matrix_.begin(i);
757 template<
typename MT
759 inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
762 return matrix_.cbegin(i);
780 template<
typename MT
782 inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
785 return matrix_.end(i);
803 template<
typename MT
805 inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
808 return matrix_.end(i);
826 template<
typename MT
828 inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
831 return matrix_.cend(i);
870 template<
typename MT
872 inline StrictlyLowerMatrix<MT,SO,false>&
873 StrictlyLowerMatrix<MT,SO,false>::operator=( initializer_list< initializer_list<ElementType> > list )
875 const InitializerMatrix<ElementType> tmp( list, list.size() );
902 template<
typename MT
904 inline StrictlyLowerMatrix<MT,SO,false>&
905 StrictlyLowerMatrix<MT,SO,false>::operator=(
const StrictlyLowerMatrix& rhs )
907 matrix_ = rhs.matrix_;
925 template<
typename MT
927 inline StrictlyLowerMatrix<MT,SO,false>&
928 StrictlyLowerMatrix<MT,SO,false>::operator=( StrictlyLowerMatrix&& rhs ) noexcept
930 matrix_ = std::move( rhs.matrix_ );
954 template<
typename MT
956 template<
typename MT2
958 inline auto StrictlyLowerMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
959 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
961 if( IsUniTriangular_v<MT2> ||
968 if( !IsStrictlyLower_v<MT2> )
993 template<
typename MT
995 template<
typename MT2
997 inline auto StrictlyLowerMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
998 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1000 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1004 if( IsStrictlyLower_v<MT2> ) {
1014 matrix_ = std::move( tmp );
1017 if( !IsStrictlyLower_v<MT2> )
1042 template<
typename MT
1044 template<
typename MT2
1047 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1049 if( IsUniTriangular_v<MT2> ||
1056 if( !IsStrictlyLower_v<MT2> )
1081 template<
typename MT
1083 template<
typename MT2
1086 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1088 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1092 if( IsStrictlyLower_v<MT2> ) {
1096 const ResultType_t<MT2> tmp( ~rhs );
1105 if( !IsStrictlyLower_v<MT2> )
1130 template<
typename MT
1132 template<
typename MT2
1135 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1137 if( IsUniTriangular_v<MT2> ||
1144 if( !IsStrictlyLower_v<MT2> )
1169 template<
typename MT
1171 template<
typename MT2
1174 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1176 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1180 if( IsStrictlyLower_v<MT2> ) {
1184 const ResultType_t<MT2> tmp( ~rhs );
1193 if( !IsStrictlyLower_v<MT2> )
1217 template<
typename MT
1219 template<
typename MT2
1221 inline auto StrictlyLowerMatrix<MT,SO,false>::operator%=(
const Matrix<MT2,SO2>& rhs )
1222 -> StrictlyLowerMatrix&
1224 if( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) {
1230 if( !IsStrictlyLower_v<MT2> )
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
1371 for(
size_t j=0UL; j<
columns(); ++j ) {
1372 erase( matrix_, j, matrix_.lowerBound(j+1UL,j), matrix_.end(j) );
1376 for(
size_t i=1UL; i<
rows(); ++i ) {
1377 erase( matrix_, i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1398 template<
typename MT
1405 erase( matrix_, i, matrix_.lowerBound(i+1UL,i), matrix_.end(i) );
1408 erase( matrix_, i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1423 template<
typename MT
1429 if( IsResizable_v<MT> ) {
1455 template<
typename MT
1463 matrix_.resize( n, n, preserve );
1480 template<
typename MT
1482 inline void StrictlyLowerMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1484 matrix_.reserve( nonzeros );
1505 template<
typename MT
1507 inline void StrictlyLowerMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1509 matrix_.reserve( i, nonzeros );
1526 template<
typename MT
1528 inline void StrictlyLowerMatrix<MT,SO,false>::trim()
1548 template<
typename MT
1550 inline void StrictlyLowerMatrix<MT,SO,false>::trim(
size_t i )
1568 template<
typename MT
1572 matrix_.shrinkToFit();
1585 template<
typename MT
1591 swap( matrix_, m.matrix_ );
1609 template<
typename MT
1611 inline constexpr
size_t StrictlyLowerMatrix<MT,SO,false>::maxNonZeros() noexcept
1615 return maxNonZeros( Size_v<MT,0UL> );
1631 template<
typename MT
1633 inline constexpr
size_t StrictlyLowerMatrix<MT,SO,false>::maxNonZeros(
size_t n ) noexcept
1635 return ( ( n - 1UL ) * n ) / 2UL;
1647 template<
typename MT
1649 inline void StrictlyLowerMatrix<MT,SO,false>::resetUpper()
1654 for(
size_t j=1UL; j<
columns(); ++j )
1655 erase( matrix_, j, matrix_.begin( j ), matrix_.lowerBound( j, j ) );
1658 for(
size_t i=0UL; i<
rows(); ++i )
1659 erase( matrix_, i, matrix_.upperBound( i, i ), matrix_.end( i ) );
1690 template<
typename MT
1692 inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
1699 return matrix_.set( i, j, value );
1722 template<
typename MT
1724 inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
1725 StrictlyLowerMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1731 return matrix_.insert( i, j, value );
1787 template<
typename MT
1789 inline void StrictlyLowerMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1795 matrix_.append( i, j, value, check );
1815 template<
typename MT
1817 inline void StrictlyLowerMatrix<MT,SO,false>::finalize(
size_t i )
1819 matrix_.finalize( i );
1843 template<
typename MT
1845 inline void StrictlyLowerMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1849 erase( matrix_, i, j );
1867 template<
typename MT
1869 inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
1870 StrictlyLowerMatrix<MT,SO,false>::erase(
size_t i, Iterator pos )
1874 return erase( matrix_, i, pos );
1894 template<
typename MT
1896 inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
1897 StrictlyLowerMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last )
1901 return erase( matrix_, i, first, last );
1929 template<
typename MT
1931 template<
typename Pred >
1932 inline void StrictlyLowerMatrix<MT,SO,false>::erase( Pred predicate )
1936 erase( matrix_, predicate );
1972 template<
typename MT
1974 template<
typename Pred >
1975 inline void StrictlyLowerMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last, Pred predicate )
1979 erase( matrix_, i, first, last, predicate );
2011 template<
typename MT
2013 inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
2014 StrictlyLowerMatrix<MT,SO,false>::find(
size_t i,
size_t j )
2016 return matrix_.find( i, j );
2038 template<
typename MT
2040 inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
2041 StrictlyLowerMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const 2043 return matrix_.find( i, j );
2065 template<
typename MT
2067 inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
2068 StrictlyLowerMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
2070 return matrix_.lowerBound( i, j );
2092 template<
typename MT
2094 inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
2095 StrictlyLowerMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const 2097 return matrix_.lowerBound( i, j );
2119 template<
typename MT
2121 inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
2122 StrictlyLowerMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
2124 return matrix_.upperBound( i, j );
2146 template<
typename MT
2148 inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
2149 StrictlyLowerMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const 2151 return matrix_.upperBound( i, j );
2183 template<
typename MT
2185 template<
typename Other >
2186 inline StrictlyLowerMatrix<MT,SO,false>&
2187 StrictlyLowerMatrix<MT,SO,false>::scale(
const Other& scalar )
2189 matrix_.scale( scalar );
2214 template<
typename MT
2245 template<
typename MT
2247 template<
typename Other >
2248 inline bool StrictlyLowerMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2250 return matrix_.canAlias( alias );
2267 template<
typename MT
2269 template<
typename Other >
2270 inline bool StrictlyLowerMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2272 return matrix_.isAliased( alias );
2289 template<
typename MT
2291 inline bool StrictlyLowerMatrix<MT,SO,false>::canSMPAssign() const noexcept
2293 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
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1968
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.
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
#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
Header file for all adaptor forward declarations.
#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
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.
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.
Headerfile for the generic max algorithm.
Header file for the DisableIf class template.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#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,...
Definition: Static.h:61
#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.
decltype(auto) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:1001
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
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1198
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.
Header file for the IsStrictlyLower type trait.
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.
Header file for the StrictlyLowerProxy class.
#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
#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
#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 IsResizable type trait.
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.