35 #ifndef _BLAZE_MATH_ADAPTORS_UNILOWERMATRIX_DENSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_UNILOWERMATRIX_DENSE_H_ 110 template<
typename MT
112 class UniLowerMatrix<MT,SO,true>
113 :
public DenseMatrix< UniLowerMatrix<MT,SO,true>, SO >
117 using OT = OppositeType_<MT>;
118 using TT = TransposeType_<MT>;
119 using ET = ElementType_<MT>;
124 using This = UniLowerMatrix<MT,SO,true>;
125 using BaseType = DenseMatrix<This,SO>;
130 using SIMDType = SIMDType_<MT>;
135 using Pointer = Pointer_<MT>;
136 using ConstPointer = ConstPointer_<MT>;
143 template<
typename NewType >
146 using Other = UniLowerMatrix< typename MT::template Rebind<NewType>::Other >;
153 template<
size_t NewM
157 using Other = UniLowerMatrix< typename MT::template Resize<NewM,NewN>::Other >;
168 using IteratorCategory = std::random_access_iterator_tag;
169 using ValueType = ElementType_<MT>;
170 using PointerType = UniLowerProxy<MT>;
171 using ReferenceType = UniLowerProxy<MT>;
172 using DifferenceType = ptrdiff_t;
175 using iterator_category = IteratorCategory;
176 using value_type = ValueType;
177 using pointer = PointerType;
178 using reference = ReferenceType;
179 using difference_type = DifferenceType;
213 ( SO )?( row_ += inc ):( column_ += inc );
225 ( SO )?( row_ -= dec ):( column_ -= dec );
235 inline Iterator& operator++() noexcept {
236 ( SO )?( ++row_ ):( ++column_ );
246 inline const Iterator operator++(
int ) noexcept {
258 inline Iterator& operator--() noexcept {
259 ( SO )?( --row_ ):( --column_ );
269 inline const Iterator operator--(
int ) noexcept {
282 return ReferenceType( *matrix_, row_, column_ );
291 inline PointerType operator->()
const {
292 return PointerType( *matrix_, row_, column_ );
306 inline SIMDType load()
const {
307 return (*matrix_).load(row_,column_);
321 inline SIMDType
loada()
const {
322 return (*matrix_).loada(row_,column_);
336 inline SIMDType
loadu()
const {
337 return (*matrix_).loadu(row_,column_);
348 return matrix_->begin( column_ ) + row_;
350 return matrix_->begin( row_ ) + column_;
362 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
398 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
434 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
470 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
506 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
542 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
577 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
590 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
592 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
605 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
607 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
620 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
622 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
637 enum :
bool { simdEnabled = MT::simdEnabled };
640 enum :
bool { smpAssignable = MT::smpAssignable };
646 explicit inline UniLowerMatrix();
647 template<
typename A1 >
explicit inline UniLowerMatrix(
const A1& a1 );
648 explicit inline UniLowerMatrix(
size_t n,
const ElementType& init );
650 explicit inline UniLowerMatrix( initializer_list< initializer_list<ElementType> > list );
652 template<
typename Other >
653 explicit inline UniLowerMatrix(
size_t n,
const Other* array );
655 template<
typename Other,
size_t N >
656 explicit inline UniLowerMatrix(
const Other (&array)[N][N] );
658 explicit inline UniLowerMatrix(
ElementType* ptr,
size_t n );
659 explicit inline UniLowerMatrix(
ElementType* ptr,
size_t n,
size_t nn );
661 inline UniLowerMatrix(
const UniLowerMatrix& m );
662 inline UniLowerMatrix( UniLowerMatrix&& m ) noexcept;
673 inline Reference operator()(
size_t i,
size_t j );
675 inline Reference at(
size_t i,
size_t j );
677 inline ConstPointer data () const noexcept;
678 inline ConstPointer data (
size_t i ) const noexcept;
691 inline UniLowerMatrix& operator=( const
ElementType& rhs );
692 inline UniLowerMatrix& operator=( initializer_list< initializer_list<
ElementType> > list );
694 template< typename Other,
size_t N >
695 inline UniLowerMatrix& operator=( const Other (&array)[N][N] );
697 inline UniLowerMatrix& operator=( const UniLowerMatrix& rhs );
698 inline UniLowerMatrix& operator=( UniLowerMatrix&& rhs ) noexcept;
700 template< typename MT2,
bool SO2 >
701 inline
DisableIf_< IsComputation<MT2>, UniLowerMatrix& > operator=( const Matrix<MT2,SO2>& rhs );
703 template< typename MT2,
bool SO2 >
704 inline
EnableIf_< IsComputation<MT2>, UniLowerMatrix& > operator=( const Matrix<MT2,SO2>& rhs );
706 template< typename MT2,
bool SO2 >
707 inline
DisableIf_< IsComputation<MT2>, UniLowerMatrix& > operator+=( const Matrix<MT2,SO2>& rhs );
709 template< typename MT2,
bool SO2 >
710 inline
EnableIf_< IsComputation<MT2>, UniLowerMatrix& > operator+=( const Matrix<MT2,SO2>& rhs );
712 template< typename MT2,
bool SO2 >
713 inline
DisableIf_< IsComputation<MT2>, UniLowerMatrix& > operator-=( const Matrix<MT2,SO2>& rhs );
715 template< typename MT2,
bool SO2 >
716 inline
EnableIf_< IsComputation<MT2>, UniLowerMatrix& > operator-=( const Matrix<MT2,SO2>& rhs );
718 template< typename MT2,
bool SO2 >
719 inline UniLowerMatrix& operator%=( const Matrix<MT2,SO2>& rhs );
721 template< typename MT2,
bool SO2 >
722 inline UniLowerMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
729 inline
size_t rows() const noexcept;
730 inline
size_t columns() const noexcept;
731 inline
size_t spacing() const noexcept;
732 inline
size_t capacity() const noexcept;
733 inline
size_t capacity(
size_t i ) const noexcept;
735 inline
size_t nonZeros(
size_t i ) const;
737 inline
void reset(
size_t i );
739 void resize (
size_t n,
bool preserve=true );
740 inline
void extend (
size_t n,
bool preserve=true );
741 inline
void reserve(
size_t elements );
743 inline
void swap( UniLowerMatrix& 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 );
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( UniLowerMatrix<MT2,SO2,DF2>& m );
829 template< typename MT
831 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix()
834 for(
size_t i=0UL; i<
rows(); ++i )
862 template<
typename MT
864 template<
typename A1 >
865 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
const A1& a1 )
866 : matrix_( construct( a1, typename IsResizable<MT>::Type() ) )
882 template<
typename MT
884 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
size_t n,
const ElementType& init )
885 : matrix_( n, n, ElementType() )
890 for(
size_t j=0UL; j<
columns(); ++j ) {
892 for(
size_t i=j+1UL; i<
rows(); ++i )
897 for(
size_t i=0UL; i<
rows(); ++i ) {
898 for(
size_t j=0UL; j<i; ++j )
934 template<
typename MT
936 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix( initializer_list< initializer_list<ElementType> > list )
975 template<
typename MT
977 template<
typename Other >
978 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
size_t n,
const Other* array )
979 : matrix_( n, n, array )
1014 template<
typename MT
1016 template<
typename Other
1018 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
const Other (&array)[N][N] )
1066 template<
typename MT
1068 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix( ElementType* ptr,
size_t n )
1069 : matrix_( ptr, n, n )
1118 template<
typename MT
1120 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix( ElementType* ptr,
size_t n,
size_t nn )
1121 : matrix_( ptr, n, n, nn )
1139 template<
typename MT
1141 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
const UniLowerMatrix& m )
1142 : matrix_( m.matrix_ )
1157 template<
typename MT
1159 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix( UniLowerMatrix&& m ) noexcept
1160 : matrix_( std::move( m.matrix_ ) )
1193 template<
typename MT
1196 UniLowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1223 template<
typename MT
1226 UniLowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const 1231 return matrix_(i,j);
1254 template<
typename MT
1257 UniLowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1265 return (*
this)(i,j);
1288 template<
typename MT
1291 UniLowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const 1299 return (*
this)(i,j);
1318 template<
typename MT
1320 inline typename UniLowerMatrix<MT,SO,true>::ConstPointer
1321 UniLowerMatrix<MT,SO,true>::data() const noexcept
1323 return matrix_.data();
1338 template<
typename MT
1340 inline typename UniLowerMatrix<MT,SO,true>::ConstPointer
1341 UniLowerMatrix<MT,SO,true>::data(
size_t i )
const noexcept
1343 return matrix_.data(i);
1361 template<
typename MT
1367 return Iterator( matrix_, 0UL, i );
1369 return Iterator( matrix_, i, 0UL );
1387 template<
typename MT
1392 return matrix_.begin(i);
1410 template<
typename MT
1415 return matrix_.cbegin(i);
1433 template<
typename MT
1459 template<
typename MT
1464 return matrix_.end(i);
1482 template<
typename MT
1487 return matrix_.cend(i);
1508 template<
typename MT
1510 inline UniLowerMatrix<MT,SO,true>&
1511 UniLowerMatrix<MT,SO,true>::operator=(
const ElementType& rhs )
1514 for(
size_t j=0UL; j<
columns(); ++j )
1515 for(
size_t i=j+1UL; i<
rows(); ++i )
1519 for(
size_t i=1UL; i<
rows(); ++i )
1520 for(
size_t j=0UL; j<i; ++j )
1554 template<
typename MT
1556 inline UniLowerMatrix<MT,SO,true>&
1557 UniLowerMatrix<MT,SO,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1565 matrix_ = std::move( tmp );
1600 template<
typename MT
1602 template<
typename Other
1604 inline UniLowerMatrix<MT,SO,true>&
1605 UniLowerMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1613 matrix_ = std::move( tmp );
1634 template<
typename MT
1636 inline UniLowerMatrix<MT,SO,true>&
1637 UniLowerMatrix<MT,SO,true>::operator=(
const UniLowerMatrix& rhs )
1639 matrix_ = rhs.matrix_;
1657 template<
typename MT
1659 inline UniLowerMatrix<MT,SO,true>&
1660 UniLowerMatrix<MT,SO,true>::operator=( UniLowerMatrix&& rhs ) noexcept
1662 matrix_ = std::move( rhs.matrix_ );
1686 template<
typename MT
1688 template<
typename MT2
1690 inline DisableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,true>& >
1691 UniLowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1693 if( IsStrictlyTriangular<MT2>::value || ( !IsUniLower<MT2>::value && !
isUniLower( ~rhs ) ) ) {
1721 template<
typename MT
1723 template<
typename MT2
1725 inline EnableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,true>& >
1726 UniLowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1728 if( IsStrictlyTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1732 if( IsUniLower<MT2>::value ) {
1742 matrix_ = std::move( tmp );
1767 template<
typename MT
1769 template<
typename MT2
1771 inline DisableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,true>& >
1774 if( IsUpper<MT2>::value || IsUniTriangular<MT2>::value ||
1803 template<
typename MT
1805 template<
typename MT2
1807 inline EnableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,true>& >
1810 if( IsUpper<MT2>::value || IsUniTriangular<MT2>::value ||
1811 ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1815 if( IsStrictlyLower<MT2>::value ) {
1819 const ResultType_<MT2> tmp( ~rhs );
1850 template<
typename MT
1852 template<
typename MT2
1854 inline DisableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,true>& >
1857 if( IsUpper<MT2>::value || IsUniTriangular<MT2>::value ||
1886 template<
typename MT
1888 template<
typename MT2
1890 inline EnableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,true>& >
1893 if( IsUpper<MT2>::value || IsUniTriangular<MT2>::value ||
1894 ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1898 if( IsStrictlyLower<MT2>::value ) {
1902 const ResultType_<MT2> tmp( ~rhs );
1933 template<
typename MT
1935 template<
typename MT2
1937 inline UniLowerMatrix<MT,SO,true>&
1938 UniLowerMatrix<MT,SO,true>::operator%=(
const Matrix<MT2,SO2>& rhs )
1940 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1944 If_< IsComputation<MT2>, ResultType_<MT2>,
const MT2& > tmp( ~rhs );
1946 for(
size_t i=0UL; i<(~rhs).
rows(); ++i ) {
1947 if( !
isOne( tmp(i,i) ) ) {
1975 template<
typename MT
1977 template<
typename MT2
1979 inline UniLowerMatrix<MT,SO,true>&
1982 if( matrix_.rows() != (~rhs).
columns() ) {
1986 MT tmp( matrix_ * ~rhs );
1992 matrix_ = std::move( tmp );
2017 template<
typename MT
2021 return matrix_.rows();
2033 template<
typename MT
2037 return matrix_.columns();
2054 template<
typename MT
2058 return matrix_.spacing();
2070 template<
typename MT
2074 return matrix_.capacity();
2092 template<
typename MT
2096 return matrix_.capacity(i);
2108 template<
typename MT
2112 return matrix_.nonZeros();
2130 template<
typename MT
2134 return matrix_.nonZeros(i);
2146 template<
typename MT
2153 for(
size_t j=0UL; j<
columns(); ++j )
2154 for(
size_t i=j+1UL; i<
rows(); ++i )
2155 clear( matrix_(i,j) );
2158 for(
size_t i=1UL; i<
rows(); ++i )
2159 for(
size_t j=0UL; j<i; ++j )
2160 clear( matrix_(i,j) );
2180 template<
typename MT
2187 for(
size_t j=i+1UL; j<
rows(); ++j )
2188 clear( matrix_(j,i) );
2191 for(
size_t j=0UL; j<i; ++j )
2192 clear( matrix_(i,j) );
2211 template<
typename MT
2217 if( IsResizable<MT>::value ) {
2264 template<
typename MT
2274 const size_t oldsize( matrix_.rows() );
2276 matrix_.resize( n, n,
true );
2280 const size_t increment( n - oldsize );
2281 submatrix( matrix_, 0UL, oldsize, n-1UL, increment ).reset();
2283 for(
size_t i=oldsize; i<n; ++i )
2304 template<
typename MT
2306 inline void UniLowerMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2327 template<
typename MT
2329 inline void UniLowerMatrix<MT,SO,true>::reserve(
size_t elements )
2331 matrix_.reserve( elements );
2347 template<
typename MT
2351 matrix_.shrinkToFit();
2364 template<
typename MT
2370 swap( matrix_, m.matrix_ );
2388 template<
typename MT
2390 inline constexpr
size_t UniLowerMatrix<MT,SO,true>::maxNonZeros() noexcept
2394 return maxNonZeros( Rows<MT>::value );
2410 template<
typename MT
2412 inline constexpr
size_t UniLowerMatrix<MT,SO,true>::maxNonZeros(
size_t n ) noexcept
2414 return ( ( n + 1UL ) * n ) / 2UL;
2438 template<
typename MT
2469 template<
typename MT
2471 template<
typename Other >
2472 inline bool UniLowerMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2474 return matrix_.canAlias( alias );
2491 template<
typename MT
2493 template<
typename Other >
2494 inline bool UniLowerMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2496 return matrix_.isAliased( alias );
2512 template<
typename MT
2514 inline bool UniLowerMatrix<MT,SO,true>::isAligned() const noexcept
2516 return matrix_.isAligned();
2533 template<
typename MT
2535 inline bool UniLowerMatrix<MT,SO,true>::canSMPAssign() const noexcept
2537 return matrix_.canSMPAssign();
2559 template<
typename MT
2562 UniLowerMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2564 return matrix_.load( i, j );
2586 template<
typename MT
2591 return matrix_.loada( i, j );
2613 template<
typename MT
2618 return matrix_.loadu( i, j );
2639 template<
typename MT
2641 inline const MT UniLowerMatrix<MT,SO,true>::construct(
size_t n, TrueType )
2647 for(
size_t i=0UL; i<n; ++i )
2663 template<
typename MT
2665 inline const MT UniLowerMatrix<MT,SO,true>::construct(
const ElementType& init, FalseType )
2673 for(
size_t j=0UL; j<tmp.columns(); ++j ) {
2675 for(
size_t i=j+1UL; i<tmp.rows(); ++i )
2680 for(
size_t i=0UL; i<tmp.rows(); ++i ) {
2681 for(
size_t j=0UL; j<i; ++j )
2704 template<
typename MT
2706 template<
typename MT2
2709 inline const MT UniLowerMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2713 if( IsStrictlyTriangular<MT2>::value || ( !IsUniLower<MT2>::value && !
isUniLower( 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
Header file for the implementation of the base template of the UniLowerMatrix.
Header file for auxiliary alias declarations.
Constraint on the data type.
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:3079
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1245
#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
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
bool isUniLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower unitriangular matrix.
Definition: DenseMatrix.h:1158
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
#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
Header file for the IsUniLower type trait.
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.
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.
decltype(auto) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:1027
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.
Header file for the IsStrictlyTriangular type trait.
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a upper triangular matrix type...
Definition: Upper.h:81
BLAZE_ALWAYS_INLINE void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:548
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:264
decltype(auto) operator*(const DenseMatrix< MT1, false > &lhs, const DenseMatrix< MT2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:8893
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:290
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
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 UniLowerProxy class.
Header file for the isOne shim.
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
BLAZE_ALWAYS_INLINE T1 & operator+=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Addition assignment operator for the addition of two SIMD packs.
Definition: BasicTypes.h:1357
Header file for run time assertion macros.
Constraint on the data type.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower triangular matrix type...
Definition: Lower.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_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
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:662
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:270
Constraint on the data type.
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
Header file for the IsUpper type trait.
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.