35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_DENSE_H_
36 #define _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_DENSE_H_
104 template<
typename MT
106 class StrictlyUpperMatrix<MT,SO,true>
107 :
public DenseMatrix< StrictlyUpperMatrix<MT,SO,true>, SO >
111 typedef OppositeType_<MT> OT;
112 typedef TransposeType_<MT> TT;
113 typedef ElementType_<MT> ET;
118 typedef StrictlyUpperMatrix<MT,SO,true>
This;
119 typedef DenseMatrix<This,SO>
BaseType;
124 typedef SIMDType_<MT> SIMDType;
127 typedef StrictlyUpperProxy<MT>
Reference;
129 typedef Pointer_<MT> Pointer;
130 typedef ConstPointer_<MT> ConstPointer;
137 template<
typename ET >
140 typedef StrictlyUpperMatrix< typename MT::template Rebind<ET>::Other > Other;
151 typedef std::random_access_iterator_tag IteratorCategory;
152 typedef ElementType_<MT> ValueType;
153 typedef StrictlyUpperProxy<MT> PointerType;
154 typedef StrictlyUpperProxy<MT> ReferenceType;
155 typedef ptrdiff_t DifferenceType;
158 typedef IteratorCategory iterator_category;
159 typedef ValueType value_type;
160 typedef PointerType pointer;
161 typedef ReferenceType reference;
162 typedef DifferenceType difference_type;
196 ( SO )?( row_ += inc ):( column_ += inc );
208 ( SO )?( row_ -= dec ):( column_ -= dec );
218 inline Iterator& operator++() noexcept {
219 ( SO )?( ++row_ ):( ++column_ );
229 inline const Iterator operator++(
int ) noexcept {
241 inline Iterator& operator--() noexcept {
242 ( SO )?( --row_ ):( --column_ );
252 inline const Iterator operator--(
int ) noexcept {
265 return ReferenceType( *matrix_, row_, column_ );
274 inline PointerType operator->()
const {
275 return PointerType( *matrix_, row_, column_ );
289 inline SIMDType load()
const {
290 return (*matrix_).load(row_,column_);
304 inline SIMDType
loada()
const {
305 return (*matrix_).loada(row_,column_);
319 inline SIMDType
loadu()
const {
320 return (*matrix_).loadu(row_,column_);
331 return matrix_->begin( column_ ) + row_;
333 return matrix_->begin( row_ ) + column_;
345 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
381 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
417 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
453 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
489 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
525 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
560 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
573 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
575 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
588 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
590 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
603 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
605 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
620 enum :
bool { simdEnabled = MT::simdEnabled };
623 enum :
bool { smpAssignable = MT::smpAssignable };
629 explicit inline StrictlyUpperMatrix();
630 template<
typename A1 >
explicit inline StrictlyUpperMatrix(
const A1& a1 );
631 explicit inline StrictlyUpperMatrix(
size_t n,
const ElementType& init );
633 explicit inline StrictlyUpperMatrix( initializer_list< initializer_list<ElementType> > list );
635 template<
typename Other >
636 explicit inline StrictlyUpperMatrix(
size_t n,
const Other* array );
638 template<
typename Other,
size_t N >
639 explicit inline StrictlyUpperMatrix(
const Other (&array)[N][N] );
641 explicit inline StrictlyUpperMatrix( ElementType* ptr,
size_t n );
642 explicit inline StrictlyUpperMatrix( ElementType* ptr,
size_t n,
size_t nn );
644 template<
typename Deleter >
645 explicit inline StrictlyUpperMatrix( ElementType* ptr,
size_t n, Deleter d );
647 template<
typename Deleter >
648 explicit inline StrictlyUpperMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d );
650 inline StrictlyUpperMatrix(
const StrictlyUpperMatrix& m );
651 inline StrictlyUpperMatrix( StrictlyUpperMatrix&& m ) noexcept;
662 inline Reference operator()(
size_t i,
size_t j );
663 inline ConstReference operator()(
size_t i,
size_t j ) const;
664 inline Reference at(
size_t i,
size_t j );
665 inline ConstReference at(
size_t i,
size_t j ) const;
666 inline ConstPointer data () const noexcept;
667 inline ConstPointer data (
size_t i ) const noexcept;
669 inline ConstIterator
begin (
size_t i ) const;
670 inline ConstIterator
cbegin(
size_t i ) const;
672 inline ConstIterator
end (
size_t i ) const;
673 inline ConstIterator
cend (
size_t i ) const;
680 inline StrictlyUpperMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
682 template< typename Other,
size_t N >
683 inline StrictlyUpperMatrix& operator=( const Other (&array)[N][N] );
685 inline StrictlyUpperMatrix& operator=( const ElementType& rhs );
686 inline StrictlyUpperMatrix& operator=( const StrictlyUpperMatrix& rhs );
687 inline StrictlyUpperMatrix& operator=( StrictlyUpperMatrix&& rhs ) noexcept;
689 template< typename MT2,
bool SO2 >
690 inline
DisableIf_< IsComputation<MT2>, StrictlyUpperMatrix& >
691 operator=( const Matrix<MT2,SO2>& rhs );
693 template< typename MT2,
bool SO2 >
694 inline
EnableIf_< IsComputation<MT2>, StrictlyUpperMatrix& >
695 operator=( const Matrix<MT2,SO2>& rhs );
697 template< typename MT2,
bool SO2 >
698 inline
DisableIf_< IsComputation<MT2>, StrictlyUpperMatrix& >
699 operator+=( const Matrix<MT2,SO2>& rhs );
701 template< typename MT2,
bool SO2 >
702 inline
EnableIf_< IsComputation<MT2>, StrictlyUpperMatrix& >
703 operator+=( const Matrix<MT2,SO2>& rhs );
705 template< typename MT2,
bool SO2 >
706 inline
DisableIf_< IsComputation<MT2>, StrictlyUpperMatrix& >
707 operator-=( const Matrix<MT2,SO2>& rhs );
709 template< typename MT2,
bool SO2 >
710 inline
EnableIf_< IsComputation<MT2>, StrictlyUpperMatrix& >
711 operator-=( const Matrix<MT2,SO2>& rhs );
713 template< typename MT2,
bool SO2 >
714 inline StrictlyUpperMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
716 template< typename Other >
717 inline
EnableIf_< IsNumeric<Other>, StrictlyUpperMatrix >& operator*=( Other rhs );
719 template< typename Other >
720 inline
EnableIf_< IsNumeric<Other>, StrictlyUpperMatrix >& operator/=( Other rhs );
727 inline
size_t rows() const noexcept;
728 inline
size_t columns() const noexcept;
729 inline
size_t spacing() const noexcept;
730 inline
size_t capacity() const noexcept;
731 inline
size_t capacity(
size_t i ) const noexcept;
733 inline
size_t nonZeros(
size_t i ) const;
735 inline
void reset(
size_t i );
737 void resize (
size_t n,
bool preserve=true );
738 inline
void extend (
size_t n,
bool preserve=true );
739 inline
void reserve(
size_t elements );
741 template< typename Other > inline StrictlyUpperMatrix& scale( const Other& scalar );
743 inline
void swap( StrictlyUpperMatrix& m ) noexcept;
745 static inline constexpr
size_t maxNonZeros() noexcept;
746 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
753 inline
bool isIntact() const noexcept;
760 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
761 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
763 inline
bool isAligned () const noexcept;
764 inline
bool canSMPAssign() const noexcept;
776 inline const MT construct(
size_t n ,
TrueType );
777 inline const MT construct( const ElementType& value,
FalseType );
779 template< typename MT2,
bool SO2, typename T >
780 inline const MT construct( const Matrix<MT2,SO2>& m, T );
792 template< typename MT2,
bool SO2,
bool DF2 >
793 friend MT2& derestrict( StrictlyUpperMatrix<MT2,SO2,DF2>& m );
828 template< typename MT
830 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix()
858 template<
typename MT
860 template<
typename A1 >
861 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
const A1& a1 )
862 : matrix_( construct( a1, typename IsResizable<MT>::Type() ) )
878 template<
typename MT
880 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
size_t n,
const ElementType& init )
881 : matrix_( n, n, ElementType() )
886 for(
size_t j=0UL; j<
columns(); ++j ) {
887 for(
size_t i=0UL; i<j; ++i )
892 for(
size_t i=0UL; i<
rows(); ++i ) {
893 for(
size_t j=i+1UL; j<
columns(); ++j )
928 template<
typename MT
930 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix( initializer_list< initializer_list<ElementType> > list )
970 template<
typename MT
972 template<
typename Other >
973 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
size_t n,
const Other* array )
974 : matrix_( n, n, array )
1009 template<
typename MT
1011 template<
typename Other
1013 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
const Other (&array)[N][N] )
1048 template<
typename MT
1050 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix( ElementType* ptr,
size_t n )
1051 : matrix_( ptr, n, n )
1086 template<
typename MT
1088 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix( ElementType* ptr,
size_t n,
size_t nn )
1089 : matrix_( ptr, n, n, nn )
1122 template<
typename MT
1124 template<
typename Deleter >
1125 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix( ElementType* ptr,
size_t n, Deleter d )
1126 : matrix_( ptr, n, n, d )
1160 template<
typename MT
1162 template<
typename Deleter >
1163 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d )
1164 : matrix_( ptr, n, n, nn, d )
1182 template<
typename MT
1184 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
const StrictlyUpperMatrix& m )
1185 : matrix_( m.matrix_ )
1200 template<
typename MT
1202 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix( StrictlyUpperMatrix&& m ) noexcept
1203 : matrix_(
std::move( m.matrix_ ) )
1236 template<
typename MT
1239 StrictlyUpperMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1266 template<
typename MT
1269 StrictlyUpperMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const
1274 return matrix_(i,j);
1297 template<
typename MT
1300 StrictlyUpperMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1308 return (*
this)(i,j);
1331 template<
typename MT
1334 StrictlyUpperMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const
1342 return (*
this)(i,j);
1361 template<
typename MT
1363 inline typename StrictlyUpperMatrix<MT,SO,true>::ConstPointer
1364 StrictlyUpperMatrix<MT,SO,true>::data() const noexcept
1366 return matrix_.data();
1381 template<
typename MT
1383 inline typename StrictlyUpperMatrix<MT,SO,true>::ConstPointer
1384 StrictlyUpperMatrix<MT,SO,true>::data(
size_t i )
const noexcept
1386 return matrix_.data(i);
1404 template<
typename MT
1410 return Iterator( matrix_, 0UL, i );
1412 return Iterator( matrix_, i, 0UL );
1430 template<
typename MT
1435 return matrix_.begin(i);
1453 template<
typename MT
1458 return matrix_.cbegin(i);
1476 template<
typename MT
1502 template<
typename MT
1507 return matrix_.end(i);
1525 template<
typename MT
1530 return matrix_.cend(i);
1551 template<
typename MT
1553 inline StrictlyUpperMatrix<MT,SO,true>&
1554 StrictlyUpperMatrix<MT,SO,true>::operator=(
const ElementType& rhs )
1557 for(
size_t j=1UL; j<
columns(); ++j )
1558 for(
size_t i=0UL; i<j; ++i )
1562 for(
size_t i=0UL; i<
rows(); ++i )
1563 for(
size_t j=i+1UL; j<
columns(); ++j )
1597 template<
typename MT
1599 inline StrictlyUpperMatrix<MT,SO,true>&
1600 StrictlyUpperMatrix<MT,SO,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1608 matrix_ = std::move( tmp );
1644 template<
typename MT
1646 template<
typename Other
1648 inline StrictlyUpperMatrix<MT,SO,true>&
1649 StrictlyUpperMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1657 matrix_ = std::move( tmp );
1678 template<
typename MT
1680 inline StrictlyUpperMatrix<MT,SO,true>&
1681 StrictlyUpperMatrix<MT,SO,true>::operator=(
const StrictlyUpperMatrix& rhs )
1683 matrix_ = rhs.matrix_;
1701 template<
typename MT
1703 inline StrictlyUpperMatrix<MT,SO,true>&
1704 StrictlyUpperMatrix<MT,SO,true>::operator=( StrictlyUpperMatrix&& rhs ) noexcept
1706 matrix_ = std::move( rhs.matrix_ );
1730 template<
typename MT
1732 template<
typename MT2
1734 inline DisableIf_< IsComputation<MT2>, StrictlyUpperMatrix<MT,SO,true>& >
1735 StrictlyUpperMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1737 if( IsUniTriangular<MT2>::value ||
1766 template<
typename MT
1768 template<
typename MT2
1770 inline EnableIf_< IsComputation<MT2>, StrictlyUpperMatrix<MT,SO,true>& >
1771 StrictlyUpperMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1773 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1777 if( IsStrictlyUpper<MT2>::value ) {
1787 matrix_ = std::move( tmp );
1812 template<
typename MT
1814 template<
typename MT2
1816 inline DisableIf_< IsComputation<MT2>, StrictlyUpperMatrix<MT,SO,true>& >
1819 if( IsUniTriangular<MT2>::value ||
1848 template<
typename MT
1850 template<
typename MT2
1852 inline EnableIf_< IsComputation<MT2>, StrictlyUpperMatrix<MT,SO,true>& >
1855 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1859 if( IsStrictlyUpper<MT2>::value ) {
1863 const ResultType_<MT2> tmp( ~rhs );
1894 template<
typename MT
1896 template<
typename MT2
1898 inline DisableIf_< IsComputation<MT2>, StrictlyUpperMatrix<MT,SO,true>& >
1929 template<
typename MT
1931 template<
typename MT2
1933 inline EnableIf_< IsComputation<MT2>, StrictlyUpperMatrix<MT,SO,true>& >
1936 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1940 if( IsStrictlyUpper<MT2>::value ) {
1944 const ResultType_<MT2> tmp( ~rhs );
1974 template<
typename MT
1976 template<
typename MT2
1978 inline StrictlyUpperMatrix<MT,SO,true>&
1981 if( matrix_.rows() != (~rhs).
columns() ) {
1985 MT tmp( matrix_ * ~rhs );
1991 matrix_ = std::move( tmp );
2010 template<
typename MT
2012 template<
typename Other >
2013 inline EnableIf_< IsNumeric<Other>, StrictlyUpperMatrix<MT,SO,true> >&
2030 template<
typename MT
2032 template<
typename Other >
2033 inline EnableIf_< IsNumeric<Other>, StrictlyUpperMatrix<MT,SO,true> >&
2059 template<
typename MT
2063 return matrix_.rows();
2075 template<
typename MT
2079 return matrix_.columns();
2096 template<
typename MT
2100 return matrix_.spacing();
2112 template<
typename MT
2116 return matrix_.capacity();
2134 template<
typename MT
2138 return matrix_.capacity(i);
2150 template<
typename MT
2154 return matrix_.nonZeros();
2172 template<
typename MT
2176 return matrix_.nonZeros(i);
2188 template<
typename MT
2195 for(
size_t j=1UL; j<
columns(); ++j )
2196 for(
size_t i=0UL; i<j; ++i )
2197 clear( matrix_(i,j) );
2200 for(
size_t i=0UL; i<
rows(); ++i )
2201 for(
size_t j=i+1UL; j<
columns(); ++j )
2202 clear( matrix_(i,j) );
2222 template<
typename MT
2229 for(
size_t j=0UL; j<i; ++j )
2230 clear( matrix_(j,i) );
2233 for(
size_t j=i+1UL; j<
columns(); ++j )
2234 clear( matrix_(i,j) );
2253 template<
typename MT
2259 if( IsResizable<MT>::value ) {
2306 template<
typename MT
2316 const size_t oldsize( matrix_.rows() );
2318 matrix_.resize( n, n,
true );
2322 const size_t increment( n - oldsize );
2323 submatrix( matrix_, oldsize, 0UL, increment, n ).reset();
2343 template<
typename MT
2345 inline void StrictlyUpperMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2366 template<
typename MT
2368 inline void StrictlyUpperMatrix<MT,SO,true>::reserve(
size_t elements )
2370 matrix_.reserve( elements );
2383 template<
typename MT
2385 template<
typename Other >
2386 inline StrictlyUpperMatrix<MT,SO,true>&
2387 StrictlyUpperMatrix<MT,SO,true>::scale(
const Other& scalar )
2389 matrix_.scale( scalar );
2403 template<
typename MT
2409 swap( matrix_, m.matrix_ );
2427 template<
typename MT
2429 inline constexpr
size_t StrictlyUpperMatrix<MT,SO,true>::maxNonZeros() noexcept
2433 return maxNonZeros( Rows<MT>::value );
2449 template<
typename MT
2451 inline constexpr
size_t StrictlyUpperMatrix<MT,SO,true>::maxNonZeros(
size_t n ) noexcept
2453 return ( ( n - 1UL ) * n ) / 2UL;
2477 template<
typename MT
2508 template<
typename MT
2510 template<
typename Other >
2511 inline bool StrictlyUpperMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2513 return matrix_.canAlias( alias );
2530 template<
typename MT
2532 template<
typename Other >
2533 inline bool StrictlyUpperMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2535 return matrix_.isAliased( alias );
2551 template<
typename MT
2553 inline bool StrictlyUpperMatrix<MT,SO,true>::isAligned() const noexcept
2555 return matrix_.isAligned();
2572 template<
typename MT
2574 inline bool StrictlyUpperMatrix<MT,SO,true>::canSMPAssign() const noexcept
2576 return matrix_.canSMPAssign();
2598 template<
typename MT
2601 StrictlyUpperMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2603 return matrix_.load( i, j );
2625 template<
typename MT
2630 return matrix_.loada( i, j );
2652 template<
typename MT
2657 return matrix_.loadu( i, j );
2678 template<
typename MT
2680 inline const MT StrictlyUpperMatrix<MT,SO,true>::construct(
size_t n, TrueType )
2697 template<
typename MT
2699 inline const MT StrictlyUpperMatrix<MT,SO,true>::construct(
const ElementType& init, FalseType )
2707 for(
size_t j=0UL; j<
columns(); ++j ) {
2708 for(
size_t i=0UL; i<j; ++i )
2713 for(
size_t i=0UL; i<
rows(); ++i ) {
2714 for(
size_t j=i+1UL; j<
columns(); ++j )
2736 template<
typename MT
2738 template<
typename MT2
2741 inline const MT StrictlyUpperMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2745 if( IsUniTriangular<MT2>::value ||
Header file for the StrictlyUpperProxy class.
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
Header file for auxiliary alias declarations.
#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.
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
BLAZE_ALWAYS_INLINE T1 & operator/=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Division assignment operator for the division of two SIMD packs.
Definition: BasicTypes.h:1339
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.
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.
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 the implementation of the base template of the StrictlyUpperMatrix.
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_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
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 TrueType type/value trait base class.