35 #ifndef _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_DENSE_H_
36 #define _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_DENSE_H_
107 template<
typename MT
109 class UniUpperMatrix<MT,SO,true>
110 :
public DenseMatrix< UniUpperMatrix<MT,SO,true>, SO >
114 typedef OppositeType_<MT> OT;
115 typedef TransposeType_<MT> TT;
116 typedef ElementType_<MT> ET;
121 typedef UniUpperMatrix<MT,SO,true>
This;
122 typedef DenseMatrix<This,SO>
BaseType;
127 typedef SIMDType_<MT> SIMDType;
132 typedef Pointer_<MT> Pointer;
133 typedef ConstPointer_<MT> ConstPointer;
140 template<
typename ET >
143 typedef UniUpperMatrix< typename MT::template Rebind<ET>::Other > Other;
154 typedef std::random_access_iterator_tag IteratorCategory;
155 typedef ElementType_<MT> ValueType;
156 typedef UniUpperProxy<MT> PointerType;
157 typedef UniUpperProxy<MT> ReferenceType;
158 typedef ptrdiff_t DifferenceType;
161 typedef IteratorCategory iterator_category;
162 typedef ValueType value_type;
163 typedef PointerType pointer;
164 typedef ReferenceType reference;
165 typedef DifferenceType difference_type;
199 ( SO )?( row_ += inc ):( column_ += inc );
211 ( SO )?( row_ -= dec ):( column_ -= dec );
221 inline Iterator& operator++() noexcept {
222 ( SO )?( ++row_ ):( ++column_ );
232 inline const Iterator operator++(
int ) noexcept {
244 inline Iterator& operator--() noexcept {
245 ( SO )?( --row_ ):( --column_ );
255 inline const Iterator operator--(
int ) {
268 return ReferenceType( *matrix_, row_, column_ );
277 inline PointerType operator->()
const {
278 return PointerType( *matrix_, row_, column_ );
292 inline SIMDType load()
const {
293 return (*matrix_).load(row_,column_);
307 inline SIMDType
loada()
const {
308 return (*matrix_).loada(row_,column_);
322 inline SIMDType
loadu()
const {
323 return (*matrix_).loadu(row_,column_);
334 return matrix_->begin( column_ ) + row_;
336 return matrix_->begin( row_ ) + column_;
348 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
384 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
420 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
456 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
492 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
528 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
563 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
576 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
578 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
591 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
593 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
606 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
608 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
623 enum :
bool { simdEnabled = MT::simdEnabled };
626 enum :
bool { smpAssignable = MT::smpAssignable };
632 explicit inline UniUpperMatrix();
633 template<
typename A1 >
explicit inline UniUpperMatrix(
const A1& a1 );
634 explicit inline UniUpperMatrix(
size_t n,
const ElementType& init );
636 explicit inline UniUpperMatrix( initializer_list< initializer_list<ElementType> > list );
638 template<
typename Other >
639 explicit inline UniUpperMatrix(
size_t n,
const Other* array );
641 template<
typename Other,
size_t N >
642 explicit inline UniUpperMatrix(
const Other (&array)[N][N] );
644 explicit inline UniUpperMatrix( ElementType* ptr,
size_t n );
645 explicit inline UniUpperMatrix( ElementType* ptr,
size_t n,
size_t nn );
647 template<
typename Deleter >
648 explicit inline UniUpperMatrix( ElementType* ptr,
size_t n, Deleter d );
650 template<
typename Deleter >
651 explicit inline UniUpperMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d );
653 inline UniUpperMatrix(
const UniUpperMatrix& m );
654 inline UniUpperMatrix( UniUpperMatrix&& m ) noexcept;
665 inline Reference operator()(
size_t i,
size_t j );
666 inline ConstReference operator()(
size_t i,
size_t j ) const;
667 inline Reference at(
size_t i,
size_t j );
668 inline ConstReference at(
size_t i,
size_t j ) const;
669 inline ConstPointer data () const noexcept;
670 inline ConstPointer data (
size_t i ) const noexcept;
672 inline ConstIterator
begin (
size_t i ) const;
673 inline ConstIterator
cbegin(
size_t i ) const;
675 inline ConstIterator
end (
size_t i ) const;
676 inline ConstIterator
cend (
size_t i ) const;
683 inline UniUpperMatrix& operator=( const ElementType& rhs );
684 inline UniUpperMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
686 template< typename Other,
size_t N >
687 inline UniUpperMatrix& operator=( const Other (&array)[N][N] );
689 inline UniUpperMatrix& operator=( const UniUpperMatrix& rhs );
690 inline UniUpperMatrix& operator=( UniUpperMatrix&& rhs ) noexcept;
692 template< typename MT2,
bool SO2 >
693 inline
DisableIf_< IsComputation<MT2>, UniUpperMatrix& > operator=( const Matrix<MT2,SO2>& rhs );
695 template< typename MT2,
bool SO2 >
696 inline
EnableIf_< IsComputation<MT2>, UniUpperMatrix& > operator=( const Matrix<MT2,SO2>& rhs );
698 template< typename MT2,
bool SO2 >
699 inline
DisableIf_< IsComputation<MT2>, UniUpperMatrix& > operator+=( const Matrix<MT2,SO2>& rhs );
701 template< typename MT2,
bool SO2 >
702 inline
EnableIf_< IsComputation<MT2>, UniUpperMatrix& > operator+=( const Matrix<MT2,SO2>& rhs );
704 template< typename MT2,
bool SO2 >
705 inline
DisableIf_< IsComputation<MT2>, UniUpperMatrix& > operator-=( const Matrix<MT2,SO2>& rhs );
707 template< typename MT2,
bool SO2 >
708 inline
EnableIf_< IsComputation<MT2>, UniUpperMatrix& > operator-=( const Matrix<MT2,SO2>& rhs );
710 template< typename MT2,
bool SO2 >
711 inline UniUpperMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
718 inline
size_t rows() const noexcept;
719 inline
size_t columns() const noexcept;
720 inline
size_t spacing() const noexcept;
721 inline
size_t capacity() const noexcept;
722 inline
size_t capacity(
size_t i ) const noexcept;
724 inline
size_t nonZeros(
size_t i ) const;
726 inline
void reset(
size_t i );
728 void resize (
size_t n,
bool preserve=true );
729 inline
void extend (
size_t n,
bool preserve=true );
730 inline
void reserve(
size_t elements );
731 inline
void swap( UniUpperMatrix& m ) noexcept;
733 static inline constexpr
size_t maxNonZeros() noexcept;
734 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
741 inline
bool isIntact() const noexcept;
748 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
749 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
751 inline
bool isAligned () const noexcept;
752 inline
bool canSMPAssign() const noexcept;
764 inline const MT construct(
size_t n ,
TrueType );
765 inline const MT construct( const ElementType& value,
FalseType );
767 template< typename MT2,
bool SO2, typename T >
768 inline const MT construct( const Matrix<MT2,SO2>& m, T );
780 template< typename MT2,
bool SO2,
bool DF2 >
781 friend MT2& derestrict( UniUpperMatrix<MT2,SO2,DF2>& m );
817 template< typename MT
819 inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix()
822 for(
size_t i=0UL; i<Rows<MT>::value; ++i )
850 template<
typename MT
852 template<
typename A1 >
853 inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix(
const A1& a1 )
854 : matrix_( construct( a1, typename IsResizable<MT>::Type() ) )
870 template<
typename MT
872 inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix(
size_t n,
const ElementType& init )
873 : matrix_( n, n, ElementType() )
878 for(
size_t j=0UL; j<
columns(); ++j ) {
879 for(
size_t i=0UL; i<j; ++i )
885 for(
size_t i=0UL; i<
rows(); ++i ) {
887 for(
size_t j=i+1UL; j<
columns(); ++j )
922 template<
typename MT
924 inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix( initializer_list< initializer_list<ElementType> > list )
963 template<
typename MT
965 template<
typename Other >
966 inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix(
size_t n,
const Other* array )
967 : matrix_( n, n, array )
1002 template<
typename MT
1004 template<
typename Other
1006 inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix(
const Other (&array)[N][N] )
1040 template<
typename MT
1042 inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix( ElementType* ptr,
size_t n )
1043 : matrix_( ptr, n, n )
1078 template<
typename MT
1080 inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix( ElementType* ptr,
size_t n,
size_t nn )
1081 : matrix_( ptr, n, n, nn )
1114 template<
typename MT
1116 template<
typename Deleter >
1117 inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix( ElementType* ptr,
size_t n, Deleter d )
1118 : matrix_( ptr, n, n, d )
1152 template<
typename MT
1154 template<
typename Deleter >
1155 inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d )
1156 : matrix_( ptr, n, n, nn, d )
1174 template<
typename MT
1176 inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix(
const UniUpperMatrix& m )
1177 : matrix_( m.matrix_ )
1192 template<
typename MT
1194 inline UniUpperMatrix<MT,SO,true>::UniUpperMatrix( UniUpperMatrix&& m ) noexcept
1195 : matrix_(
std::move( m.matrix_ ) )
1228 template<
typename MT
1231 UniUpperMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1258 template<
typename MT
1261 UniUpperMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const
1266 return matrix_(i,j);
1289 template<
typename MT
1292 UniUpperMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1300 return (*
this)(i,j);
1323 template<
typename MT
1326 UniUpperMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const
1334 return (*
this)(i,j);
1353 template<
typename MT
1355 inline typename UniUpperMatrix<MT,SO,true>::ConstPointer
1356 UniUpperMatrix<MT,SO,true>::data() const noexcept
1358 return matrix_.data();
1373 template<
typename MT
1375 inline typename UniUpperMatrix<MT,SO,true>::ConstPointer
1376 UniUpperMatrix<MT,SO,true>::data(
size_t i )
const noexcept
1378 return matrix_.data(i);
1396 template<
typename MT
1402 return Iterator( matrix_, 0UL, i );
1404 return Iterator( matrix_, i, 0UL );
1422 template<
typename MT
1427 return matrix_.begin(i);
1445 template<
typename MT
1450 return matrix_.cbegin(i);
1468 template<
typename MT
1494 template<
typename MT
1499 return matrix_.end(i);
1517 template<
typename MT
1522 return matrix_.cend(i);
1543 template<
typename MT
1545 inline UniUpperMatrix<MT,SO,true>&
1546 UniUpperMatrix<MT,SO,true>::operator=(
const ElementType& rhs )
1549 for(
size_t j=1UL; j<
columns(); ++j )
1550 for(
size_t i=0UL; i<j; ++i )
1554 for(
size_t i=0UL; i<
rows(); ++i )
1555 for(
size_t j=i+1UL; j<
columns(); ++j )
1589 template<
typename MT
1591 inline UniUpperMatrix<MT,SO,true>&
1592 UniUpperMatrix<MT,SO,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1600 matrix_ = std::move( tmp );
1635 template<
typename MT
1637 template<
typename Other
1639 inline UniUpperMatrix<MT,SO,true>&
1640 UniUpperMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1648 matrix_ = std::move( tmp );
1669 template<
typename MT
1671 inline UniUpperMatrix<MT,SO,true>&
1672 UniUpperMatrix<MT,SO,true>::operator=(
const UniUpperMatrix& rhs )
1674 matrix_ = rhs.matrix_;
1692 template<
typename MT
1694 inline UniUpperMatrix<MT,SO,true>&
1695 UniUpperMatrix<MT,SO,true>::operator=( UniUpperMatrix&& rhs ) noexcept
1697 matrix_ = std::move( rhs.matrix_ );
1721 template<
typename MT
1723 template<
typename MT2
1725 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,true>& >
1726 UniUpperMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1728 if( IsStrictlyTriangular<MT2>::value || ( !IsUniUpper<MT2>::value && !
isUniUpper( ~rhs ) ) ) {
1756 template<
typename MT
1758 template<
typename MT2
1760 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,true>& >
1761 UniUpperMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1763 if( IsStrictlyTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1767 if( IsUniUpper<MT2>::value ) {
1777 matrix_ = std::move( tmp );
1802 template<
typename MT
1804 template<
typename MT2
1806 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,true>& >
1809 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1838 template<
typename MT
1840 template<
typename MT2
1842 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,true>& >
1845 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1846 ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1850 if( IsStrictlyUpper<MT2>::value ) {
1854 const ResultType_<MT2> tmp( ~rhs );
1885 template<
typename MT
1887 template<
typename MT2
1889 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,true>& >
1892 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1921 template<
typename MT
1923 template<
typename MT2
1925 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,true>& >
1928 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1929 ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1933 if( IsStrictlyUpper<MT2>::value ) {
1937 const ResultType_<MT2> tmp( ~rhs );
1967 template<
typename MT
1969 template<
typename MT2
1971 inline UniUpperMatrix<MT,SO,true>&
1974 if( matrix_.rows() != (~rhs).
columns() ) {
1978 MT tmp( matrix_ * ~rhs );
1984 matrix_ = std::move( tmp );
2009 template<
typename MT
2013 return matrix_.rows();
2025 template<
typename MT
2029 return matrix_.columns();
2046 template<
typename MT
2050 return matrix_.spacing();
2062 template<
typename MT
2066 return matrix_.capacity();
2084 template<
typename MT
2088 return matrix_.capacity(i);
2100 template<
typename MT
2104 return matrix_.nonZeros();
2122 template<
typename MT
2126 return matrix_.nonZeros(i);
2138 template<
typename MT
2145 for(
size_t j=1UL; j<
columns(); ++j )
2146 for(
size_t i=0UL; i<j; ++i )
2147 clear( matrix_(i,j) );
2150 for(
size_t i=0UL; i<
rows(); ++i )
2151 for(
size_t j=i+1UL; j<
columns(); ++j )
2152 clear( matrix_(i,j) );
2172 template<
typename MT
2179 for(
size_t j=0UL; j<i; ++j )
2180 clear( matrix_(j,i) );
2183 for(
size_t j=i+1UL; j<
columns(); ++j )
2184 clear( matrix_(i,j) );
2203 template<
typename MT
2209 if( IsResizable<MT>::value ) {
2256 template<
typename MT
2266 const size_t oldsize( matrix_.rows() );
2268 matrix_.resize( n, n,
true );
2272 const size_t increment( n - oldsize );
2273 submatrix( matrix_, oldsize, 0UL, increment, n-1UL ).reset();
2275 for(
size_t i=oldsize; i<n; ++i )
2296 template<
typename MT
2298 inline void UniUpperMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2319 template<
typename MT
2321 inline void UniUpperMatrix<MT,SO,true>::reserve(
size_t elements )
2323 matrix_.reserve( elements );
2336 template<
typename MT
2342 swap( matrix_, m.matrix_ );
2360 template<
typename MT
2362 inline constexpr
size_t UniUpperMatrix<MT,SO,true>::maxNonZeros() noexcept
2366 return maxNonZeros( Rows<MT>::value );
2382 template<
typename MT
2384 inline constexpr
size_t UniUpperMatrix<MT,SO,true>::maxNonZeros(
size_t n ) noexcept
2386 return ( ( n + 1UL ) * n ) / 2UL;
2410 template<
typename MT
2441 template<
typename MT
2443 template<
typename Other >
2444 inline bool UniUpperMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2446 return matrix_.canAlias( alias );
2463 template<
typename MT
2465 template<
typename Other >
2466 inline bool UniUpperMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2468 return matrix_.isAliased( alias );
2484 template<
typename MT
2486 inline bool UniUpperMatrix<MT,SO,true>::isAligned() const noexcept
2488 return matrix_.isAligned();
2505 template<
typename MT
2507 inline bool UniUpperMatrix<MT,SO,true>::canSMPAssign() const noexcept
2509 return matrix_.canSMPAssign();
2531 template<
typename MT
2534 UniUpperMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2536 return matrix_.load( i, j );
2558 template<
typename MT
2563 return matrix_.loada( i, j );
2585 template<
typename MT
2590 return matrix_.loadu( i, j );
2611 template<
typename MT
2613 inline const MT UniUpperMatrix<MT,SO,true>::construct(
size_t n, TrueType )
2619 for(
size_t i=0UL; i<n; ++i )
2635 template<
typename MT
2637 inline const MT UniUpperMatrix<MT,SO,true>::construct(
const ElementType& init, FalseType )
2645 for(
size_t j=0UL; j<
columns(); ++j ) {
2646 for(
size_t i=0UL; i<j; ++i )
2652 for(
size_t i=0UL; i<
rows(); ++i ) {
2654 for(
size_t j=i+1UL; j<
columns(); ++j )
2676 template<
typename MT
2678 template<
typename MT2
2681 inline const MT UniUpperMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2685 if( IsStrictlyTriangular<MT2>::value || ( !IsUniUpper<MT2>::value && !
isUniUpper( tmp ) ) ) {
Constraint on the data type.
Header file for the implementation of the Submatrix view.
#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
BoolConstant< false > FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: FalseType.h:61
#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.
#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 UNUSED_PARAMETER function template.
Header file for the IsUniUpper type trait.
const DMatDMatMultExpr< T1, T2 > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:7800
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:346
Header file for basic type definitions.
bool operator<=(const NegativeAccuracy< A > &, const T &rhs)
Less-or-equal-than comparison between a NegativeAccuracy object and a floating point value...
Definition: Accuracy.h:404
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:1423
Header file for the FalseType type/value trait base class.
#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_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:61
Constraint on the data type.
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:188
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
const DenseIterator< Type, AF > operator+(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:699
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2643
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:5077
bool operator>(const NegativeAccuracy< A > &lhs, const T &rhs)
Greater-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:366
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2636
bool operator>=(const NegativeAccuracy< A > &, const T &rhs)
Greater-or-equal-than comparison between a NegativeAccuracy object and a floating point value...
Definition: Accuracy.h:442
#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:384
#define BLAZE_CONSTRAINT_MUST_BE_SQUARE(T)
Constraint on the data type.In case the given data type T is not a square matrix type, a compilation error is created.
Definition: Square.h:60
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
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
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:1321
Constraint on the data type.
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:77
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2639
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:126
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:298
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:232
Constraint on the data type.
Constraint on the data type.
constexpr bool spacing
Adding an additional spacing line between two log messages.This setting gives the opportunity to add ...
Definition: Logging.h:70
Header file for the std::initializer_list aliases.
Header file for the IsSquare type trait.
Constraint on the data type.
Constraint on the data type.
Header file for the DisableIf class template.
Header file for the IsStrictlyUpper type trait.
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5148
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5131
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
#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
Header file for the DenseMatrix base class.
Header file for the Columns type trait.
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:330
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loada(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loada.h:80
Header file for the IsUniTriangular type trait.
Header file for the IsStrictlyTriangular type trait.
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2640
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:538
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:254
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2641
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2645
Header file for the EnableIf class template.
Header file for utility functions for dense matrices.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
Header file for all adaptor forward declarations.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:126
#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
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2642
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:1285
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
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2646
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:258
Constraint on the data type.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_RESIZABLE(T)
Constraint on the data type.In case the given data type T is resizable, i.e. has a 'resize' member fu...
Definition: Resizable.h:81
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:314
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2637
bool operator<(const NegativeAccuracy< A > &lhs, const T &rhs)
Less-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:328
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE(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.
#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 operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:249
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2638
bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:289
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:240
bool isUniUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper unitriangular matrix.
Definition: DenseMatrix.h:1344
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2644
#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:1303
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
#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
SubmatrixExprTrait_< MT, unaligned > submatrix(Matrix< MT, SO > &matrix, size_t row, size_t column, size_t m, size_t n)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:167
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:609
Header file for the IsResizable type trait.
System settings for the inline keywords.
#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
Header file for the implementation of the base template of the UniUpperMatrix.
Header file for the TrueType type/value trait base class.