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 );
726 inline
size_t rows() const noexcept;
727 inline
size_t columns() const noexcept;
728 inline
size_t spacing() const noexcept;
729 inline
size_t capacity() const noexcept;
730 inline
size_t capacity(
size_t i ) const noexcept;
732 inline
size_t nonZeros(
size_t i ) const;
734 inline
void reset(
size_t i );
736 void resize (
size_t n,
bool preserve=true );
737 inline
void extend (
size_t n,
bool preserve=true );
738 inline
void reserve(
size_t elements );
740 inline
void swap( UniLowerMatrix& m ) noexcept;
742 static inline constexpr
size_t maxNonZeros() noexcept;
743 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
750 inline
bool isIntact() const noexcept;
757 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
758 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
760 inline
bool isAligned () const noexcept;
761 inline
bool canSMPAssign() const noexcept;
773 inline const MT construct(
size_t n ,
TrueType );
776 template< typename MT2,
bool SO2, typename T >
777 inline const MT construct( const Matrix<MT2,SO2>& m, T );
789 template< typename MT2,
bool SO2,
bool DF2 >
790 friend MT2& derestrict( UniLowerMatrix<MT2,SO2,DF2>& m );
826 template< typename MT
828 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix()
831 for(
size_t i=0UL; i<
rows(); ++i )
859 template<
typename MT
861 template<
typename A1 >
862 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
const A1& a1 )
863 : matrix_( construct( a1, typename IsResizable<MT>::Type() ) )
879 template<
typename MT
881 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
size_t n,
const ElementType& init )
882 : matrix_( n, n, ElementType() )
887 for(
size_t j=0UL; j<
columns(); ++j ) {
889 for(
size_t i=j+1UL; i<
rows(); ++i )
894 for(
size_t i=0UL; i<
rows(); ++i ) {
895 for(
size_t j=0UL; j<i; ++j )
932 template<
typename MT
934 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix( initializer_list< initializer_list<ElementType> > list )
973 template<
typename MT
975 template<
typename Other >
976 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
size_t n,
const Other* array )
977 : matrix_( n, n, array )
1012 template<
typename MT
1014 template<
typename Other
1016 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
const Other (&array)[N][N] )
1064 template<
typename MT
1066 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix( ElementType* ptr,
size_t n )
1067 : matrix_( ptr, n, n )
1116 template<
typename MT
1118 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix( ElementType* ptr,
size_t n,
size_t nn )
1119 : matrix_( ptr, n, n, nn )
1137 template<
typename MT
1139 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
const UniLowerMatrix& m )
1140 : matrix_( m.matrix_ )
1155 template<
typename MT
1157 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix( UniLowerMatrix&& m ) noexcept
1158 : matrix_( std::move( m.matrix_ ) )
1191 template<
typename MT
1194 UniLowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1221 template<
typename MT
1224 UniLowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const 1229 return matrix_(i,j);
1252 template<
typename MT
1255 UniLowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1263 return (*
this)(i,j);
1286 template<
typename MT
1289 UniLowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const 1297 return (*
this)(i,j);
1316 template<
typename MT
1318 inline typename UniLowerMatrix<MT,SO,true>::ConstPointer
1321 return matrix_.data();
1336 template<
typename MT
1338 inline typename UniLowerMatrix<MT,SO,true>::ConstPointer
1341 return matrix_.data(i);
1359 template<
typename MT
1365 return Iterator( matrix_, 0UL, i );
1367 return Iterator( matrix_, i, 0UL );
1385 template<
typename MT
1390 return matrix_.begin(i);
1408 template<
typename MT
1413 return matrix_.cbegin(i);
1431 template<
typename MT
1457 template<
typename MT
1462 return matrix_.end(i);
1480 template<
typename MT
1485 return matrix_.cend(i);
1506 template<
typename MT
1508 inline UniLowerMatrix<MT,SO,true>&
1509 UniLowerMatrix<MT,SO,true>::operator=(
const ElementType& rhs )
1512 for(
size_t j=0UL; j<
columns(); ++j )
1513 for(
size_t i=j+1UL; i<
rows(); ++i )
1517 for(
size_t i=1UL; i<
rows(); ++i )
1518 for(
size_t j=0UL; j<i; ++j )
1553 template<
typename MT
1555 inline UniLowerMatrix<MT,SO,true>&
1556 UniLowerMatrix<MT,SO,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1558 const InitializerMatrix<ElementType> tmp( list, list.size() );
1599 template<
typename MT
1601 template<
typename Other
1603 inline UniLowerMatrix<MT,SO,true>&
1604 UniLowerMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1612 matrix_ = std::move( tmp );
1633 template<
typename MT
1635 inline UniLowerMatrix<MT,SO,true>&
1636 UniLowerMatrix<MT,SO,true>::operator=(
const UniLowerMatrix& rhs )
1638 matrix_ = rhs.matrix_;
1656 template<
typename MT
1658 inline UniLowerMatrix<MT,SO,true>&
1659 UniLowerMatrix<MT,SO,true>::operator=( UniLowerMatrix&& rhs ) noexcept
1661 matrix_ = std::move( rhs.matrix_ );
1685 template<
typename MT
1687 template<
typename MT2
1689 inline DisableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,true>& >
1690 UniLowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1692 if( IsStrictlyTriangular<MT2>::value || ( !IsUniLower<MT2>::value && !
isUniLower( ~rhs ) ) ) {
1720 template<
typename MT
1722 template<
typename MT2
1724 inline EnableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,true>& >
1725 UniLowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1727 if( IsStrictlyTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1731 if( IsUniLower<MT2>::value ) {
1741 matrix_ = std::move( tmp );
1766 template<
typename MT
1768 template<
typename MT2
1770 inline DisableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,true>& >
1773 if( IsUpper<MT2>::value || IsUniTriangular<MT2>::value ||
1802 template<
typename MT
1804 template<
typename MT2
1806 inline EnableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,true>& >
1809 if( IsUpper<MT2>::value || IsUniTriangular<MT2>::value ||
1810 ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1814 if( IsStrictlyLower<MT2>::value ) {
1818 const ResultType_<MT2> tmp( ~rhs );
1849 template<
typename MT
1851 template<
typename MT2
1853 inline DisableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,true>& >
1856 if( IsUpper<MT2>::value || IsUniTriangular<MT2>::value ||
1885 template<
typename MT
1887 template<
typename MT2
1889 inline EnableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,true>& >
1892 if( IsUpper<MT2>::value || IsUniTriangular<MT2>::value ||
1893 ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1897 if( IsStrictlyLower<MT2>::value ) {
1901 const ResultType_<MT2> tmp( ~rhs );
1932 template<
typename MT
1934 template<
typename MT2
1936 inline UniLowerMatrix<MT,SO,true>&
1937 UniLowerMatrix<MT,SO,true>::operator%=(
const Matrix<MT2,SO2>& rhs )
1939 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1943 If_< IsComputation<MT2>, ResultType_<MT2>,
const MT2& > tmp( ~rhs );
1945 for(
size_t i=0UL; i<(~rhs).
rows(); ++i ) {
1946 if( !
isOne( tmp(i,i) ) ) {
1976 template<
typename MT
1980 return matrix_.rows();
1992 template<
typename MT
1996 return matrix_.columns();
2013 template<
typename MT
2017 return matrix_.spacing();
2029 template<
typename MT
2033 return matrix_.capacity();
2051 template<
typename MT
2055 return matrix_.capacity(i);
2067 template<
typename MT
2071 return matrix_.nonZeros();
2089 template<
typename MT
2093 return matrix_.nonZeros(i);
2105 template<
typename MT
2112 for(
size_t j=0UL; j<
columns(); ++j )
2113 for(
size_t i=j+1UL; i<
rows(); ++i )
2114 clear( matrix_(i,j) );
2117 for(
size_t i=1UL; i<
rows(); ++i )
2118 for(
size_t j=0UL; j<i; ++j )
2119 clear( matrix_(i,j) );
2139 template<
typename MT
2146 for(
size_t j=i+1UL; j<
rows(); ++j )
2147 clear( matrix_(j,i) );
2150 for(
size_t j=0UL; j<i; ++j )
2151 clear( matrix_(i,j) );
2170 template<
typename MT
2176 if( IsResizable<MT>::value ) {
2223 template<
typename MT
2233 const size_t oldsize( matrix_.rows() );
2235 matrix_.resize( n, n,
true );
2239 const size_t increment( n - oldsize );
2240 submatrix( matrix_, 0UL, oldsize, n-1UL, increment ).reset();
2242 for(
size_t i=oldsize; i<n; ++i )
2263 template<
typename MT
2265 inline void UniLowerMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2286 template<
typename MT
2288 inline void UniLowerMatrix<MT,SO,true>::reserve(
size_t elements )
2290 matrix_.reserve( elements );
2306 template<
typename MT
2310 matrix_.shrinkToFit();
2323 template<
typename MT
2329 swap( matrix_, m.matrix_ );
2347 template<
typename MT
2349 inline constexpr
size_t UniLowerMatrix<MT,SO,true>::maxNonZeros() noexcept
2353 return maxNonZeros( Size<MT,0UL>::value );
2369 template<
typename MT
2371 inline constexpr
size_t UniLowerMatrix<MT,SO,true>::maxNonZeros(
size_t n ) noexcept
2373 return ( ( n + 1UL ) * n ) / 2UL;
2397 template<
typename MT
2428 template<
typename MT
2430 template<
typename Other >
2431 inline bool UniLowerMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2433 return matrix_.canAlias( alias );
2450 template<
typename MT
2452 template<
typename Other >
2453 inline bool UniLowerMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2455 return matrix_.isAliased( alias );
2471 template<
typename MT
2473 inline bool UniLowerMatrix<MT,SO,true>::isAligned() const noexcept
2475 return matrix_.isAligned();
2492 template<
typename MT
2494 inline bool UniLowerMatrix<MT,SO,true>::canSMPAssign() const noexcept
2496 return matrix_.canSMPAssign();
2518 template<
typename MT
2521 UniLowerMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2523 return matrix_.load( i, j );
2545 template<
typename MT
2550 return matrix_.loada( i, j );
2572 template<
typename MT
2577 return matrix_.loadu( i, j );
2598 template<
typename MT
2600 inline const MT UniLowerMatrix<MT,SO,true>::construct(
size_t n, TrueType )
2606 for(
size_t i=0UL; i<n; ++i )
2622 template<
typename MT
2624 inline const MT UniLowerMatrix<MT,SO,true>::construct(
const ElementType& init, FalseType )
2632 for(
size_t j=0UL; j<tmp.columns(); ++j ) {
2634 for(
size_t i=j+1UL; i<tmp.rows(); ++i )
2639 for(
size_t i=0UL; i<tmp.rows(); ++i ) {
2640 for(
size_t j=0UL; j<i; ++j )
2663 template<
typename MT
2665 template<
typename MT2
2668 inline const MT UniLowerMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2672 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.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:131
Constraint on the data type.
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:3077
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1386
#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 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:522
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:3076
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:364
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3074
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:588
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:701
bool isUniLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower unitriangular matrix.
Definition: DenseMatrix.h:1299
BLAZE_ALWAYS_INLINE void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition: Matrix.h:775
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:5829
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:3078
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:3083
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type, a compilation error is created.
Definition: Volatile.h:79
BLAZE_ALWAYS_INLINE size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:560
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:733
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:3084
Header file for the extended initializer_list functionality.
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:474
BLAZE_ALWAYS_INLINE MT::ConstIterator cbegin(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:408
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
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:252
#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 IsSquare type trait.
Constraint on the data type.
Header file for the implementation of a matrix representation of an initializer list.
Header file for the DisableIf class template.
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:3082
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_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:5908
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5891
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3075
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:79
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:3079
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the DenseMatrix base class.
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:3085
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:250
Constraint on the data type.
decltype(auto) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:1026
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:506
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.
decltype(auto) elements(Vector< VT, TF > &vector, REAs... args)
Creating a view on a selection of elements of the given vector.
Definition: Elements.h:134
Header file for the exception macros of the math module.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a upper triangular matrix type...
Definition: Upper.h:81
BLAZE_ALWAYS_INLINE void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:714
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:430
decltype(auto) operator*(const DenseMatrix< MT1, false > &lhs, const DenseMatrix< MT2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:8893
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:290
decltype(auto) submatrix(Matrix< MT, SO > &, RSAs...)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:360
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:608
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.
Constraint on the data type.
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:131
#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:690
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:272
Constraint on the data type.
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:490
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3080
BLAZE_ALWAYS_INLINE MT::ElementType * data(DenseMatrix< MT, SO > &dm) noexcept
Low-level data access to the dense matrix elements.
Definition: DenseMatrix.h:169
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE_TYPE(T)
Constraint on the data type.In case the given data type T is not resizable, i.e. does not have a 'res...
Definition: Resizable.h:61
Header file for the IsComputation type trait class.
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:3081
#define BLAZE_CONSTRAINT_MUST_NOT_BE_EXPRESSION_TYPE(T)
Constraint on the data type.In case the given data type T is an expression (i.e. a type derived from ...
Definition: Expression.h:81
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:254
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is an Hermitian matrix type, a compilation error is created.
Definition: Hermitian.h:79
BLAZE_ALWAYS_INLINE T1 & operator-=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Subtraction assignment operator for the subtraction of two SIMD packs.
Definition: BasicTypes.h:1375
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:908
Header file for the IsResizable type trait.
System settings for the inline keywords.
Header file for the Size type trait.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the TrueType type/value trait base class.