35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_DENSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_DENSE_H_ 105 template<
typename MT
107 class StrictlyUpperMatrix<MT,SO,true>
108 :
public DenseMatrix< StrictlyUpperMatrix<MT,SO,true>, SO >
112 using OT = OppositeType_<MT>;
113 using TT = TransposeType_<MT>;
114 using ET = ElementType_<MT>;
119 using This = StrictlyUpperMatrix<MT,SO,true>;
120 using BaseType = DenseMatrix<This,SO>;
125 using SIMDType = SIMDType_<MT>;
128 using Reference = StrictlyUpperProxy<MT>;
130 using Pointer = Pointer_<MT>;
131 using ConstPointer = ConstPointer_<MT>;
138 template<
typename NewType >
141 using Other = StrictlyUpperMatrix< typename MT::template Rebind<NewType>::Other >;
148 template<
size_t NewM
152 using Other = StrictlyUpperMatrix< typename MT::template Resize<NewM,NewN>::Other >;
163 using IteratorCategory = std::random_access_iterator_tag;
164 using ValueType = ElementType_<MT>;
165 using PointerType = StrictlyUpperProxy<MT>;
166 using ReferenceType = StrictlyUpperProxy<MT>;
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;
208 ( SO )?( row_ += inc ):( column_ += inc );
220 ( SO )?( row_ -= dec ):( column_ -= dec );
230 inline Iterator& operator++() noexcept {
231 ( SO )?( ++row_ ):( ++column_ );
241 inline const Iterator operator++(
int ) noexcept {
253 inline Iterator& operator--() noexcept {
254 ( SO )?( --row_ ):( --column_ );
264 inline const Iterator operator--(
int ) noexcept {
277 return ReferenceType( *matrix_, row_, column_ );
286 inline PointerType operator->()
const {
287 return PointerType( *matrix_, row_, column_ );
301 inline SIMDType load()
const {
302 return (*matrix_).load(row_,column_);
316 inline SIMDType
loada()
const {
317 return (*matrix_).loada(row_,column_);
331 inline SIMDType
loadu()
const {
332 return (*matrix_).loadu(row_,column_);
343 return matrix_->begin( column_ ) + row_;
345 return matrix_->begin( row_ ) + column_;
357 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
393 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
429 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
465 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
501 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
537 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
572 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
585 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
587 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
600 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
602 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
615 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
617 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
632 enum :
bool { simdEnabled = MT::simdEnabled };
635 enum :
bool { smpAssignable = MT::smpAssignable };
641 explicit inline StrictlyUpperMatrix();
642 template<
typename A1 >
explicit inline StrictlyUpperMatrix(
const A1& a1 );
643 explicit inline StrictlyUpperMatrix(
size_t n,
const ElementType& init );
645 explicit inline StrictlyUpperMatrix( initializer_list< initializer_list<ElementType> > list );
647 template<
typename Other >
648 explicit inline StrictlyUpperMatrix(
size_t n,
const Other* array );
650 template<
typename Other,
size_t N >
651 explicit inline StrictlyUpperMatrix(
const Other (&array)[N][N] );
653 explicit inline StrictlyUpperMatrix(
ElementType* ptr,
size_t n );
654 explicit inline StrictlyUpperMatrix(
ElementType* ptr,
size_t n,
size_t nn );
656 inline StrictlyUpperMatrix(
const StrictlyUpperMatrix& m );
657 inline StrictlyUpperMatrix( StrictlyUpperMatrix&& m ) noexcept;
668 inline Reference operator()(
size_t i,
size_t j );
670 inline Reference at(
size_t i,
size_t j );
672 inline ConstPointer data () const noexcept;
673 inline ConstPointer data (
size_t i ) const noexcept;
686 inline StrictlyUpperMatrix& operator=( initializer_list< initializer_list<
ElementType> > list );
688 template< typename Other,
size_t N >
689 inline StrictlyUpperMatrix& operator=( const Other (&array)[N][N] );
691 inline StrictlyUpperMatrix& operator=( const
ElementType& rhs );
692 inline StrictlyUpperMatrix& operator=( const StrictlyUpperMatrix& rhs );
693 inline StrictlyUpperMatrix& operator=( StrictlyUpperMatrix&& rhs ) noexcept;
695 template< typename MT2,
bool SO2 >
696 inline
DisableIf_< IsComputation<MT2>, StrictlyUpperMatrix& >
697 operator=( const Matrix<MT2,SO2>& rhs );
699 template< typename MT2,
bool SO2 >
700 inline
EnableIf_< IsComputation<MT2>, StrictlyUpperMatrix& >
701 operator=( const Matrix<MT2,SO2>& rhs );
703 template< typename MT2,
bool SO2 >
704 inline
DisableIf_< IsComputation<MT2>, StrictlyUpperMatrix& >
705 operator+=( const Matrix<MT2,SO2>& rhs );
707 template< typename MT2,
bool SO2 >
708 inline
EnableIf_< IsComputation<MT2>, StrictlyUpperMatrix& >
709 operator+=( const Matrix<MT2,SO2>& rhs );
711 template< typename MT2,
bool SO2 >
712 inline
DisableIf_< IsComputation<MT2>, StrictlyUpperMatrix& >
713 operator-=( const Matrix<MT2,SO2>& rhs );
715 template< typename MT2,
bool SO2 >
716 inline
EnableIf_< IsComputation<MT2>, StrictlyUpperMatrix& >
717 operator-=( const Matrix<MT2,SO2>& rhs );
719 template< typename MT2,
bool SO2 >
720 inline StrictlyUpperMatrix& operator%=( const Matrix<MT2,SO2>& rhs );
722 template< typename MT2,
bool SO2 >
723 inline StrictlyUpperMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
725 template< typename Other >
726 inline
EnableIf_< IsNumeric<Other>, StrictlyUpperMatrix >& operator*=( Other rhs );
728 template< typename Other >
729 inline
EnableIf_< IsNumeric<Other>, StrictlyUpperMatrix >& operator/=( Other rhs );
736 inline
size_t rows() const noexcept;
737 inline
size_t columns() const noexcept;
738 inline
size_t spacing() const noexcept;
739 inline
size_t capacity() const noexcept;
740 inline
size_t capacity(
size_t i ) const noexcept;
742 inline
size_t nonZeros(
size_t i ) const;
744 inline
void reset(
size_t i );
746 void resize (
size_t n,
bool preserve=true );
747 inline
void extend (
size_t n,
bool preserve=true );
748 inline
void reserve(
size_t elements );
750 inline
void swap( StrictlyUpperMatrix& m ) noexcept;
752 static inline constexpr
size_t maxNonZeros() noexcept;
753 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
760 template< typename Other > inline StrictlyUpperMatrix& scale( const Other& scalar );
767 inline
bool isIntact() const noexcept;
774 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
775 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
777 inline
bool isAligned () const noexcept;
778 inline
bool canSMPAssign() const noexcept;
790 inline const MT construct(
size_t n ,
TrueType );
793 template< typename MT2,
bool SO2, typename T >
794 inline const MT construct( const Matrix<MT2,SO2>& m, T );
806 template< typename MT2,
bool SO2,
bool DF2 >
807 friend MT2& derestrict( StrictlyUpperMatrix<MT2,SO2,DF2>& m );
842 template< typename MT
844 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix()
872 template<
typename MT
874 template<
typename A1 >
875 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
const A1& a1 )
876 : matrix_( construct( a1, typename IsResizable<MT>::Type() ) )
892 template<
typename MT
894 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
size_t n,
const ElementType& init )
900 for(
size_t j=0UL; j<
columns(); ++j ) {
901 for(
size_t i=0UL; i<j; ++i )
906 for(
size_t i=0UL; i<
rows(); ++i ) {
907 for(
size_t j=i+1UL; j<
columns(); ++j )
942 template<
typename MT
944 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix( initializer_list< initializer_list<ElementType> > list )
984 template<
typename MT
986 template<
typename Other >
987 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
size_t n,
const Other* array )
988 : matrix_( n, n, array )
1023 template<
typename MT
1025 template<
typename Other
1027 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
const Other (&array)[N][N] )
1073 template<
typename MT
1075 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
ElementType* ptr,
size_t n )
1076 : matrix_( ptr, n, n )
1122 template<
typename MT
1124 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
ElementType* ptr,
size_t n,
size_t nn )
1125 : matrix_( ptr, n, n, nn )
1143 template<
typename MT
1145 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
const StrictlyUpperMatrix& m )
1146 : matrix_( m.matrix_ )
1161 template<
typename MT
1163 inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix( StrictlyUpperMatrix&& m ) noexcept
1164 : matrix_( std::move( m.matrix_ ) )
1197 template<
typename MT
1200 StrictlyUpperMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1227 template<
typename MT
1230 StrictlyUpperMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const 1235 return matrix_(i,j);
1258 template<
typename MT
1261 StrictlyUpperMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1269 return (*
this)(i,j);
1292 template<
typename MT
1295 StrictlyUpperMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const 1303 return (*
this)(i,j);
1322 template<
typename MT
1324 inline typename StrictlyUpperMatrix<MT,SO,true>::ConstPointer
1325 StrictlyUpperMatrix<MT,SO,true>::data() const noexcept
1327 return matrix_.data();
1342 template<
typename MT
1344 inline typename StrictlyUpperMatrix<MT,SO,true>::ConstPointer
1345 StrictlyUpperMatrix<MT,SO,true>::data(
size_t i )
const noexcept
1347 return matrix_.data(i);
1365 template<
typename MT
1371 return Iterator( matrix_, 0UL, i );
1373 return Iterator( matrix_, i, 0UL );
1391 template<
typename MT
1396 return matrix_.begin(i);
1414 template<
typename MT
1419 return matrix_.cbegin(i);
1437 template<
typename MT
1463 template<
typename MT
1468 return matrix_.end(i);
1486 template<
typename MT
1491 return matrix_.cend(i);
1512 template<
typename MT
1514 inline StrictlyUpperMatrix<MT,SO,true>&
1515 StrictlyUpperMatrix<MT,SO,true>::operator=(
const ElementType& rhs )
1518 for(
size_t j=1UL; j<
columns(); ++j )
1519 for(
size_t i=0UL; i<j; ++i )
1523 for(
size_t i=0UL; i<
rows(); ++i )
1524 for(
size_t j=i+1UL; j<
columns(); ++j )
1558 template<
typename MT
1560 inline StrictlyUpperMatrix<MT,SO,true>&
1561 StrictlyUpperMatrix<MT,SO,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1569 matrix_ = std::move( tmp );
1605 template<
typename MT
1607 template<
typename Other
1609 inline StrictlyUpperMatrix<MT,SO,true>&
1610 StrictlyUpperMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1618 matrix_ = std::move( tmp );
1639 template<
typename MT
1641 inline StrictlyUpperMatrix<MT,SO,true>&
1642 StrictlyUpperMatrix<MT,SO,true>::operator=(
const StrictlyUpperMatrix& rhs )
1644 matrix_ = rhs.matrix_;
1662 template<
typename MT
1664 inline StrictlyUpperMatrix<MT,SO,true>&
1665 StrictlyUpperMatrix<MT,SO,true>::operator=( StrictlyUpperMatrix&& rhs ) noexcept
1667 matrix_ = std::move( rhs.matrix_ );
1691 template<
typename MT
1693 template<
typename MT2
1695 inline DisableIf_< IsComputation<MT2>, StrictlyUpperMatrix<MT,SO,true>& >
1696 StrictlyUpperMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1698 if( IsUniTriangular<MT2>::value ||
1727 template<
typename MT
1729 template<
typename MT2
1731 inline EnableIf_< IsComputation<MT2>, StrictlyUpperMatrix<MT,SO,true>& >
1732 StrictlyUpperMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1734 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1738 if( IsStrictlyUpper<MT2>::value ) {
1748 matrix_ = std::move( tmp );
1773 template<
typename MT
1775 template<
typename MT2
1777 inline DisableIf_< IsComputation<MT2>, StrictlyUpperMatrix<MT,SO,true>& >
1780 if( IsUniTriangular<MT2>::value ||
1809 template<
typename MT
1811 template<
typename MT2
1813 inline EnableIf_< IsComputation<MT2>, StrictlyUpperMatrix<MT,SO,true>& >
1816 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1820 if( IsStrictlyUpper<MT2>::value ) {
1824 const ResultType_<MT2> tmp( ~rhs );
1855 template<
typename MT
1857 template<
typename MT2
1859 inline DisableIf_< IsComputation<MT2>, StrictlyUpperMatrix<MT,SO,true>& >
1890 template<
typename MT
1892 template<
typename MT2
1894 inline EnableIf_< IsComputation<MT2>, StrictlyUpperMatrix<MT,SO,true>& >
1897 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1901 if( IsStrictlyUpper<MT2>::value ) {
1905 const ResultType_<MT2> tmp( ~rhs );
1934 template<
typename MT
1936 template<
typename MT2
1938 inline StrictlyUpperMatrix<MT,SO,true>&
1939 StrictlyUpperMatrix<MT,SO,true>::operator%=(
const Matrix<MT2,SO2>& rhs )
1941 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1968 template<
typename MT
1970 template<
typename MT2
1972 inline StrictlyUpperMatrix<MT,SO,true>&
1975 if( matrix_.rows() != (~rhs).
columns() ) {
1979 MT tmp( matrix_ * ~rhs );
1985 matrix_ = std::move( tmp );
2004 template<
typename MT
2006 template<
typename Other >
2007 inline EnableIf_< IsNumeric<Other>, StrictlyUpperMatrix<MT,SO,true> >&
2024 template<
typename MT
2026 template<
typename Other >
2027 inline EnableIf_< IsNumeric<Other>, StrictlyUpperMatrix<MT,SO,true> >&
2053 template<
typename MT
2057 return matrix_.rows();
2069 template<
typename MT
2073 return matrix_.columns();
2090 template<
typename MT
2094 return matrix_.spacing();
2106 template<
typename MT
2110 return matrix_.capacity();
2128 template<
typename MT
2132 return matrix_.capacity(i);
2144 template<
typename MT
2148 return matrix_.nonZeros();
2166 template<
typename MT
2170 return matrix_.nonZeros(i);
2182 template<
typename MT
2189 for(
size_t j=1UL; j<
columns(); ++j )
2190 for(
size_t i=0UL; i<j; ++i )
2191 clear( matrix_(i,j) );
2194 for(
size_t i=0UL; i<
rows(); ++i )
2195 for(
size_t j=i+1UL; j<
columns(); ++j )
2196 clear( matrix_(i,j) );
2216 template<
typename MT
2223 for(
size_t j=0UL; j<i; ++j )
2224 clear( matrix_(j,i) );
2227 for(
size_t j=i+1UL; j<
columns(); ++j )
2228 clear( matrix_(i,j) );
2247 template<
typename MT
2253 if( IsResizable<MT>::value ) {
2300 template<
typename MT
2310 const size_t oldsize( matrix_.rows() );
2312 matrix_.resize( n, n,
true );
2316 const size_t increment( n - oldsize );
2317 submatrix( matrix_, oldsize, 0UL, increment, n ).reset();
2337 template<
typename MT
2339 inline void StrictlyUpperMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2360 template<
typename MT
2362 inline void StrictlyUpperMatrix<MT,SO,true>::reserve(
size_t elements )
2364 matrix_.reserve( elements );
2380 template<
typename MT
2384 matrix_.shrinkToFit();
2397 template<
typename MT
2403 swap( matrix_, m.matrix_ );
2421 template<
typename MT
2423 inline constexpr
size_t StrictlyUpperMatrix<MT,SO,true>::maxNonZeros() noexcept
2427 return maxNonZeros( Rows<MT>::value );
2443 template<
typename MT
2445 inline constexpr
size_t StrictlyUpperMatrix<MT,SO,true>::maxNonZeros(
size_t n ) noexcept
2447 return ( ( n - 1UL ) * n ) / 2UL;
2479 template<
typename MT
2481 template<
typename Other >
2482 inline StrictlyUpperMatrix<MT,SO,true>&
2483 StrictlyUpperMatrix<MT,SO,true>::scale(
const Other& scalar )
2485 matrix_.scale( scalar );
2510 template<
typename MT
2541 template<
typename MT
2543 template<
typename Other >
2544 inline bool StrictlyUpperMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2546 return matrix_.canAlias( alias );
2563 template<
typename MT
2565 template<
typename Other >
2566 inline bool StrictlyUpperMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2568 return matrix_.isAliased( alias );
2584 template<
typename MT
2586 inline bool StrictlyUpperMatrix<MT,SO,true>::isAligned() const noexcept
2588 return matrix_.isAligned();
2605 template<
typename MT
2607 inline bool StrictlyUpperMatrix<MT,SO,true>::canSMPAssign() const noexcept
2609 return matrix_.canSMPAssign();
2631 template<
typename MT
2634 StrictlyUpperMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2636 return matrix_.load( i, j );
2658 template<
typename MT
2663 return matrix_.loada( i, j );
2685 template<
typename MT
2690 return matrix_.loadu( i, j );
2711 template<
typename MT
2713 inline const MT StrictlyUpperMatrix<MT,SO,true>::construct(
size_t n, TrueType )
2730 template<
typename MT
2732 inline const MT StrictlyUpperMatrix<MT,SO,true>::construct(
const ElementType& init, FalseType )
2740 for(
size_t j=0UL; j<
columns(); ++j ) {
2741 for(
size_t i=0UL; i<j; ++i )
2746 for(
size_t i=0UL; i<
rows(); ++i ) {
2747 for(
size_t j=i+1UL; j<
columns(); ++j )
2769 template<
typename MT
2771 template<
typename MT2
2774 inline const MT StrictlyUpperMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2778 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.
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 UNUSED_PARAMETER function template.
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.
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
constexpr bool operator<(const NegativeAccuracy< A > &lhs, const T &rhs)
Less-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:329
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:1411
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
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
BLAZE_ALWAYS_INLINE void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition: Matrix.h:609
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:224
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
Submatrix< MT, AF > 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:352
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
Column< MT > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:124
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
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.
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
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.
BLAZE_ALWAYS_INLINE size_t spacing(const DenseMatrix< MT, SO > &dm) noexcept
Returns the spacing between the beginning of two rows/columns.
Definition: DenseMatrix.h:110
#define BLAZE_CONSTRAINT_MUST_BE_SQUARE_MATRIX_TYPE(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
Header file for the std::initializer_list aliases.
Header file for the IsSquare type trait.
Row< MT > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:124
Constraint on the data type.
Constraint on the data type.
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_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
#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 DenseMatrix base class.
Header file for the Columns type trait.
constexpr bool operator>(const NegativeAccuracy< A > &lhs, const T &rhs)
Greater-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:367
constexpr 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:443
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.
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
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.
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.
Header file for utility functions for dense matrices.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:580
Header file for the implementation of the base template of the StrictlyUpperMatrix.
Header file for all adaptor forward declarations.
#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_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_RESIZABLE_TYPE(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
#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
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.
Constraint on the data type.
constexpr 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:405
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
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 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
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
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.
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.