35 #ifndef _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_SPARSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_SPARSE_H_ 106 template<
typename MT
108 class UniUpperMatrix<MT,SO,false>
109 :
public SparseMatrix< UniUpperMatrix<MT,SO,false>, SO >
113 using OT = OppositeType_<MT>;
114 using TT = TransposeType_<MT>;
115 using ET = ElementType_<MT>;
120 using This = UniUpperMatrix<MT,SO,false>;
121 using BaseType = SparseMatrix<This,SO>;
136 template<
typename NewType >
139 using Other = UniUpperMatrix< typename MT::template Rebind<NewType>::Other >;
146 template<
size_t NewM
150 using Other = UniUpperMatrix< typename MT::template Resize<NewM,NewN>::Other >;
161 using IteratorType = Iterator_<MT>;
163 using IteratorCategory = std::forward_iterator_tag;
164 using ValueType = UniUpperElement<MT>;
165 using PointerType = ValueType;
166 using ReferenceType = ValueType;
167 using DifferenceType = ptrdiff_t;
170 using iterator_category = IteratorCategory;
171 using value_type = ValueType;
172 using pointer = PointerType;
173 using reference = ReferenceType;
174 using difference_type = DifferenceType;
192 inline Iterator( IteratorType pos,
size_t index )
214 inline const Iterator operator++(
int ) {
227 return ReferenceType( pos_, pos_->index() == index_ );
236 inline PointerType operator->()
const {
237 return PointerType( pos_, pos_->index() == index_ );
258 return pos_ == rhs.pos_;
269 return !( *
this == rhs );
280 return pos_ - rhs.pos_;
289 inline IteratorType base()
const {
304 enum :
bool { smpAssignable =
false };
310 explicit inline UniUpperMatrix();
311 explicit inline UniUpperMatrix(
size_t n );
312 explicit inline UniUpperMatrix(
size_t n,
size_t nonzeros );
313 explicit inline UniUpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
315 inline UniUpperMatrix(
const UniUpperMatrix& m );
316 inline UniUpperMatrix( UniUpperMatrix&& m ) noexcept;
318 template<
typename MT2,
bool SO2 >
319 inline UniUpperMatrix(
const Matrix<MT2,SO2>& m );
330 inline Reference operator()(
size_t i,
size_t j );
332 inline Reference at(
size_t i,
size_t j );
346 inline UniUpperMatrix& operator=(
const UniUpperMatrix& rhs );
347 inline UniUpperMatrix& operator=( UniUpperMatrix&& rhs ) noexcept;
349 template<
typename MT2,
bool SO2 >
350 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix& > operator=(
const Matrix<MT2,SO2>& rhs );
352 template<
typename MT2,
bool SO2 >
353 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix& > operator=(
const Matrix<MT2,SO2>& rhs );
355 template<
typename MT2,
bool SO2 >
356 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix& >
operator+=(
const Matrix<MT2,SO2>& rhs );
358 template<
typename MT2,
bool SO2 >
359 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix& >
operator+=(
const Matrix<MT2,SO2>& rhs );
361 template<
typename MT2,
bool SO2 >
362 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix& >
operator-=(
const Matrix<MT2,SO2>& rhs );
364 template<
typename MT2,
bool SO2 >
365 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix& >
operator-=(
const Matrix<MT2,SO2>& rhs );
367 template<
typename MT2,
bool SO2 >
368 inline UniUpperMatrix& operator%=(
const Matrix<MT2,SO2>& rhs );
370 template<
typename MT2,
bool SO2 >
371 inline UniUpperMatrix&
operator*=(
const Matrix<MT2,SO2>& rhs );
378 inline size_t rows() const noexcept;
379 inline
size_t columns() const noexcept;
380 inline
size_t capacity() const noexcept;
381 inline
size_t capacity(
size_t i ) const noexcept;
383 inline
size_t nonZeros(
size_t i ) const;
385 inline
void reset(
size_t i );
387 inline
void resize (
size_t n,
bool preserve=true );
388 inline
void reserve(
size_t nonzeros );
389 inline
void reserve(
size_t i,
size_t nonzeros );
391 inline
void trim(
size_t i );
393 inline
void swap( UniUpperMatrix& m ) noexcept;
395 static inline constexpr
size_t maxNonZeros() noexcept;
396 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
405 inline
void append (
size_t i,
size_t j, const
ElementType& value,
bool check=false );
406 inline
void finalize(
size_t i );
413 inline
void erase(
size_t i,
size_t j );
417 template< typename Pred >
418 inline
void erase( Pred predicate );
420 template< typename Pred >
421 inline
void erase(
size_t i,
Iterator first,
Iterator last, Pred predicate );
428 inline
Iterator find (
size_t i,
size_t j );
430 inline
Iterator lowerBound(
size_t i,
size_t j );
432 inline
Iterator upperBound(
size_t i,
size_t j );
440 inline
bool isIntact() const noexcept;
447 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
448 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
450 inline
bool canSMPAssign() const noexcept;
458 inline
void resetLower();
470 template< typename MT2,
bool SO2,
bool DF2 >
471 friend MT2& derestrict( UniUpperMatrix<MT2,SO2,DF2>& m );
507 template< typename MT
509 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix()
526 template<
typename MT
528 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
size_t n )
533 for(
size_t i=0UL; i<n; ++i ) {
535 matrix_.finalize( i );
554 template<
typename MT
556 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
size_t n,
size_t nonzeros )
557 : matrix_( n, n,
max( nonzeros, n ) )
561 for(
size_t i=0UL; i<n; ++i ) {
563 matrix_.finalize( i );
586 template<
typename MT
588 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
589 : matrix_( n, n, nonzeros )
593 for(
size_t i=0UL; i<n; ++i )
595 if( nonzeros[i] == 0UL ) {
600 matrix_.finalize( i );
615 template<
typename MT
617 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
const UniUpperMatrix& m )
618 : matrix_( m.matrix_ )
633 template<
typename MT
635 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix( UniUpperMatrix&& m ) noexcept
636 : matrix_( std::move( m.matrix_ ) )
655 template<
typename MT
657 template<
typename MT2
659 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
const Matrix<MT2,SO2>& m )
662 if( !IsUniUpper<MT2>::value && !
isUniUpper( matrix_ ) ) {
666 if( !IsUniUpper<MT2>::value )
700 template<
typename MT
703 UniUpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
730 template<
typename MT
733 UniUpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const 761 template<
typename MT
764 UniUpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
795 template<
typename MT
798 UniUpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const 824 template<
typename MT
829 return Iterator( matrix_.begin(i), i );
847 template<
typename MT
852 return matrix_.begin(i);
870 template<
typename MT
875 return matrix_.cbegin(i);
893 template<
typename MT
898 return Iterator( matrix_.end(i), i );
916 template<
typename MT
921 return matrix_.end(i);
939 template<
typename MT
944 return matrix_.cend(i);
968 template<
typename MT
970 inline UniUpperMatrix<MT,SO,false>&
971 UniUpperMatrix<MT,SO,false>::operator=(
const UniUpperMatrix& rhs )
973 matrix_ = rhs.matrix_;
991 template<
typename MT
993 inline UniUpperMatrix<MT,SO,false>&
994 UniUpperMatrix<MT,SO,false>::operator=( UniUpperMatrix&& rhs ) noexcept
996 matrix_ = std::move( rhs.matrix_ );
1020 template<
typename MT
1022 template<
typename MT2
1024 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1025 UniUpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
1027 if( IsStrictlyTriangular<MT2>::value || ( !IsUniUpper<MT2>::value && !
isUniUpper( ~rhs ) ) ) {
1033 if( !IsUniUpper<MT2>::value )
1058 template<
typename MT
1060 template<
typename MT2
1062 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1063 UniUpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
1065 if( IsStrictlyTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1069 if( IsUniUpper<MT2>::value ) {
1079 matrix_ = std::move( tmp );
1082 if( !IsUniUpper<MT2>::value )
1107 template<
typename MT
1109 template<
typename MT2
1111 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1114 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1121 if( !IsStrictlyUpper<MT2>::value )
1146 template<
typename MT
1148 template<
typename MT2
1150 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1153 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1154 ( IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1158 if( IsStrictlyUpper<MT2>::value ) {
1162 const ResultType_<MT2> tmp( ~rhs );
1171 if( !IsStrictlyUpper<MT2>::value )
1196 template<
typename MT
1198 template<
typename MT2
1200 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1203 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1210 if( !IsStrictlyUpper<MT2>::value )
1235 template<
typename MT
1237 template<
typename MT2
1239 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1242 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1243 ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1247 if( IsStrictlyUpper<MT2>::value ) {
1251 const ResultType_<MT2> tmp( ~rhs );
1260 if( !IsStrictlyUpper<MT2>::value )
1285 template<
typename MT
1287 template<
typename MT2
1289 inline UniUpperMatrix<MT,SO,false>&
1290 UniUpperMatrix<MT,SO,false>::operator%=(
const Matrix<MT2,SO2>& rhs )
1292 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1296 If_< IsComputation<MT2>, ResultType_<MT2>,
const MT2& > tmp( ~rhs );
1298 for(
size_t i=0UL; i<(~rhs).
rows(); ++i ) {
1299 if( !
isOne( tmp(i,i) ) ) {
1306 if( !IsUniUpper<MT2>::value )
1330 template<
typename MT
1332 template<
typename MT2
1334 inline UniUpperMatrix<MT,SO,false>&
1337 if( matrix_.rows() != (~rhs).
columns() ) {
1341 MT tmp( matrix_ * ~rhs );
1347 matrix_ = std::move( tmp );
1349 if( !IsUniUpper<MT2>::value )
1375 template<
typename MT
1379 return matrix_.rows();
1391 template<
typename MT
1395 return matrix_.columns();
1407 template<
typename MT
1411 return matrix_.capacity();
1429 template<
typename MT
1433 return matrix_.capacity(i);
1445 template<
typename MT
1449 return matrix_.nonZeros();
1467 template<
typename MT
1471 return matrix_.nonZeros(i);
1483 template<
typename MT
1488 for(
size_t j=1UL; j<
columns(); ++j ) {
1489 matrix_.erase( j, matrix_.begin(j), matrix_.lowerBound(j,j) );
1493 for(
size_t i=0UL; i<
rows(); ++i ) {
1494 matrix_.erase( i, matrix_.lowerBound(i,i+1UL), matrix_.end(i) );
1515 template<
typename MT
1520 matrix_.erase( i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1523 matrix_.erase( i, matrix_.lowerBound(i,i+1UL), matrix_.end(i) );
1538 template<
typename MT
1544 if( IsResizable<MT>::value ) {
1570 template<
typename MT
1578 const size_t oldsize( matrix_.rows() );
1580 matrix_.resize( n, n, preserve );
1583 for(
size_t i=oldsize; i<n; ++i )
1584 matrix_.insert( i, i, ElementType(1) );
1602 template<
typename MT
1604 inline void UniUpperMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1606 matrix_.reserve( nonzeros );
1626 template<
typename MT
1628 inline void UniUpperMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1630 matrix_.reserve( i, nonzeros );
1647 template<
typename MT
1649 inline void UniUpperMatrix<MT,SO,false>::trim()
1669 template<
typename MT
1671 inline void UniUpperMatrix<MT,SO,false>::trim(
size_t i )
1689 template<
typename MT
1693 matrix_.shrinkToFit();
1706 template<
typename MT
1712 swap( matrix_, m.matrix_ );
1729 template<
typename MT
1731 inline constexpr
size_t UniUpperMatrix<MT,SO,false>::maxNonZeros() noexcept
1735 return maxNonZeros( Rows<MT>::value );
1751 template<
typename MT
1753 inline constexpr
size_t UniUpperMatrix<MT,SO,false>::maxNonZeros(
size_t n ) noexcept
1755 return ( ( n + 1UL ) * n ) / 2UL;
1767 template<
typename MT
1769 inline void UniUpperMatrix<MT,SO,false>::resetLower()
1772 for(
size_t j=0UL; j<
columns(); ++j )
1773 matrix_.erase( j, matrix_.upperBound( j, j ), matrix_.end( j ) );
1776 for(
size_t i=1UL; i<
rows(); ++i )
1777 matrix_.erase( i, matrix_.begin( i ), matrix_.lowerBound( i, i ) );
1808 template<
typename MT
1817 return Iterator( matrix_.set( i, j, value ), ( SO ? j : i ) );
1840 template<
typename MT
1843 UniUpperMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1849 return Iterator( matrix_.insert( i, j, value ), ( SO ? j : i ) );
1905 template<
typename MT
1907 inline void UniUpperMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1913 if( !check || !isDefault<strict>( value ) )
1914 matrix_.insert( i, j, value );
1934 template<
typename MT
1936 inline void UniUpperMatrix<MT,SO,false>::finalize(
size_t i )
1964 template<
typename MT
1966 inline void UniUpperMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1972 matrix_.erase( i, j );
1992 template<
typename MT
1995 UniUpperMatrix<MT,SO,false>::erase(
size_t i,
Iterator pos )
1997 if( pos != matrix_.end(i) && pos->index() == i ) {
2001 return Iterator( matrix_.erase( i, pos.base() ), i );
2022 template<
typename MT
2025 UniUpperMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last )
2030 if( ( !SO && first.base() == matrix_.begin(i) ) ||
2031 ( SO && last.base() == matrix_.end(i) ) ) {
2035 return Iterator( matrix_.erase( i, first.base(), last.base() ), i );
2063 template<
typename MT
2065 template<
typename Pred >
2066 inline void UniUpperMatrix<MT,SO,false>::erase( Pred predicate )
2069 for(
size_t j=1UL; j<
columns(); ++j ) {
2070 matrix_.erase( j, matrix_.begin(j), matrix_.find(j,j), predicate );
2074 for(
size_t i=0UL; (i+1UL) <
rows(); ++i ) {
2075 matrix_.erase( i, matrix_.lowerBound(i,i+1UL), matrix_.end(i), predicate );
2113 template<
typename MT
2115 template<
typename Pred >
2116 inline void UniUpperMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last, Pred predicate )
2121 if( ( !SO && first.base() == matrix_.begin(i) && predicate(
ElementType(1) ) ) ||
2122 ( SO && last.base() == matrix_.end(i) && predicate(
ElementType(1) ) ) ) {
2126 matrix_.erase( i, first.base(), last.base(), predicate );
2158 template<
typename MT
2161 UniUpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
2163 return Iterator( matrix_.find( i, j ), ( SO ? j : i ) );
2185 template<
typename MT
2188 UniUpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const 2190 return matrix_.find( i, j );
2212 template<
typename MT
2215 UniUpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
2217 return Iterator( matrix_.lowerBound( i, j ), ( SO ? j : i ) );
2239 template<
typename MT
2242 UniUpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const 2244 return matrix_.lowerBound( i, j );
2266 template<
typename MT
2269 UniUpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
2271 return Iterator( matrix_.upperBound( i, j ), ( SO ? j : i ) );
2293 template<
typename MT
2296 UniUpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const 2298 return matrix_.upperBound( i, j );
2322 template<
typename MT
2353 template<
typename MT
2355 template<
typename Other >
2356 inline bool UniUpperMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2358 return matrix_.canAlias( alias );
2375 template<
typename MT
2377 template<
typename Other >
2378 inline bool UniUpperMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2380 return matrix_.isAliased( alias );
2397 template<
typename MT
2399 inline bool UniUpperMatrix<MT,SO,false>::canSMPAssign() const noexcept
2401 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.
Constraint on the data type.
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:3079
#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.
Header file for the IsUniUpper 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.
#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
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
decltype(auto) declupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as upper.
Definition: DMatDeclUppExpr.h:1027
#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
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:731
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.
Header file for the IsStrictlyUpper type trait.
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
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:250
Constraint on the data type.
Header file for the IsLower type trait.
Header file for the UniUpperProxy class.
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 IsUniTriangular type trait.
Header file for the IsStrictlyTriangular 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
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:8893
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:290
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:580
Header file for the isOne shim.
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.
Header file for the UniUpperValue class.
#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
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:1500
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_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:61
#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
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:662
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.
Header file for the UniUpperElement class.
Constraint on the data type.
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h: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 isUniUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper unitriangular matrix.
Definition: DenseMatrix.h:1413
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
Header file for the implementation of the base template of the UniUpperMatrix.