35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_DENSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_DENSE_H_ 104 template<
typename MT
106 class StrictlyLowerMatrix<MT,SO,true>
107 :
public DenseMatrix< StrictlyLowerMatrix<MT,SO,true>, SO >
111 typedef OppositeType_<MT> OT;
112 typedef TransposeType_<MT> TT;
113 typedef ElementType_<MT> ET;
118 typedef StrictlyLowerMatrix<MT,SO,true>
This;
119 typedef DenseMatrix<This,SO>
BaseType;
124 typedef SIMDType_<MT> SIMDType;
127 typedef StrictlyLowerProxy<MT>
Reference;
129 typedef Pointer_<MT> Pointer;
130 typedef ConstPointer_<MT> ConstPointer;
137 template<
typename NewType >
140 typedef StrictlyLowerMatrix< typename MT::template Rebind<NewType>::Other > Other;
147 template<
size_t NewM
151 typedef StrictlyLowerMatrix< typename MT::template Resize<NewM,NewN>::Other > Other;
162 typedef std::random_access_iterator_tag IteratorCategory;
163 typedef ElementType_<MT> ValueType;
164 typedef StrictlyLowerProxy<MT> PointerType;
165 typedef StrictlyLowerProxy<MT> ReferenceType;
166 typedef ptrdiff_t DifferenceType;
169 typedef IteratorCategory iterator_category;
170 typedef ValueType value_type;
171 typedef PointerType pointer;
172 typedef ReferenceType reference;
173 typedef DifferenceType difference_type;
207 ( SO )?( row_ += inc ):( column_ += inc );
219 ( SO )?( row_ -= dec ):( column_ -= dec );
229 inline Iterator& operator++() noexcept {
230 ( SO )?( ++row_ ):( ++column_ );
240 inline const Iterator operator++(
int ) noexcept {
252 inline Iterator& operator--() noexcept {
253 ( SO )?( --row_ ):( --column_ );
263 inline const Iterator operator--(
int ) noexcept {
276 return ReferenceType( *matrix_, row_, column_ );
285 inline PointerType operator->()
const {
286 return PointerType( *matrix_, row_, column_ );
300 inline SIMDType load()
const {
301 return (*matrix_).load(row_,column_);
315 inline SIMDType
loada()
const {
316 return (*matrix_).loada(row_,column_);
330 inline SIMDType
loadu()
const {
331 return (*matrix_).loadu(row_,column_);
342 return matrix_->begin( column_ ) + row_;
344 return matrix_->begin( row_ ) + column_;
356 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
392 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
428 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
464 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
500 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
536 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
571 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
584 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
586 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
599 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
601 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
614 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
616 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
631 enum :
bool { simdEnabled = MT::simdEnabled };
634 enum :
bool { smpAssignable = MT::smpAssignable };
640 explicit inline StrictlyLowerMatrix();
641 template<
typename A1 >
explicit inline StrictlyLowerMatrix(
const A1& a1 );
642 explicit inline StrictlyLowerMatrix(
size_t n,
const ElementType& init );
644 explicit inline StrictlyLowerMatrix( initializer_list< initializer_list<ElementType> > list );
646 template<
typename Other >
647 explicit inline StrictlyLowerMatrix(
size_t n,
const Other* array );
649 template<
typename Other,
size_t N >
650 explicit inline StrictlyLowerMatrix(
const Other (&array)[N][N] );
652 explicit inline StrictlyLowerMatrix( ElementType* ptr,
size_t n );
653 explicit inline StrictlyLowerMatrix( ElementType* ptr,
size_t n,
size_t nn );
655 template<
typename Deleter >
656 explicit inline StrictlyLowerMatrix( ElementType* ptr,
size_t n, Deleter d );
658 template<
typename Deleter >
659 explicit inline StrictlyLowerMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d );
661 inline StrictlyLowerMatrix(
const StrictlyLowerMatrix& m );
662 inline StrictlyLowerMatrix( StrictlyLowerMatrix&& m ) noexcept;
673 inline Reference operator()(
size_t i,
size_t j );
674 inline ConstReference operator()(
size_t i,
size_t j )
const;
675 inline Reference at(
size_t i,
size_t j );
676 inline ConstReference at(
size_t i,
size_t j )
const;
677 inline ConstPointer data () const noexcept;
678 inline ConstPointer data (
size_t i ) const noexcept;
680 inline ConstIterator
begin (
size_t i ) const;
681 inline ConstIterator
cbegin(
size_t i ) const;
683 inline ConstIterator
end (
size_t i ) const;
684 inline ConstIterator
cend (
size_t i ) const;
691 inline StrictlyLowerMatrix& operator=( const ElementType& rhs );
692 inline StrictlyLowerMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
694 template< typename Other,
size_t N >
695 inline StrictlyLowerMatrix& operator=( const Other (&array)[N][N] );
697 inline StrictlyLowerMatrix& operator=( const StrictlyLowerMatrix& rhs );
698 inline StrictlyLowerMatrix& operator=( StrictlyLowerMatrix&& rhs ) noexcept;
700 template< typename MT2,
bool SO2 >
701 inline
DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
702 operator=( const Matrix<MT2,SO2>& rhs );
704 template< typename MT2,
bool SO2 >
705 inline
EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
706 operator=( const Matrix<MT2,SO2>& rhs );
708 template< typename MT2,
bool SO2 >
709 inline
DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
710 operator+=( const Matrix<MT2,SO2>& rhs );
712 template< typename MT2,
bool SO2 >
713 inline
EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
714 operator+=( const Matrix<MT2,SO2>& rhs );
716 template< typename MT2,
bool SO2 >
717 inline
DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
718 operator-=( const Matrix<MT2,SO2>& rhs );
720 template< typename MT2,
bool SO2 >
721 inline
EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
722 operator-=( const Matrix<MT2,SO2>& rhs );
724 template< typename MT2,
bool SO2 >
725 inline StrictlyLowerMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
727 template< typename Other >
728 inline
EnableIf_< IsNumeric<Other>, StrictlyLowerMatrix >& operator*=( Other rhs );
730 template< typename Other >
731 inline
EnableIf_< IsNumeric<Other>, StrictlyLowerMatrix >& operator/=( Other rhs );
738 inline
size_t rows() const noexcept;
739 inline
size_t columns() const noexcept;
740 inline
size_t spacing() const noexcept;
741 inline
size_t capacity() const noexcept;
742 inline
size_t capacity(
size_t i ) const noexcept;
744 inline
size_t nonZeros(
size_t i ) const;
746 inline
void reset(
size_t i );
748 void resize (
size_t n,
bool preserve=true );
749 inline
void extend (
size_t n,
bool preserve=true );
750 inline
void reserve(
size_t elements );
751 inline
void swap( StrictlyLowerMatrix& m ) noexcept;
753 static inline constexpr
size_t maxNonZeros() noexcept;
754 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
761 template< typename Other > inline StrictlyLowerMatrix& scale( const Other& scalar );
768 inline
bool isIntact() const noexcept;
775 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
776 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
778 inline
bool isAligned () const noexcept;
779 inline
bool canSMPAssign() const noexcept;
791 inline const MT construct(
size_t n ,
TrueType );
792 inline const MT construct( const ElementType& value,
FalseType );
794 template< typename MT2,
bool SO2, typename T >
795 inline const MT construct( const Matrix<MT2,SO2>& m, T );
807 template< typename MT2,
bool SO2,
bool DF2 >
808 friend MT2& derestrict( StrictlyLowerMatrix<MT2,SO2,DF2>& m );
843 template< typename MT
845 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix()
873 template<
typename MT
875 template<
typename A1 >
876 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
const A1& a1 )
877 : matrix_( construct( a1, typename IsResizable<MT>::Type() ) )
893 template<
typename MT
895 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
size_t n,
const ElementType& init )
896 : matrix_( n, n, ElementType() )
901 for(
size_t j=0UL; j<
columns(); ++j ) {
902 for(
size_t i=j+1UL; i<
rows(); ++i )
907 for(
size_t i=0UL; i<
rows(); ++i ) {
908 for(
size_t j=0UL; j<i; ++j )
943 template<
typename MT
945 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( initializer_list< initializer_list<ElementType> > list )
984 template<
typename MT
986 template<
typename Other >
987 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
size_t n,
const Other* array )
988 : matrix_( n, n, array )
1023 template<
typename MT
1025 template<
typename Other
1027 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
const Other (&array)[N][N] )
1062 template<
typename MT
1064 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( ElementType* ptr,
size_t n )
1065 : matrix_( ptr, n, n )
1100 template<
typename MT
1102 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( ElementType* ptr,
size_t n,
size_t nn )
1103 : matrix_( ptr, n, n, nn )
1136 template<
typename MT
1138 template<
typename Deleter >
1139 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( ElementType* ptr,
size_t n, Deleter d )
1140 : matrix_( ptr, n, n, d )
1174 template<
typename MT
1176 template<
typename Deleter >
1177 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d )
1178 : matrix_( ptr, n, n, nn, d )
1196 template<
typename MT
1198 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
const StrictlyLowerMatrix& m )
1199 : matrix_( m.matrix_ )
1214 template<
typename MT
1216 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( StrictlyLowerMatrix&& m ) noexcept
1217 : matrix_( std::move( m.matrix_ ) )
1250 template<
typename MT
1253 StrictlyLowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1280 template<
typename MT
1283 StrictlyLowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const 1288 return matrix_(i,j);
1311 template<
typename MT
1314 StrictlyLowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1322 return (*
this)(i,j);
1345 template<
typename MT
1348 StrictlyLowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const 1356 return (*
this)(i,j);
1375 template<
typename MT
1377 inline typename StrictlyLowerMatrix<MT,SO,true>::ConstPointer
1378 StrictlyLowerMatrix<MT,SO,true>::data() const noexcept
1380 return matrix_.data();
1395 template<
typename MT
1397 inline typename StrictlyLowerMatrix<MT,SO,true>::ConstPointer
1398 StrictlyLowerMatrix<MT,SO,true>::data(
size_t i )
const noexcept
1400 return matrix_.data(i);
1418 template<
typename MT
1424 return Iterator( matrix_, 0UL, i );
1426 return Iterator( matrix_, i, 0UL );
1444 template<
typename MT
1449 return matrix_.begin(i);
1467 template<
typename MT
1472 return matrix_.cbegin(i);
1490 template<
typename MT
1516 template<
typename MT
1521 return matrix_.end(i);
1539 template<
typename MT
1544 return matrix_.cend(i);
1565 template<
typename MT
1567 inline StrictlyLowerMatrix<MT,SO,true>&
1568 StrictlyLowerMatrix<MT,SO,true>::operator=(
const ElementType& rhs )
1571 for(
size_t j=0UL; j<
columns(); ++j )
1572 for(
size_t i=j+1UL; i<
rows(); ++i )
1576 for(
size_t i=1UL; i<
rows(); ++i )
1577 for(
size_t j=0UL; j<i; ++j )
1611 template<
typename MT
1613 inline StrictlyLowerMatrix<MT,SO,true>&
1614 StrictlyLowerMatrix<MT,SO,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1622 matrix_ = std::move( tmp );
1658 template<
typename MT
1660 template<
typename Other
1662 inline StrictlyLowerMatrix<MT,SO,true>&
1663 StrictlyLowerMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1671 matrix_ = std::move( tmp );
1692 template<
typename MT
1694 inline StrictlyLowerMatrix<MT,SO,true>&
1695 StrictlyLowerMatrix<MT,SO,true>::operator=(
const StrictlyLowerMatrix& rhs )
1697 matrix_ = rhs.matrix_;
1715 template<
typename MT
1717 inline StrictlyLowerMatrix<MT,SO,true>&
1718 StrictlyLowerMatrix<MT,SO,true>::operator=( StrictlyLowerMatrix&& rhs ) noexcept
1720 matrix_ = std::move( rhs.matrix_ );
1744 template<
typename MT
1746 template<
typename MT2
1748 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1749 StrictlyLowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1751 if( IsUniTriangular<MT2>::value ||
1780 template<
typename MT
1782 template<
typename MT2
1784 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1785 StrictlyLowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1787 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1791 if( IsStrictlyLower<MT2>::value ) {
1801 matrix_ = std::move( tmp );
1826 template<
typename MT
1828 template<
typename MT2
1830 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1833 if( IsUniTriangular<MT2>::value ||
1862 template<
typename MT
1864 template<
typename MT2
1866 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1869 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1873 if( IsStrictlyLower<MT2>::value ) {
1877 const ResultType_<MT2> tmp( ~rhs );
1908 template<
typename MT
1910 template<
typename MT2
1912 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1915 if( IsUniTriangular<MT2>::value ||
1944 template<
typename MT
1946 template<
typename MT2
1948 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1951 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1955 if( IsStrictlyLower<MT2>::value ) {
1959 const ResultType_<MT2> tmp( ~rhs );
1989 template<
typename MT
1991 template<
typename MT2
1993 inline StrictlyLowerMatrix<MT,SO,true>&
1996 if( matrix_.rows() != (~rhs).
columns() ) {
2000 MT tmp( matrix_ * ~rhs );
2006 matrix_ = std::move( tmp );
2025 template<
typename MT
2027 template<
typename Other >
2028 inline EnableIf_< IsNumeric<Other>, StrictlyLowerMatrix<MT,SO,true> >&
2045 template<
typename MT
2047 template<
typename Other >
2048 inline EnableIf_< IsNumeric<Other>, StrictlyLowerMatrix<MT,SO,true> >&
2074 template<
typename MT
2078 return matrix_.rows();
2090 template<
typename MT
2094 return matrix_.columns();
2111 template<
typename MT
2115 return matrix_.spacing();
2127 template<
typename MT
2131 return matrix_.capacity();
2149 template<
typename MT
2153 return matrix_.capacity(i);
2165 template<
typename MT
2169 return matrix_.nonZeros();
2187 template<
typename MT
2191 return matrix_.nonZeros(i);
2203 template<
typename MT
2210 for(
size_t j=0UL; j<
columns(); ++j )
2211 for(
size_t i=j+1UL; i<
rows(); ++i )
2212 clear( matrix_(i,j) );
2215 for(
size_t i=1UL; i<
rows(); ++i )
2216 for(
size_t j=0UL; j<i; ++j )
2217 clear( matrix_(i,j) );
2237 template<
typename MT
2244 for(
size_t j=i+1UL; j<
rows(); ++j )
2245 clear( matrix_(j,i) );
2248 for(
size_t j=0UL; j<i; ++j )
2249 clear( matrix_(i,j) );
2268 template<
typename MT
2274 if( IsResizable<MT>::value ) {
2321 template<
typename MT
2331 const size_t oldsize( matrix_.rows() );
2333 matrix_.resize( n, n,
true );
2337 const size_t increment( n - oldsize );
2338 submatrix( matrix_, 0UL, oldsize, n, increment ).reset();
2358 template<
typename MT
2360 inline void StrictlyLowerMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2381 template<
typename MT
2383 inline void StrictlyLowerMatrix<MT,SO,true>::reserve(
size_t elements )
2385 matrix_.reserve( elements );
2398 template<
typename MT
2404 swap( matrix_, m.matrix_ );
2422 template<
typename MT
2424 inline constexpr
size_t StrictlyLowerMatrix<MT,SO,true>::maxNonZeros() noexcept
2428 return maxNonZeros( Rows<MT>::value );
2444 template<
typename MT
2446 inline constexpr
size_t StrictlyLowerMatrix<MT,SO,true>::maxNonZeros(
size_t n ) noexcept
2448 return ( ( n - 1UL ) * n ) / 2UL;
2469 template<
typename MT
2471 template<
typename Other >
2472 inline StrictlyLowerMatrix<MT,SO,true>&
2473 StrictlyLowerMatrix<MT,SO,true>::scale(
const Other& scalar )
2475 matrix_.scale( scalar );
2500 template<
typename MT
2531 template<
typename MT
2533 template<
typename Other >
2534 inline bool StrictlyLowerMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2536 return matrix_.canAlias( alias );
2553 template<
typename MT
2555 template<
typename Other >
2556 inline bool StrictlyLowerMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2558 return matrix_.isAliased( alias );
2574 template<
typename MT
2576 inline bool StrictlyLowerMatrix<MT,SO,true>::isAligned() const noexcept
2578 return matrix_.isAligned();
2595 template<
typename MT
2597 inline bool StrictlyLowerMatrix<MT,SO,true>::canSMPAssign() const noexcept
2599 return matrix_.canSMPAssign();
2621 template<
typename MT
2624 StrictlyLowerMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2626 return matrix_.load( i, j );
2648 template<
typename MT
2653 return matrix_.loada( i, j );
2675 template<
typename MT
2680 return matrix_.loadu( i, j );
2701 template<
typename MT
2703 inline const MT StrictlyLowerMatrix<MT,SO,true>::construct(
size_t n, TrueType )
2720 template<
typename MT
2722 inline const MT StrictlyLowerMatrix<MT,SO,true>::construct(
const ElementType& init, FalseType )
2730 for(
size_t j=0UL; j<tmp.columns(); ++j ) {
2731 for(
size_t i=j+1UL; i<tmp.rows(); ++i )
2736 for(
size_t i=0UL; i<tmp.rows(); ++i ) {
2737 for(
size_t j=0UL; j<i; ++j )
2759 template<
typename MT
2761 template<
typename MT2
2764 inline const MT StrictlyLowerMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2768 if( IsUniTriangular<MT2>::value ||
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
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:102
Header file for auxiliary alias declarations.
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1238
#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:352
Header file for basic type definitions.
Header file for the implementation of the base template of the StrictlyLowerMatrix.
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:1339
Constraint on the data type.
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:194
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
const DenseIterator< Type, AF > operator+(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:699
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2935
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:5556
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2928
#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:390
#define BLAZE_CONSTRAINT_MUST_BE_SQUARE(T)
Constraint on the data type.In case the given data type T is not a square matrix type, a compilation error is created.
Definition: Square.h:60
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:731
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
BLAZE_ALWAYS_INLINE T1 & operator*=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Multiplication assignment operator for the multiplication of two SIMD packs.
Definition: BasicTypes.h:1321
Constraint on the data type.
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:77
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2931
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:304
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:238
Constraint on the data type.
Constraint on the data type.
Header file for the std::initializer_list aliases.
Header file for the IsSquare type trait.
Constraint on the data type.
Constraint on the data type.
Header file for the DisableIf class template.
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5635
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5618
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:79
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the DenseMatrix base class.
Header file for the Columns type trait.
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
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:336
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
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:128
Header file for the IsUniTriangular type trait.
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2932
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:544
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:260
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:2933
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
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2937
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:128
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:553
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
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2934
BLAZE_ALWAYS_INLINE T1 & operator+=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Addition assignment operator for the addition of two SIMD packs.
Definition: BasicTypes.h:1285
Header file for run time assertion macros.
Constraint on the data type.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower triangular matrix type...
Definition: Lower.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:79
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2938
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:267
Constraint on the data type.
Constraint on the data type.
Header file for the StrictlyLowerProxy class.
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
#define BLAZE_CONSTRAINT_MUST_NOT_BE_RESIZABLE(T)
Constraint on the data type.In case the given data type T is resizable, i.e. has a 'resize' member fu...
Definition: Resizable.h:81
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:320
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2929
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE(T)
Constraint on the data type.In case the given data type T is not resizable, i.e. does not have a 'res...
Definition: Resizable.h:61
Header file for the IsComputation type trait class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_EXPRESSION_TYPE(T)
Constraint on the data type.In case the given data type T is an expression (i.e. a type derived from ...
Definition: Expression.h:81
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2930
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:249
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2936
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is an Hermitian matrix type, a compilation error is created.
Definition: Hermitian.h:79
BLAZE_ALWAYS_INLINE T1 & operator-=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Subtraction assignment operator for the subtraction of two SIMD packs.
Definition: BasicTypes.h:1303
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112
SubmatrixExprTrait_< MT, unaligned > submatrix(Matrix< MT, SO > &matrix, size_t row, size_t column, size_t m, size_t n)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:168
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:677
Header file for the IsResizable type trait.
const DMatDMatMultExpr< T1, T2, false, false, false, false > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:7505
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.