35 #ifndef _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_SPARSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_SPARSE_H_ 107 template<
typename MT
109 class UniUpperMatrix<MT,SO,false>
110 :
public SparseMatrix< UniUpperMatrix<MT,SO,false>, SO >
114 using OT = OppositeType_<MT>;
115 using TT = TransposeType_<MT>;
116 using ET = ElementType_<MT>;
121 using This = UniUpperMatrix<MT,SO,false>;
122 using BaseType = SparseMatrix<This,SO>;
137 template<
typename NewType >
140 using Other = UniUpperMatrix< typename MT::template Rebind<NewType>::Other >;
147 template<
size_t NewM
151 using Other = UniUpperMatrix< typename MT::template Resize<NewM,NewN>::Other >;
162 using IteratorType = Iterator_<MT>;
164 using IteratorCategory = std::forward_iterator_tag;
165 using ValueType = UniUpperElement<MT>;
166 using PointerType = ValueType;
167 using ReferenceType = ValueType;
168 using DifferenceType = ptrdiff_t;
171 using iterator_category = IteratorCategory;
172 using value_type = ValueType;
173 using pointer = PointerType;
174 using reference = ReferenceType;
175 using difference_type = DifferenceType;
193 inline Iterator( IteratorType pos,
size_t index )
215 inline const Iterator operator++(
int ) {
228 return ReferenceType( pos_, pos_->index() == index_ );
237 inline PointerType operator->()
const {
238 return PointerType( pos_, pos_->index() == index_ );
259 return pos_ == rhs.pos_;
270 return !( *
this == rhs );
281 return pos_ - rhs.pos_;
290 inline IteratorType base()
const {
305 enum :
bool { smpAssignable =
false };
311 explicit inline UniUpperMatrix();
312 explicit inline UniUpperMatrix(
size_t n );
313 explicit inline UniUpperMatrix(
size_t n,
size_t nonzeros );
314 explicit inline UniUpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
315 explicit inline UniUpperMatrix( initializer_list< initializer_list<ElementType> > list );
317 inline UniUpperMatrix(
const UniUpperMatrix& m );
318 inline UniUpperMatrix( UniUpperMatrix&& m ) noexcept;
320 template<
typename MT2,
bool SO2 >
321 inline UniUpperMatrix(
const Matrix<MT2,SO2>& m );
332 inline Reference operator()(
size_t i,
size_t j );
334 inline Reference at(
size_t i,
size_t j );
348 inline UniUpperMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
350 inline UniUpperMatrix& operator=(
const UniUpperMatrix& rhs );
351 inline UniUpperMatrix& operator=( UniUpperMatrix&& rhs ) noexcept;
353 template<
typename MT2,
bool SO2 >
354 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix& > operator=(
const Matrix<MT2,SO2>& rhs );
356 template<
typename MT2,
bool SO2 >
357 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix& > operator=(
const Matrix<MT2,SO2>& rhs );
359 template<
typename MT2,
bool SO2 >
360 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix& >
operator+=(
const Matrix<MT2,SO2>& rhs );
362 template<
typename MT2,
bool SO2 >
363 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix& >
operator+=(
const Matrix<MT2,SO2>& rhs );
365 template<
typename MT2,
bool SO2 >
366 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix& >
operator-=(
const Matrix<MT2,SO2>& rhs );
368 template<
typename MT2,
bool SO2 >
369 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix& >
operator-=(
const Matrix<MT2,SO2>& rhs );
371 template<
typename MT2,
bool SO2 >
372 inline UniUpperMatrix& operator%=(
const Matrix<MT2,SO2>& rhs );
379 inline size_t rows() const noexcept;
380 inline
size_t columns() const noexcept;
381 inline
size_t capacity() const noexcept;
382 inline
size_t capacity(
size_t i ) const noexcept;
384 inline
size_t nonZeros(
size_t i ) const;
386 inline
void reset(
size_t i );
388 inline
void resize (
size_t n,
bool preserve=true );
389 inline
void reserve(
size_t nonzeros );
390 inline
void reserve(
size_t i,
size_t nonzeros );
392 inline
void trim(
size_t i );
394 inline
void swap( UniUpperMatrix& m ) noexcept;
396 static inline constexpr
size_t maxNonZeros() noexcept;
397 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
406 inline
void append (
size_t i,
size_t j, const
ElementType& value,
bool check=false );
407 inline
void finalize(
size_t i );
414 inline
void erase(
size_t i,
size_t j );
418 template< typename Pred >
419 inline
void erase( Pred predicate );
421 template< typename Pred >
422 inline
void erase(
size_t i,
Iterator first,
Iterator last, Pred predicate );
429 inline
Iterator find (
size_t i,
size_t j );
431 inline
Iterator lowerBound(
size_t i,
size_t j );
433 inline
Iterator upperBound(
size_t i,
size_t j );
441 inline
bool isIntact() const noexcept;
448 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
449 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
451 inline
bool canSMPAssign() const noexcept;
459 inline
void resetLower();
471 template< typename MT2,
bool SO2,
bool DF2 >
472 friend MT2& derestrict( UniUpperMatrix<MT2,SO2,DF2>& m );
508 template< typename MT
510 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix()
527 template<
typename MT
529 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
size_t n )
534 for(
size_t i=0UL; i<n; ++i ) {
536 matrix_.finalize( i );
555 template<
typename MT
557 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
size_t n,
size_t nonzeros )
558 : matrix_( n, n,
max( nonzeros, n ) )
562 for(
size_t i=0UL; i<n; ++i ) {
564 matrix_.finalize( i );
587 template<
typename MT
589 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
590 : matrix_( n, n, nonzeros )
594 for(
size_t i=0UL; i<n; ++i )
596 if( nonzeros[i] == 0UL ) {
601 matrix_.finalize( i );
634 template<
typename MT
636 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix( initializer_list< initializer_list<ElementType> > list )
655 template<
typename MT
657 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
const UniUpperMatrix& m )
658 : matrix_( m.matrix_ )
673 template<
typename MT
675 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix( UniUpperMatrix&& m ) noexcept
676 : matrix_( std::move( m.matrix_ ) )
695 template<
typename MT
697 template<
typename MT2
699 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
const Matrix<MT2,SO2>& m )
702 if( !IsUniUpper<MT2>::value && !
isUniUpper( matrix_ ) ) {
706 if( !IsUniUpper<MT2>::value )
740 template<
typename MT
743 UniUpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
770 template<
typename MT
773 UniUpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const 801 template<
typename MT
804 UniUpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
835 template<
typename MT
838 UniUpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const 864 template<
typename MT
869 return Iterator( matrix_.begin(i), i );
887 template<
typename MT
892 return matrix_.begin(i);
910 template<
typename MT
915 return matrix_.cbegin(i);
933 template<
typename MT
938 return Iterator( matrix_.end(i), i );
956 template<
typename MT
961 return matrix_.end(i);
979 template<
typename MT
984 return matrix_.cend(i);
1023 template<
typename MT
1025 inline UniUpperMatrix<MT,SO,false>&
1026 UniUpperMatrix<MT,SO,false>::operator=( initializer_list< initializer_list<ElementType> > list )
1028 const InitializerMatrix<ElementType> tmp( list, list.size() );
1055 template<
typename MT
1057 inline UniUpperMatrix<MT,SO,false>&
1058 UniUpperMatrix<MT,SO,false>::operator=(
const UniUpperMatrix& rhs )
1060 matrix_ = rhs.matrix_;
1078 template<
typename MT
1080 inline UniUpperMatrix<MT,SO,false>&
1081 UniUpperMatrix<MT,SO,false>::operator=( UniUpperMatrix&& rhs ) noexcept
1083 matrix_ = std::move( rhs.matrix_ );
1107 template<
typename MT
1109 template<
typename MT2
1111 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1112 UniUpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
1114 if( IsStrictlyTriangular<MT2>::value || ( !IsUniUpper<MT2>::value && !
isUniUpper( ~rhs ) ) ) {
1120 if( !IsUniUpper<MT2>::value )
1145 template<
typename MT
1147 template<
typename MT2
1149 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1150 UniUpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
1152 if( IsStrictlyTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1156 if( IsUniUpper<MT2>::value ) {
1166 matrix_ = std::move( tmp );
1169 if( !IsUniUpper<MT2>::value )
1194 template<
typename MT
1196 template<
typename MT2
1198 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1201 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1208 if( !IsStrictlyUpper<MT2>::value )
1233 template<
typename MT
1235 template<
typename MT2
1237 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1240 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1241 ( IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1245 if( IsStrictlyUpper<MT2>::value ) {
1249 const ResultType_<MT2> tmp( ~rhs );
1258 if( !IsStrictlyUpper<MT2>::value )
1283 template<
typename MT
1285 template<
typename MT2
1287 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1290 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1297 if( !IsStrictlyUpper<MT2>::value )
1322 template<
typename MT
1324 template<
typename MT2
1326 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1329 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1330 ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1334 if( IsStrictlyUpper<MT2>::value ) {
1338 const ResultType_<MT2> tmp( ~rhs );
1347 if( !IsStrictlyUpper<MT2>::value )
1372 template<
typename MT
1374 template<
typename MT2
1376 inline UniUpperMatrix<MT,SO,false>&
1377 UniUpperMatrix<MT,SO,false>::operator%=(
const Matrix<MT2,SO2>& rhs )
1379 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1383 If_< IsComputation<MT2>, ResultType_<MT2>,
const MT2& > tmp( ~rhs );
1385 for(
size_t i=0UL; i<(~rhs).
rows(); ++i ) {
1386 if( !
isOne( tmp(i,i) ) ) {
1393 if( !IsUniUpper<MT2>::value )
1419 template<
typename MT
1423 return matrix_.rows();
1435 template<
typename MT
1439 return matrix_.columns();
1451 template<
typename MT
1455 return matrix_.capacity();
1473 template<
typename MT
1477 return matrix_.capacity(i);
1489 template<
typename MT
1493 return matrix_.nonZeros();
1511 template<
typename MT
1515 return matrix_.nonZeros(i);
1527 template<
typename MT
1532 for(
size_t j=1UL; j<
columns(); ++j ) {
1533 matrix_.erase( j, matrix_.begin(j), matrix_.lowerBound(j,j) );
1537 for(
size_t i=0UL; i<
rows(); ++i ) {
1538 matrix_.erase( i, matrix_.lowerBound(i,i+1UL), matrix_.end(i) );
1559 template<
typename MT
1564 matrix_.erase( i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1567 matrix_.erase( i, matrix_.lowerBound(i,i+1UL), matrix_.end(i) );
1582 template<
typename MT
1588 if( IsResizable<MT>::value ) {
1614 template<
typename MT
1622 const size_t oldsize( matrix_.rows() );
1624 matrix_.resize( n, n, preserve );
1627 for(
size_t i=oldsize; i<n; ++i )
1628 matrix_.insert( i, i, ElementType(1) );
1646 template<
typename MT
1648 inline void UniUpperMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1650 matrix_.reserve( nonzeros );
1670 template<
typename MT
1672 inline void UniUpperMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1674 matrix_.reserve( i, nonzeros );
1691 template<
typename MT
1693 inline void UniUpperMatrix<MT,SO,false>::trim()
1713 template<
typename MT
1715 inline void UniUpperMatrix<MT,SO,false>::trim(
size_t i )
1733 template<
typename MT
1737 matrix_.shrinkToFit();
1750 template<
typename MT
1756 swap( matrix_, m.matrix_ );
1773 template<
typename MT
1775 inline constexpr
size_t UniUpperMatrix<MT,SO,false>::maxNonZeros() noexcept
1779 return maxNonZeros( Size<MT,0UL>::value );
1795 template<
typename MT
1797 inline constexpr
size_t UniUpperMatrix<MT,SO,false>::maxNonZeros(
size_t n ) noexcept
1799 return ( ( n + 1UL ) * n ) / 2UL;
1811 template<
typename MT
1813 inline void UniUpperMatrix<MT,SO,false>::resetLower()
1816 for(
size_t j=0UL; j<
columns(); ++j )
1817 matrix_.erase( j, matrix_.upperBound( j, j ), matrix_.end( j ) );
1820 for(
size_t i=1UL; i<
rows(); ++i )
1821 matrix_.erase( i, matrix_.begin( i ), matrix_.lowerBound( i, i ) );
1852 template<
typename MT
1861 return Iterator( matrix_.set( i, j, value ), ( SO ? j : i ) );
1884 template<
typename MT
1887 UniUpperMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1893 return Iterator( matrix_.insert( i, j, value ), ( SO ? j : i ) );
1949 template<
typename MT
1951 inline void UniUpperMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1957 if( !check || !isDefault<strict>( value ) )
1958 matrix_.insert( i, j, value );
1978 template<
typename MT
1980 inline void UniUpperMatrix<MT,SO,false>::finalize(
size_t i )
2008 template<
typename MT
2010 inline void UniUpperMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
2016 matrix_.erase( i, j );
2036 template<
typename MT
2039 UniUpperMatrix<MT,SO,false>::erase(
size_t i,
Iterator pos )
2041 if( pos != matrix_.end(i) && pos->index() == i ) {
2045 return Iterator( matrix_.erase( i, pos.base() ), i );
2066 template<
typename MT
2069 UniUpperMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last )
2074 if( ( !SO && first.base() == matrix_.begin(i) ) ||
2075 ( SO && last.base() == matrix_.end(i) ) ) {
2079 return Iterator( matrix_.erase( i, first.base(), last.base() ), i );
2107 template<
typename MT
2109 template<
typename Pred >
2110 inline void UniUpperMatrix<MT,SO,false>::erase( Pred predicate )
2113 for(
size_t j=1UL; j<
columns(); ++j ) {
2114 matrix_.erase( j, matrix_.begin(j), matrix_.find(j,j), predicate );
2118 for(
size_t i=0UL; (i+1UL) <
rows(); ++i ) {
2119 matrix_.erase( i, matrix_.lowerBound(i,i+1UL), matrix_.end(i), predicate );
2157 template<
typename MT
2159 template<
typename Pred >
2160 inline void UniUpperMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last, Pred predicate )
2165 if( ( !SO && first.base() == matrix_.begin(i) && predicate(
ElementType(1) ) ) ||
2166 ( SO && last.base() == matrix_.end(i) && predicate(
ElementType(1) ) ) ) {
2170 matrix_.erase( i, first.base(), last.base(), predicate );
2202 template<
typename MT
2205 UniUpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
2207 return Iterator( matrix_.find( i, j ), ( SO ? j : i ) );
2229 template<
typename MT
2232 UniUpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const 2234 return matrix_.find( i, j );
2256 template<
typename MT
2259 UniUpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
2261 return Iterator( matrix_.lowerBound( i, j ), ( SO ? j : i ) );
2283 template<
typename MT
2286 UniUpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const 2288 return matrix_.lowerBound( i, j );
2310 template<
typename MT
2313 UniUpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
2315 return Iterator( matrix_.upperBound( i, j ), ( SO ? j : i ) );
2337 template<
typename MT
2340 UniUpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const 2342 return matrix_.upperBound( i, j );
2366 template<
typename MT
2397 template<
typename MT
2399 template<
typename Other >
2400 inline bool UniUpperMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2402 return matrix_.canAlias( alias );
2419 template<
typename MT
2421 template<
typename Other >
2422 inline bool UniUpperMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2424 return matrix_.isAliased( alias );
2441 template<
typename MT
2443 inline bool UniUpperMatrix<MT,SO,false>::canSMPAssign() const noexcept
2445 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:3077
#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 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:522
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:3076
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:364
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3074
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:588
BLAZE_ALWAYS_INLINE void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition: Matrix.h:775
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:5829
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:3078
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:3083
decltype(auto) declupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as upper.
Definition: DMatDeclUppExpr.h:1026
#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:560
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:733
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:3084
Header file for the extended initializer_list functionality.
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:1950
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:474
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:408
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.
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:3082
Header file for the clear shim.
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, 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:5908
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5891
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3075
#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:3079
#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
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3085
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:506
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:714
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:430
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:608
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:1641
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:690
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:272
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:490
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3080
#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:3081
#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:1554
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:254
#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:908
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, 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.