35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_SPARSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_SPARSE_H_ 101 template<
typename MT
103 class StrictlyUpperMatrix<MT,SO,false>
104 :
public SparseMatrix< StrictlyUpperMatrix<MT,SO,false>, SO >
108 using OT = OppositeType_t<MT>;
109 using TT = TransposeType_t<MT>;
110 using ET = ElementType_t<MT>;
115 using This = StrictlyUpperMatrix<MT,SO,false>;
116 using BaseType = SparseMatrix<This,SO>;
117 using ResultType = This;
118 using OppositeType = StrictlyUpperMatrix<OT,!SO,false>;
119 using TransposeType = StrictlyLowerMatrix<TT,!SO,false>;
120 using ElementType = ET;
121 using ReturnType = ReturnType_t<MT>;
122 using CompositeType =
const This&;
123 using Reference = StrictlyUpperProxy<MT>;
124 using ConstReference = ConstReference_t<MT>;
125 using Iterator = Iterator_t<MT>;
126 using ConstIterator = ConstIterator_t<MT>;
132 template<
typename NewType >
135 using Other = StrictlyUpperMatrix< typename MT::template Rebind<NewType>::Other >;
142 template<
size_t NewM
146 using Other = StrictlyUpperMatrix< typename MT::template Resize<NewM,NewN>::Other >;
152 static constexpr
bool smpAssignable =
false;
158 explicit inline StrictlyUpperMatrix();
159 explicit inline StrictlyUpperMatrix(
size_t n );
160 explicit inline StrictlyUpperMatrix(
size_t n,
size_t nonzeros );
161 explicit inline StrictlyUpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
162 inline StrictlyUpperMatrix( initializer_list< initializer_list<ElementType> > list );
164 inline StrictlyUpperMatrix(
const StrictlyUpperMatrix& m );
165 inline StrictlyUpperMatrix( StrictlyUpperMatrix&& m ) noexcept;
167 template<
typename MT2,
bool SO2 >
168 inline StrictlyUpperMatrix(
const Matrix<MT2,SO2>& m );
175 ~StrictlyUpperMatrix() =
default;
182 inline Reference operator()(
size_t i,
size_t j );
183 inline ConstReference operator()(
size_t i,
size_t j )
const;
184 inline Reference at(
size_t i,
size_t j );
185 inline ConstReference at(
size_t i,
size_t j )
const;
186 inline Iterator
begin (
size_t i );
187 inline ConstIterator
begin (
size_t i )
const;
188 inline ConstIterator
cbegin(
size_t i )
const;
189 inline Iterator
end (
size_t i );
190 inline ConstIterator
end (
size_t i )
const;
191 inline ConstIterator
cend (
size_t i )
const;
198 inline StrictlyUpperMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
200 inline StrictlyUpperMatrix& operator=(
const StrictlyUpperMatrix& rhs );
201 inline StrictlyUpperMatrix& operator=( StrictlyUpperMatrix&& rhs ) noexcept;
203 template<
typename MT2,
bool SO2 >
204 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
205 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >;
207 template<
typename MT2,
bool SO2 >
208 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
209 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >;
211 template<
typename MT2,
bool SO2 >
212 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
213 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >;
215 template<
typename MT2,
bool SO2 >
216 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
217 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >;
219 template<
typename MT2,
bool SO2 >
220 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
221 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >;
223 template<
typename MT2,
bool SO2 >
224 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
225 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >;
227 template<
typename MT2,
bool SO2 >
228 inline auto operator%=(
const Matrix<MT2,SO2>& rhs ) -> StrictlyUpperMatrix&;
235 inline size_t rows() const noexcept;
236 inline
size_t columns() const noexcept;
237 inline
size_t capacity() const noexcept;
238 inline
size_t capacity(
size_t i ) const noexcept;
240 inline
size_t nonZeros(
size_t i ) const;
242 inline
void reset(
size_t i );
244 inline
void resize (
size_t n,
bool preserve=true );
245 inline
void reserve(
size_t nonzeros );
246 inline
void reserve(
size_t i,
size_t nonzeros );
248 inline
void trim(
size_t i );
250 inline
void swap( StrictlyUpperMatrix& m ) noexcept;
252 static inline constexpr
size_t maxNonZeros() noexcept;
253 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
260 inline Iterator
set (
size_t i,
size_t j, const ElementType& value );
261 inline Iterator insert (
size_t i,
size_t j, const ElementType& value );
262 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
263 inline
void finalize(
size_t i );
270 inline
void erase(
size_t i,
size_t j );
271 inline Iterator erase(
size_t i, Iterator pos );
272 inline Iterator erase(
size_t i, Iterator first, Iterator last );
274 template< typename Pred >
275 inline
void erase( Pred predicate );
277 template< typename Pred >
278 inline
void erase(
size_t i, Iterator first, Iterator last, Pred predicate );
285 inline Iterator find (
size_t i,
size_t j );
286 inline ConstIterator find (
size_t i,
size_t j ) const;
287 inline Iterator lowerBound(
size_t i,
size_t j );
288 inline ConstIterator lowerBound(
size_t i,
size_t j ) const;
289 inline Iterator upperBound(
size_t i,
size_t j );
290 inline ConstIterator upperBound(
size_t i,
size_t j ) const;
297 template< typename Other > inline StrictlyUpperMatrix& scale( const Other& scalar );
304 inline
bool isIntact() const noexcept;
311 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
312 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
314 inline
bool canSMPAssign() const noexcept;
322 inline
void resetLower();
334 template< typename MT2,
bool SO2,
bool DF2 >
335 friend MT2& derestrict( StrictlyUpperMatrix<MT2,SO2,DF2>& m );
372 template< typename MT
374 inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix()
391 template<
typename MT
393 inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix(
size_t n )
414 template<
typename MT
416 inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix(
size_t n,
size_t nonzeros )
417 : matrix_( n, n,
max( nonzeros, n ) )
441 template<
typename MT
443 inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
444 : matrix_( n, n, nonzeros )
478 template<
typename MT
480 inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix( initializer_list< initializer_list<ElementType> > list )
499 template<
typename MT
501 inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix(
const StrictlyUpperMatrix& m )
502 : matrix_( m.matrix_ )
517 template<
typename MT
519 inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix( StrictlyUpperMatrix&& m ) noexcept
520 : matrix_( std::move( m.matrix_ ) )
540 template<
typename MT
542 template<
typename MT2
544 inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix(
const Matrix<MT2,SO2>& m )
547 if( IsUniTriangular_v<MT2> ||
552 if( !IsStrictlyUpper_v<MT2> )
586 template<
typename MT
588 inline typename StrictlyUpperMatrix<MT,SO,false>::Reference
589 StrictlyUpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
594 return Reference( matrix_, i, j );
616 template<
typename MT
618 inline typename StrictlyUpperMatrix<MT,SO,false>::ConstReference
619 StrictlyUpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const 647 template<
typename MT
649 inline typename StrictlyUpperMatrix<MT,SO,false>::Reference
650 StrictlyUpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
681 template<
typename MT
683 inline typename StrictlyUpperMatrix<MT,SO,false>::ConstReference
684 StrictlyUpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const 710 template<
typename MT
712 inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
715 return matrix_.begin(i);
733 template<
typename MT
735 inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
738 return matrix_.begin(i);
756 template<
typename MT
758 inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
761 return matrix_.cbegin(i);
779 template<
typename MT
781 inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
784 return matrix_.end(i);
802 template<
typename MT
804 inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
807 return matrix_.end(i);
825 template<
typename MT
827 inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
830 return matrix_.cend(i);
869 template<
typename MT
871 inline StrictlyUpperMatrix<MT,SO,false>&
872 StrictlyUpperMatrix<MT,SO,false>::operator=( initializer_list< initializer_list<ElementType> > list )
874 const InitializerMatrix<ElementType> tmp( list, list.size() );
901 template<
typename MT
903 inline StrictlyUpperMatrix<MT,SO,false>&
904 StrictlyUpperMatrix<MT,SO,false>::operator=(
const StrictlyUpperMatrix& rhs )
906 matrix_ = rhs.matrix_;
924 template<
typename MT
926 inline StrictlyUpperMatrix<MT,SO,false>&
927 StrictlyUpperMatrix<MT,SO,false>::operator=( StrictlyUpperMatrix&& rhs ) noexcept
929 matrix_ = std::move( rhs.matrix_ );
953 template<
typename MT
955 template<
typename MT2
957 inline auto StrictlyUpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
958 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
960 if( IsUniTriangular_v<MT2> ||
967 if( !IsStrictlyUpper_v<MT2> )
992 template<
typename MT
994 template<
typename MT2
996 inline auto StrictlyUpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
997 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
999 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1003 if( IsStrictlyUpper_v<MT2> ) {
1013 matrix_ = std::move( tmp );
1016 if( !IsStrictlyUpper_v<MT2> )
1041 template<
typename MT
1043 template<
typename MT2
1046 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1048 if( IsUniTriangular_v<MT2> ||
1055 if( !IsStrictlyUpper_v<MT2> )
1080 template<
typename MT
1082 template<
typename MT2
1085 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1087 if( IsUniTriangular_v<MT2> || ( IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1091 if( IsStrictlyUpper_v<MT2> ) {
1095 const ResultType_t<MT2> tmp( ~rhs );
1104 if( !IsStrictlyUpper_v<MT2> )
1129 template<
typename MT
1131 template<
typename MT2
1134 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1136 if( IsUniTriangular_v<MT2> ||
1143 if( !IsStrictlyUpper_v<MT2> )
1168 template<
typename MT
1170 template<
typename MT2
1173 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1175 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1179 if( IsStrictlyUpper_v<MT2> ) {
1183 const ResultType_t<MT2> tmp( ~rhs );
1192 if( !IsStrictlyUpper_v<MT2> )
1215 template<
typename MT
1217 template<
typename MT2
1219 inline auto StrictlyUpperMatrix<MT,SO,false>::operator%=(
const Matrix<MT2,SO2>& rhs )
1220 -> StrictlyUpperMatrix&
1222 if( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) {
1228 if( !IsStrictlyUpper_v<MT2> )
1254 template<
typename MT
1258 return matrix_.rows();
1270 template<
typename MT
1274 return matrix_.columns();
1286 template<
typename MT
1290 return matrix_.capacity();
1308 template<
typename MT
1312 return matrix_.capacity(i);
1324 template<
typename MT
1328 return matrix_.nonZeros();
1346 template<
typename MT
1350 return matrix_.nonZeros(i);
1362 template<
typename MT
1369 for(
size_t j=1UL; j<
columns(); ++j ) {
1370 erase( matrix_, j, matrix_.begin(j), matrix_.lowerBound(j,j) );
1374 for(
size_t i=0UL; i<
rows(); ++i ) {
1375 erase( matrix_, i, matrix_.lowerBound(i,i+1UL), matrix_.end(i) );
1396 template<
typename MT
1403 erase( matrix_, i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1406 erase( matrix_, i, matrix_.lowerBound(i,i+1UL), matrix_.end(i) );
1421 template<
typename MT
1427 if( IsResizable_v<MT> ) {
1453 template<
typename MT
1461 matrix_.resize( n, n, preserve );
1478 template<
typename MT
1480 inline void StrictlyUpperMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1482 matrix_.reserve( nonzeros );
1503 template<
typename MT
1505 inline void StrictlyUpperMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1507 matrix_.reserve( i, nonzeros );
1524 template<
typename MT
1526 inline void StrictlyUpperMatrix<MT,SO,false>::trim()
1546 template<
typename MT
1548 inline void StrictlyUpperMatrix<MT,SO,false>::trim(
size_t i )
1566 template<
typename MT
1570 matrix_.shrinkToFit();
1583 template<
typename MT
1589 swap( matrix_, m.matrix_ );
1607 template<
typename MT
1609 inline constexpr
size_t StrictlyUpperMatrix<MT,SO,false>::maxNonZeros() noexcept
1613 return maxNonZeros( Size_v<MT,0UL> );
1629 template<
typename MT
1631 inline constexpr
size_t StrictlyUpperMatrix<MT,SO,false>::maxNonZeros(
size_t n ) noexcept
1633 return ( ( n - 1UL ) * n ) / 2UL;
1645 template<
typename MT
1647 inline void StrictlyUpperMatrix<MT,SO,false>::resetLower()
1652 for(
size_t j=0UL; j<
columns(); ++j )
1653 erase( matrix_, j, matrix_.upperBound( j, j ), matrix_.end( j ) );
1656 for(
size_t i=1UL; i<
rows(); ++i )
1657 erase( matrix_, i, matrix_.begin( i ), matrix_.lowerBound( i, i ) );
1688 template<
typename MT
1690 inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
1697 return matrix_.set( i, j, value );
1720 template<
typename MT
1722 inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
1723 StrictlyUpperMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1729 return matrix_.insert( i, j, value );
1785 template<
typename MT
1787 inline void StrictlyUpperMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1793 matrix_.append( i, j, value, check );
1813 template<
typename MT
1815 inline void StrictlyUpperMatrix<MT,SO,false>::finalize(
size_t i )
1817 matrix_.finalize( i );
1841 template<
typename MT
1843 inline void StrictlyUpperMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1847 erase( matrix_, i, j );
1865 template<
typename MT
1867 inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
1868 StrictlyUpperMatrix<MT,SO,false>::erase(
size_t i, Iterator pos )
1872 return erase( matrix_, i, pos );
1892 template<
typename MT
1894 inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
1895 StrictlyUpperMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last )
1899 return erase( matrix_, i, first, last );
1927 template<
typename MT
1929 template<
typename Pred >
1930 inline void StrictlyUpperMatrix<MT,SO,false>::erase( Pred predicate )
1934 erase( matrix_, predicate );
1970 template<
typename MT
1972 template<
typename Pred >
1973 inline void StrictlyUpperMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last, Pred predicate )
1977 erase( matrix_, i, first, last, predicate );
2009 template<
typename MT
2011 inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
2012 StrictlyUpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
2014 return matrix_.find( i, j );
2036 template<
typename MT
2038 inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
2039 StrictlyUpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const 2041 return matrix_.find( i, j );
2063 template<
typename MT
2065 inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
2066 StrictlyUpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
2068 return matrix_.lowerBound( i, j );
2090 template<
typename MT
2092 inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
2093 StrictlyUpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const 2095 return matrix_.lowerBound( i, j );
2117 template<
typename MT
2119 inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
2120 StrictlyUpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
2122 return matrix_.upperBound( i, j );
2144 template<
typename MT
2146 inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
2147 StrictlyUpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const 2149 return matrix_.upperBound( i, j );
2181 template<
typename MT
2183 template<
typename Other >
2184 inline StrictlyUpperMatrix<MT,SO,false>&
2185 StrictlyUpperMatrix<MT,SO,false>::scale(
const Other& scalar )
2187 matrix_.scale( scalar );
2212 template<
typename MT
2243 template<
typename MT
2245 template<
typename Other >
2246 inline bool StrictlyUpperMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2248 return matrix_.canAlias( alias );
2265 template<
typename MT
2267 template<
typename Other >
2268 inline bool StrictlyUpperMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2270 return matrix_.isAliased( alias );
2287 template<
typename MT
2289 inline bool StrictlyUpperMatrix<MT,SO,false>::canSMPAssign() const noexcept
2291 return matrix_.canSMPAssign();
Header file for the StrictlyUpperProxy class.
#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
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
#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.
decltype(auto) declupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as upper.
Definition: DMatDeclUppExpr.h:1001
#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.
Header file for the IsStrictlyUpper type trait.
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.
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.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:615
Header file for the implementation of the base template of the StrictlyUpperMatrix.
#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
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:2235
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
#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.