35#ifndef _BLAZE_MATH_ADAPTORS_UNILOWERMATRIX_SPARSE_H_
36#define _BLAZE_MATH_ADAPTORS_UNILOWERMATRIX_SPARSE_H_
109class UniLowerMatrix<MT,SO,false>
110 :
public SparseMatrix< UniLowerMatrix<MT,SO,false>, SO >
114 using OT = OppositeType_t<MT>;
115 using TT = TransposeType_t<MT>;
116 using ET = ElementType_t<MT>;
121 using This = UniLowerMatrix<MT,SO,false>;
122 using BaseType = SparseMatrix<This,SO>;
123 using ResultType = This;
124 using OppositeType = UniLowerMatrix<OT,!SO,false>;
125 using TransposeType = UniUpperMatrix<TT,!SO,false>;
126 using ElementType = ET;
127 using TagType = TagType_t<MT>;
128 using ReturnType = ReturnType_t<MT>;
129 using CompositeType =
const This&;
130 using Reference = UniLowerProxy<MT>;
131 using ConstReference = ConstReference_t<MT>;
132 using ConstIterator = ConstIterator_t<MT>;
138 template<
typename NewType >
141 using Other = UniLowerMatrix< typename MT::template Rebind<NewType>::Other >;
148 template<
size_t NewM
152 using Other = UniLowerMatrix< typename MT::template Resize<NewM,NewN>::Other >;
163 using IteratorType = Iterator_t<MT>;
165 using IteratorCategory = std::forward_iterator_tag;
166 using ValueType = UniLowerElement<MT>;
167 using PointerType = ValueType;
168 using ReferenceType = ValueType;
172 using iterator_category = IteratorCategory;
173 using value_type = ValueType;
174 using pointer = PointerType;
175 using reference = ReferenceType;
176 using difference_type = DifferenceType;
194 inline Iterator( IteratorType pos,
size_t index )
205 inline Iterator& operator++() {
216 inline const Iterator operator++(
int ) {
217 const Iterator tmp( *
this );
229 return ReferenceType( pos_, pos_->index() == index_ );
238 inline PointerType operator->()
const {
239 return PointerType( pos_, pos_->index() == index_ );
248 inline operator ConstIterator()
const {
259 inline bool operator==(
const Iterator& rhs )
const {
260 return pos_ == rhs.pos_;
270 inline bool operator!=(
const Iterator& rhs )
const {
271 return !( *
this == rhs );
281 inline DifferenceType
operator-(
const Iterator& rhs )
const {
282 return pos_ - rhs.pos_;
291 inline IteratorType base()
const {
306 static constexpr bool smpAssignable =
false;
312 inline UniLowerMatrix();
313 explicit inline UniLowerMatrix(
size_t n );
314 inline UniLowerMatrix(
size_t n,
size_t nonzeros );
315 inline UniLowerMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
318 inline UniLowerMatrix(
const UniLowerMatrix& m );
319 inline UniLowerMatrix( UniLowerMatrix&& m )
noexcept;
321 template<
typename MT2,
bool SO2 >
322 inline UniLowerMatrix(
const Matrix<MT2,SO2>& m );
329 ~UniLowerMatrix() =
default;
336 inline Reference operator()(
size_t i,
size_t j );
337 inline ConstReference operator()(
size_t i,
size_t j )
const;
338 inline Reference at(
size_t i,
size_t j );
339 inline ConstReference at(
size_t i,
size_t j )
const;
340 inline Iterator
begin (
size_t i );
341 inline ConstIterator
begin (
size_t i )
const;
342 inline ConstIterator
cbegin(
size_t i )
const;
343 inline Iterator
end (
size_t i );
344 inline ConstIterator
end (
size_t i )
const;
345 inline ConstIterator
cend (
size_t i )
const;
354 inline UniLowerMatrix& operator=(
const UniLowerMatrix& rhs );
355 inline UniLowerMatrix& operator=( UniLowerMatrix&& rhs )
noexcept;
357 template<
typename MT2,
bool SO2 >
358 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
359 -> DisableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >;
361 template<
typename MT2,
bool SO2 >
362 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
363 -> EnableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >;
365 template<
typename MT2,
bool SO2 >
366 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
367 -> DisableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >;
369 template<
typename MT2,
bool SO2 >
370 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
371 -> EnableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >;
373 template<
typename MT2,
bool SO2 >
374 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
375 -> DisableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >;
377 template<
typename MT2,
bool SO2 >
378 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
379 -> EnableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >;
381 template<
typename MT2,
bool SO2 >
382 inline auto operator%=(
const Matrix<MT2,SO2>& rhs ) -> UniLowerMatrix&;
389 inline size_t rows() const noexcept;
390 inline
size_t columns() const noexcept;
391 inline
size_t capacity() const noexcept;
392 inline
size_t capacity(
size_t i ) const noexcept;
394 inline
size_t nonZeros(
size_t i ) const;
396 inline
void reset(
size_t i );
398 inline
void resize (
size_t n,
bool preserve=true );
399 inline
void reserve(
size_t nonzeros );
400 inline
void reserve(
size_t i,
size_t nonzeros );
402 inline
void trim(
size_t i );
404 inline
void swap( UniLowerMatrix& m ) noexcept;
406 static constexpr
size_t maxNonZeros() noexcept;
407 static constexpr
size_t maxNonZeros(
size_t n ) noexcept;
414 inline Iterator
set (
size_t i,
size_t j, const ElementType& value );
415 inline Iterator insert (
size_t i,
size_t j, const ElementType& value );
416 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
417 inline
void finalize(
size_t i );
424 inline
void erase(
size_t i,
size_t j );
425 inline Iterator erase(
size_t i, Iterator pos );
426 inline Iterator erase(
size_t i, Iterator first, Iterator last );
428 template< typename Pred >
429 inline
void erase( Pred predicate );
431 template< typename Pred >
432 inline
void erase(
size_t i, Iterator first, Iterator last, Pred predicate );
439 inline Iterator
find (
size_t i,
size_t j );
440 inline ConstIterator
find (
size_t i,
size_t j ) const;
441 inline Iterator
lowerBound(
size_t i,
size_t j );
442 inline ConstIterator
lowerBound(
size_t i,
size_t j ) const;
443 inline Iterator
upperBound(
size_t i,
size_t j );
444 inline ConstIterator
upperBound(
size_t i,
size_t j ) const;
451 inline
bool isIntact() const noexcept;
458 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
459 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
461 inline
bool canSMPAssign() const noexcept;
469 inline
void resetUpper();
481 template< typename MT2,
bool SO2,
bool DF2 >
482 friend MT2& derestrict( UniLowerMatrix<MT2,SO2,DF2>& m );
523inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix()
542inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix(
size_t n )
547 for(
size_t i=0UL; i<n; ++i ) {
548 matrix_.append( i, i, ElementType(1) );
549 matrix_.finalize( i );
570inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix(
size_t n,
size_t nonzeros )
571 : matrix_( n, n,
max( nonzeros, n ) )
575 for(
size_t i=0UL; i<n; ++i ) {
576 matrix_.append( i, i, ElementType(1) );
577 matrix_.finalize( i );
602inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
603 : matrix_( n, n, nonzeros )
607 for(
size_t i=0UL; i<n; ++i )
609 if( nonzeros[i] == 0UL ) {
613 matrix_.append( i, i, ElementType(1) );
614 matrix_.finalize( i );
670inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix(
const UniLowerMatrix& m )
671 : matrix_( m.matrix_ )
688inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix( UniLowerMatrix&& m ) noexcept
689 : matrix_( std::move( m.matrix_ ) )
710template<
typename MT2
712inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix(
const Matrix<MT2,SO2>& m )
715 if( !IsUniLower_v<MT2> && !
isUniLower( matrix_ ) ) {
719 if( !IsUniLower_v<MT2> )
755inline typename UniLowerMatrix<MT,SO,false>::Reference
756 UniLowerMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
761 return Reference( matrix_, i, j );
785inline typename UniLowerMatrix<MT,SO,false>::ConstReference
786 UniLowerMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const
816inline typename UniLowerMatrix<MT,SO,false>::Reference
817 UniLowerMatrix<MT,SO,false>::at(
size_t i,
size_t j )
850inline typename UniLowerMatrix<MT,SO,false>::ConstReference
851 UniLowerMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const
879inline typename UniLowerMatrix<MT,SO,false>::Iterator
882 return Iterator( matrix_.begin(i), i );
902inline typename UniLowerMatrix<MT,SO,false>::ConstIterator
905 return matrix_.begin(i);
925inline typename UniLowerMatrix<MT,SO,false>::ConstIterator
928 return matrix_.cbegin(i);
948inline typename UniLowerMatrix<MT,SO,false>::Iterator
951 return Iterator( matrix_.end(i), i );
971inline typename UniLowerMatrix<MT,SO,false>::ConstIterator
974 return matrix_.end(i);
994inline typename UniLowerMatrix<MT,SO,false>::ConstIterator
997 return matrix_.cend(i);
1036template<
typename MT
1038inline UniLowerMatrix<MT,SO,false>&
1041 const InitializerMatrix<ElementType> tmp( list, list.size() );
1068template<
typename MT
1070inline UniLowerMatrix<MT,SO,false>&
1071 UniLowerMatrix<MT,SO,false>::operator=(
const UniLowerMatrix& rhs )
1073 matrix_ = rhs.matrix_;
1091template<
typename MT
1093inline UniLowerMatrix<MT,SO,false>&
1094 UniLowerMatrix<MT,SO,false>::operator=( UniLowerMatrix&& rhs )
noexcept
1096 matrix_ = std::move( rhs.matrix_ );
1120template<
typename MT
1122template<
typename MT2
1124inline auto UniLowerMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
1125 -> DisableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >
1127 if( IsStrictlyTriangular_v<MT2> || ( !IsUniLower_v<MT2> && !
isUniLower( *rhs ) ) ) {
1133 if( !IsUniLower_v<MT2> )
1158template<
typename MT
1160template<
typename MT2
1162inline auto UniLowerMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
1163 -> EnableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >
1165 if( IsStrictlyTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1169 if( IsUniLower_v<MT2> ) {
1179 matrix_ = std::move( tmp );
1182 if( !IsUniLower_v<MT2> )
1207template<
typename MT
1209template<
typename MT2
1212 -> DisableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >
1214 if( IsUpper_v<MT2> || IsUniTriangular_v<MT2> ||
1221 if( !IsStrictlyLower_v<MT2> )
1246template<
typename MT
1248template<
typename MT2
1251 -> EnableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >
1253 if( IsUpper_v<MT2> || IsUniTriangular_v<MT2> ||
1254 ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1258 if( IsStrictlyLower_v<MT2> ) {
1262 const ResultType_t<MT2> tmp( *rhs );
1271 if( !IsStrictlyLower_v<MT2> )
1296template<
typename MT
1298template<
typename MT2
1301 -> DisableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >
1303 if( IsUpper_v<MT2> || IsUniTriangular_v<MT2> ||
1310 if( !IsStrictlyLower_v<MT2> )
1335template<
typename MT
1337template<
typename MT2
1340 -> EnableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >
1342 if( IsUpper_v<MT2> || IsUniTriangular_v<MT2> ||
1343 ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1347 if( IsStrictlyLower_v<MT2> ) {
1351 const ResultType_t<MT2> tmp( *rhs );
1360 if( !IsStrictlyLower_v<MT2> )
1385template<
typename MT
1387template<
typename MT2
1389inline auto UniLowerMatrix<MT,SO,false>::operator%=(
const Matrix<MT2,SO2>& rhs )
1392 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1396 If_t< IsComputation_v<MT2>, ResultType_t<MT2>,
const MT2& > tmp( *rhs );
1398 for(
size_t i=0UL; i<(*rhs).rows(); ++i ) {
1399 if( !
isOne( tmp(i,i) ) ) {
1406 if( !IsUniLower_v<MT2> )
1432template<
typename MT
1436 return matrix_.rows();
1448template<
typename MT
1452 return matrix_.columns();
1464template<
typename MT
1468 return matrix_.capacity();
1486template<
typename MT
1490 return matrix_.capacity(i);
1502template<
typename MT
1506 return matrix_.nonZeros();
1524template<
typename MT
1528 return matrix_.nonZeros(i);
1540template<
typename MT
1545 for(
size_t j=0UL; j<
columns(); ++j ) {
1546 matrix_.erase( j, matrix_.lowerBound(j+1UL,j), matrix_.end(j) );
1550 for(
size_t i=1UL; i<
rows(); ++i ) {
1551 matrix_.erase( i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1572template<
typename MT
1577 matrix_.erase( i, matrix_.lowerBound(i+1UL,i), matrix_.end(i) );
1580 matrix_.erase( i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1595template<
typename MT
1623template<
typename MT
1631 const size_t oldsize( matrix_.rows() );
1633 matrix_.resize( n, n, preserve );
1636 for(
size_t i=oldsize; i<n; ++i )
1637 matrix_.insert( i, i, ElementType(1) );
1655template<
typename MT
1657inline void UniLowerMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1659 matrix_.reserve( nonzeros );
1679template<
typename MT
1681inline void UniLowerMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1683 matrix_.reserve( i, nonzeros );
1700template<
typename MT
1702inline void UniLowerMatrix<MT,SO,false>::trim()
1722template<
typename MT
1724inline void UniLowerMatrix<MT,SO,false>::trim(
size_t i )
1742template<
typename MT
1746 matrix_.shrinkToFit();
1759template<
typename MT
1765 swap( matrix_, m.matrix_ );
1782template<
typename MT
1784constexpr size_t UniLowerMatrix<MT,SO,false>::maxNonZeros() noexcept
1788 return maxNonZeros( Size_v<MT,0UL> );
1804template<
typename MT
1806constexpr size_t UniLowerMatrix<MT,SO,false>::maxNonZeros(
size_t n )
noexcept
1808 return ( ( n + 1UL ) * n ) / 2UL;
1820template<
typename MT
1822inline void UniLowerMatrix<MT,SO,false>::resetUpper()
1825 for(
size_t j=1UL; j<
columns(); ++j )
1826 matrix_.erase( j, matrix_.begin( j ), matrix_.lowerBound( j, j ) );
1829 for(
size_t i=0UL; i<
rows(); ++i )
1830 matrix_.erase( i, matrix_.upperBound( i, i ), matrix_.end( i ) );
1861template<
typename MT
1863inline typename UniLowerMatrix<MT,SO,false>::Iterator
1870 return Iterator( matrix_.set( i, j, value ), ( SO ? j : i ) );
1893template<
typename MT
1895inline typename UniLowerMatrix<MT,SO,false>::Iterator
1896 UniLowerMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1902 return Iterator( matrix_.insert( i, j, value ), ( SO ? j : i ) );
1958template<
typename MT
1960inline void UniLowerMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1966 if( !check || !isDefault<strict>( value ) )
1967 matrix_.insert( i, j, value );
1987template<
typename MT
1989inline void UniLowerMatrix<MT,SO,false>::finalize(
size_t i )
2017template<
typename MT
2019inline void UniLowerMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
2025 matrix_.erase( i, j );
2045template<
typename MT
2047inline typename UniLowerMatrix<MT,SO,false>::Iterator
2048 UniLowerMatrix<MT,SO,false>::erase(
size_t i, Iterator pos )
2050 if( pos != matrix_.end(i) && pos->index() == i ) {
2054 return Iterator( matrix_.erase( i, pos.base() ), i );
2075template<
typename MT
2077inline typename UniLowerMatrix<MT,SO,false>::Iterator
2078 UniLowerMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last )
2083 if( ( !SO && last.base() == matrix_.end(i) ) ||
2084 ( SO && first.base() == matrix_.begin(i) ) ) {
2088 return Iterator( matrix_.erase( i, first.base(), last.base() ), i );
2116template<
typename MT
2118template<
typename Pred >
2119inline void UniLowerMatrix<MT,SO,false>::erase( Pred predicate )
2122 for(
size_t j=0UL; (j+1UL) <
columns(); ++j ) {
2123 matrix_.erase( j, matrix_.lowerBound(j+1UL,j), matrix_.end(j), predicate );
2127 for(
size_t i=1UL; i<
rows(); ++i ) {
2128 matrix_.erase( i, matrix_.begin(i), matrix_.find(i,i), predicate );
2169template<
typename MT
2171template<
typename Pred >
2172inline void UniLowerMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last, Pred predicate )
2177 if( ( !SO && last.base() == matrix_.end(i) && predicate( ElementType(1) ) ) ||
2178 ( SO && first.base() == matrix_.begin(i) && predicate( ElementType(1) ) ) ) {
2182 matrix_.erase( i, first.base(), last.base(), predicate );
2214template<
typename MT
2216inline typename UniLowerMatrix<MT,SO,false>::Iterator
2219 return Iterator( matrix_.find( i, j ), ( SO ? j : i ) );
2241template<
typename MT
2243inline typename UniLowerMatrix<MT,SO,false>::ConstIterator
2246 return matrix_.find( i, j );
2268template<
typename MT
2270inline typename UniLowerMatrix<MT,SO,false>::Iterator
2273 return Iterator( matrix_.lowerBound( i, j ), ( SO ? j : i ) );
2295template<
typename MT
2297inline typename UniLowerMatrix<MT,SO,false>::ConstIterator
2300 return matrix_.lowerBound( i, j );
2322template<
typename MT
2324inline typename UniLowerMatrix<MT,SO,false>::Iterator
2327 return Iterator( matrix_.upperBound( i, j ), ( SO ? j : i ) );
2349template<
typename MT
2351inline typename UniLowerMatrix<MT,SO,false>::ConstIterator
2354 return matrix_.upperBound( i, j );
2378template<
typename MT
2409template<
typename MT
2411template<
typename Other >
2412inline bool UniLowerMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2414 return matrix_.canAlias( alias );
2431template<
typename MT
2433template<
typename Other >
2434inline bool UniLowerMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2436 return matrix_.isAliased( alias );
2453template<
typename MT
2455inline bool UniLowerMatrix<MT,SO,false>::canSMPAssign() const noexcept
2457 return matrix_.canSMPAssign();
Header file for auxiliary alias declarations.
Header file for run time assertion macros.
Constraint on the data type.
constexpr const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:751
Header file for the EnableIf class template.
Constraint on the data type.
Header file for the IsComputation type trait class.
Header file for the isDefault shim.
Header file for the isOne shim.
Header file for the IsSquare type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyTriangular type trait.
Header file for the IsUniLower type trait.
Header file for the IsUniTriangular type trait.
Header file for the IsUpper type trait.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the UniLowerElement class.
Header file for the UniLowerProxy class.
Header file for the UniLowerValue class.
Constraint on the data type.
Constraint on the data type.
Header file for the implementation of the base template of the UniLowerMatrix.
Initializer list type of the Blaze library.
Pointer difference type of the Blaze library.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the implementation of a matrix representation of an initializer list.
Header file for the SparseMatrix base class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.
Definition: Volatile.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.
Definition: Pointer.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.
Definition: Const.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.
Definition: Reference.h:79
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:2096
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:1375
auto operator+=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Addition assignment operator for the addition of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:386
bool isUniLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower unitriangular matrix.
Definition: DenseMatrix.h:2009
decltype(auto) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:1004
decltype(auto) operator*(const DenseMatrix< MT1, false > &lhs, const DenseMatrix< MT2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:9640
auto operator-=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Subtraction assignment operator for the subtraction of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:448
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:207
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:225
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VIEW_TYPE(T)
Constraint on the data type.
Definition: View.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Hermitian.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Upper.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.
Definition: Computation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_STATIC_TYPE(T)
Constraint on the data type.
Definition: Static.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNIFORM_TYPE(T)
Constraint on the data type.
Definition: Uniform.h:81
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: SparseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Lower.h:81
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE_TYPE(T)
Constraint on the data type.
Definition: Resizable.h:61
#define BLAZE_CONSTRAINT_MUST_BE_SCALAR_TYPE(T)
Constraint on the data type.
Definition: Scalar.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSFORMATION_TYPE(T)
Constraint on the data type.
Definition: Transformation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.
Definition: StorageOrder.h:63
constexpr ptrdiff_t Size_v
Auxiliary variable template for the Size type trait.
Definition: Size.h:176
bool isOne(const Proxy< PT, RT > &proxy)
Returns whether the represented element is 1.
Definition: Proxy.h:2337
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:253
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:293
constexpr void clear(Matrix< MT, SO > &matrix)
Clearing the given matrix.
Definition: Matrix.h:960
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:628
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:644
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:730
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:562
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:692
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition: Matrix.h:806
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:660
void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:1108
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:584
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:518
void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition: Matrix.h:1169
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:1383
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition: Assert.h:117
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
MT::Iterator upperBound(SparseMatrix< MT, SO > &sm, size_t i, size_t j)
Returns an iterator to the first index greater than the given index.
Definition: SparseMatrix.h:244
MT::Iterator lowerBound(SparseMatrix< MT, SO > &sm, size_t i, size_t j)
Returns an iterator to the first index not less than the given index.
Definition: SparseMatrix.h:194
MT::Iterator find(SparseMatrix< MT, SO > &sm, size_t i, size_t j)
Searches for a specific matrix element.
Definition: SparseMatrix.h:144
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition: Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition: Exception.h:235
Header file for the exception macros of the math module.
Header file for the extended initializer_list functionality.
Header file for all adaptor forward declarations.
Constraints on the storage order of matrix types.
Header file for the Size type trait.
Header file for utility functions for sparse matrices.
Header file for basic type definitions.
Header file for the generic max algorithm.