35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_DENSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_DENSE_H_ 106 template<
typename MT
108 class StrictlyLowerMatrix<MT,SO,true>
109 :
public DenseMatrix< StrictlyLowerMatrix<MT,SO,true>, SO >
113 using OT = OppositeType_<MT>;
114 using TT = TransposeType_<MT>;
115 using ET = ElementType_<MT>;
120 using This = StrictlyLowerMatrix<MT,SO,true>;
121 using BaseType = DenseMatrix<This,SO>;
126 using SIMDType = SIMDType_<MT>;
129 using Reference = StrictlyLowerProxy<MT>;
131 using Pointer = Pointer_<MT>;
132 using ConstPointer = ConstPointer_<MT>;
139 template<
typename NewType >
142 using Other = StrictlyLowerMatrix< typename MT::template Rebind<NewType>::Other >;
149 template<
size_t NewM
153 using Other = StrictlyLowerMatrix< typename MT::template Resize<NewM,NewN>::Other >;
164 using IteratorCategory = std::random_access_iterator_tag;
165 using ValueType = ElementType_<MT>;
166 using PointerType = StrictlyLowerProxy<MT>;
167 using ReferenceType = StrictlyLowerProxy<MT>;
168 using DifferenceType = ptrdiff_t;
171 using iterator_category = IteratorCategory;
172 using value_type = ValueType;
173 using pointer = PointerType;
174 using reference = ReferenceType;
175 using difference_type = DifferenceType;
209 ( SO )?( row_ += inc ):( column_ += inc );
221 ( SO )?( row_ -= dec ):( column_ -= dec );
231 inline Iterator& operator++() noexcept {
232 ( SO )?( ++row_ ):( ++column_ );
242 inline const Iterator operator++(
int ) noexcept {
254 inline Iterator& operator--() noexcept {
255 ( SO )?( --row_ ):( --column_ );
265 inline const Iterator operator--(
int ) noexcept {
278 return ReferenceType( *matrix_, row_, column_ );
287 inline PointerType operator->()
const {
288 return PointerType( *matrix_, row_, column_ );
302 inline SIMDType load()
const {
303 return (*matrix_).load(row_,column_);
317 inline SIMDType
loada()
const {
318 return (*matrix_).loada(row_,column_);
332 inline SIMDType
loadu()
const {
333 return (*matrix_).loadu(row_,column_);
344 return matrix_->begin( column_ ) + row_;
346 return matrix_->begin( row_ ) + column_;
358 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
394 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
430 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
466 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
502 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
538 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
573 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
586 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
588 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
601 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
603 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
616 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
618 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
633 enum :
bool { simdEnabled = MT::simdEnabled };
636 enum :
bool { smpAssignable = MT::smpAssignable };
642 explicit inline StrictlyLowerMatrix();
643 template<
typename A1 >
explicit inline StrictlyLowerMatrix(
const A1& a1 );
644 explicit inline StrictlyLowerMatrix(
size_t n,
const ElementType& init );
646 explicit inline StrictlyLowerMatrix( initializer_list< initializer_list<ElementType> > list );
648 template<
typename Other >
649 explicit inline StrictlyLowerMatrix(
size_t n,
const Other* array );
651 template<
typename Other,
size_t N >
652 explicit inline StrictlyLowerMatrix(
const Other (&array)[N][N] );
654 explicit inline StrictlyLowerMatrix(
ElementType* ptr,
size_t n );
655 explicit inline StrictlyLowerMatrix(
ElementType* ptr,
size_t n,
size_t nn );
657 inline StrictlyLowerMatrix(
const StrictlyLowerMatrix& m );
658 inline StrictlyLowerMatrix( StrictlyLowerMatrix&& m ) noexcept;
669 inline Reference operator()(
size_t i,
size_t j );
671 inline Reference at(
size_t i,
size_t j );
673 inline ConstPointer
data () const noexcept;
674 inline ConstPointer
data (
size_t i ) const noexcept;
687 inline StrictlyLowerMatrix& operator=( const
ElementType& rhs );
688 inline StrictlyLowerMatrix& operator=( initializer_list< initializer_list<
ElementType> > list );
690 template< typename Other,
size_t N >
691 inline StrictlyLowerMatrix& operator=( const Other (&array)[N][N] );
693 inline StrictlyLowerMatrix& operator=( const StrictlyLowerMatrix& rhs );
694 inline StrictlyLowerMatrix& operator=( StrictlyLowerMatrix&& rhs ) noexcept;
696 template< typename MT2,
bool SO2 >
697 inline
DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
698 operator=( const Matrix<MT2,SO2>& rhs );
700 template< typename MT2,
bool SO2 >
701 inline
EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
702 operator=( const Matrix<MT2,SO2>& rhs );
704 template< typename MT2,
bool SO2 >
705 inline
DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
706 operator+=( const Matrix<MT2,SO2>& rhs );
708 template< typename MT2,
bool SO2 >
709 inline
EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
710 operator+=( const Matrix<MT2,SO2>& rhs );
712 template< typename MT2,
bool SO2 >
713 inline
DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
714 operator-=( const Matrix<MT2,SO2>& rhs );
716 template< typename MT2,
bool SO2 >
717 inline
EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
718 operator-=( const Matrix<MT2,SO2>& rhs );
720 template< typename MT2,
bool SO2 >
721 inline StrictlyLowerMatrix& operator%=( const Matrix<MT2,SO2>& rhs );
723 template< typename ST >
724 inline
EnableIf_< IsNumeric<ST>, StrictlyLowerMatrix >& operator*=( ST rhs );
726 template< typename ST >
727 inline
EnableIf_< IsNumeric<ST>, StrictlyLowerMatrix >& operator/=( ST rhs );
734 inline
size_t rows() const noexcept;
735 inline
size_t columns() const noexcept;
736 inline
size_t spacing() const noexcept;
737 inline
size_t capacity() const noexcept;
738 inline
size_t capacity(
size_t i ) const noexcept;
740 inline
size_t nonZeros(
size_t i ) const;
742 inline
void reset(
size_t i );
744 void resize (
size_t n,
bool preserve=true );
745 inline
void extend (
size_t n,
bool preserve=true );
746 inline
void reserve(
size_t elements );
748 inline
void swap( StrictlyLowerMatrix& m ) noexcept;
750 static inline constexpr
size_t maxNonZeros() noexcept;
751 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
758 template< typename Other > inline StrictlyLowerMatrix& scale( const Other& scalar );
765 inline
bool isIntact() const noexcept;
772 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
773 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
775 inline
bool isAligned () const noexcept;
776 inline
bool canSMPAssign() const noexcept;
788 inline const MT construct(
size_t n ,
TrueType );
791 template< typename MT2,
bool SO2, typename T >
792 inline const MT construct( const Matrix<MT2,SO2>& m, T );
804 template< typename MT2,
bool SO2,
bool DF2 >
805 friend MT2& derestrict( StrictlyLowerMatrix<MT2,SO2,DF2>& m );
840 template< typename MT
842 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix()
870 template<
typename MT
872 template<
typename A1 >
873 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
const A1& a1 )
874 : matrix_( construct( a1, typename IsResizable<MT>::Type() ) )
890 template<
typename MT
892 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
size_t n,
const ElementType& init )
898 for(
size_t j=0UL; j<
columns(); ++j ) {
899 for(
size_t i=j+1UL; i<
rows(); ++i )
904 for(
size_t i=0UL; i<
rows(); ++i ) {
905 for(
size_t j=0UL; j<i; ++j )
941 template<
typename MT
943 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( initializer_list< initializer_list<ElementType> > list )
982 template<
typename MT
984 template<
typename Other >
985 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
size_t n,
const Other* array )
986 : matrix_( n, n, array )
1021 template<
typename MT
1023 template<
typename Other
1025 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
const Other (&array)[N][N] )
1071 template<
typename MT
1073 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
ElementType* ptr,
size_t n )
1074 : matrix_( ptr, n, n )
1120 template<
typename MT
1122 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
ElementType* ptr,
size_t n,
size_t nn )
1123 : matrix_( ptr, n, n, nn )
1141 template<
typename MT
1143 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
const StrictlyLowerMatrix& m )
1144 : matrix_( m.matrix_ )
1159 template<
typename MT
1161 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( StrictlyLowerMatrix&& m ) noexcept
1162 : matrix_( std::move( m.matrix_ ) )
1195 template<
typename MT
1198 StrictlyLowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1225 template<
typename MT
1228 StrictlyLowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const 1233 return matrix_(i,j);
1256 template<
typename MT
1259 StrictlyLowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1267 return (*
this)(i,j);
1290 template<
typename MT
1293 StrictlyLowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const 1301 return (*
this)(i,j);
1320 template<
typename MT
1322 inline typename StrictlyLowerMatrix<MT,SO,true>::ConstPointer
1325 return matrix_.data();
1340 template<
typename MT
1342 inline typename StrictlyLowerMatrix<MT,SO,true>::ConstPointer
1345 return matrix_.data(i);
1363 template<
typename MT
1369 return Iterator( matrix_, 0UL, i );
1371 return Iterator( matrix_, i, 0UL );
1389 template<
typename MT
1394 return matrix_.begin(i);
1412 template<
typename MT
1417 return matrix_.cbegin(i);
1435 template<
typename MT
1461 template<
typename MT
1466 return matrix_.end(i);
1484 template<
typename MT
1489 return matrix_.cend(i);
1510 template<
typename MT
1512 inline StrictlyLowerMatrix<MT,SO,true>&
1513 StrictlyLowerMatrix<MT,SO,true>::operator=(
const ElementType& rhs )
1516 for(
size_t j=0UL; j<
columns(); ++j )
1517 for(
size_t i=j+1UL; i<
rows(); ++i )
1521 for(
size_t i=1UL; i<
rows(); ++i )
1522 for(
size_t j=0UL; j<i; ++j )
1557 template<
typename MT
1559 inline StrictlyLowerMatrix<MT,SO,true>&
1560 StrictlyLowerMatrix<MT,SO,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1562 const InitializerMatrix<ElementType> tmp( list, list.size() );
1604 template<
typename MT
1606 template<
typename Other
1608 inline StrictlyLowerMatrix<MT,SO,true>&
1609 StrictlyLowerMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1617 matrix_ = std::move( tmp );
1638 template<
typename MT
1640 inline StrictlyLowerMatrix<MT,SO,true>&
1641 StrictlyLowerMatrix<MT,SO,true>::operator=(
const StrictlyLowerMatrix& rhs )
1643 matrix_ = rhs.matrix_;
1661 template<
typename MT
1663 inline StrictlyLowerMatrix<MT,SO,true>&
1664 StrictlyLowerMatrix<MT,SO,true>::operator=( StrictlyLowerMatrix&& rhs ) noexcept
1666 matrix_ = std::move( rhs.matrix_ );
1690 template<
typename MT
1692 template<
typename MT2
1694 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1695 StrictlyLowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1697 if( IsUniTriangular<MT2>::value ||
1726 template<
typename MT
1728 template<
typename MT2
1730 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1731 StrictlyLowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1733 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1737 if( IsStrictlyLower<MT2>::value ) {
1747 matrix_ = std::move( tmp );
1772 template<
typename MT
1774 template<
typename MT2
1776 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1779 if( IsUniTriangular<MT2>::value ||
1808 template<
typename MT
1810 template<
typename MT2
1812 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1815 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1819 if( IsStrictlyLower<MT2>::value ) {
1823 const ResultType_<MT2> tmp( ~rhs );
1854 template<
typename MT
1856 template<
typename MT2
1858 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1861 if( IsUniTriangular<MT2>::value ||
1890 template<
typename MT
1892 template<
typename MT2
1894 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1897 if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1901 if( IsStrictlyLower<MT2>::value ) {
1905 const ResultType_<MT2> tmp( ~rhs );
1934 template<
typename MT
1936 template<
typename MT2
1938 inline StrictlyLowerMatrix<MT,SO,true>&
1939 StrictlyLowerMatrix<MT,SO,true>::operator%=(
const Matrix<MT2,SO2>& rhs )
1941 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1964 template<
typename MT
1966 template<
typename ST >
1967 inline EnableIf_< IsNumeric<ST>, StrictlyLowerMatrix<MT,SO,true> >&
1984 template<
typename MT
1986 template<
typename ST >
1987 inline EnableIf_< IsNumeric<ST>, StrictlyLowerMatrix<MT,SO,true> >&
2013 template<
typename MT
2017 return matrix_.rows();
2029 template<
typename MT
2033 return matrix_.columns();
2050 template<
typename MT
2054 return matrix_.spacing();
2066 template<
typename MT
2070 return matrix_.capacity();
2088 template<
typename MT
2092 return matrix_.capacity(i);
2104 template<
typename MT
2108 return matrix_.nonZeros();
2126 template<
typename MT
2130 return matrix_.nonZeros(i);
2142 template<
typename MT
2149 for(
size_t j=0UL; j<
columns(); ++j )
2150 for(
size_t i=j+1UL; i<
rows(); ++i )
2151 clear( matrix_(i,j) );
2154 for(
size_t i=1UL; i<
rows(); ++i )
2155 for(
size_t j=0UL; j<i; ++j )
2156 clear( matrix_(i,j) );
2176 template<
typename MT
2183 for(
size_t j=i+1UL; j<
rows(); ++j )
2184 clear( matrix_(j,i) );
2187 for(
size_t j=0UL; j<i; ++j )
2188 clear( matrix_(i,j) );
2207 template<
typename MT
2213 if( IsResizable<MT>::value ) {
2260 template<
typename MT
2270 const size_t oldsize( matrix_.rows() );
2272 matrix_.resize( n, n,
true );
2276 const size_t increment( n - oldsize );
2277 submatrix( matrix_, 0UL, oldsize, n, increment ).reset();
2297 template<
typename MT
2299 inline void StrictlyLowerMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2320 template<
typename MT
2322 inline void StrictlyLowerMatrix<MT,SO,true>::reserve(
size_t elements )
2324 matrix_.reserve( elements );
2340 template<
typename MT
2344 matrix_.shrinkToFit();
2357 template<
typename MT
2363 swap( matrix_, m.matrix_ );
2381 template<
typename MT
2383 inline constexpr
size_t StrictlyLowerMatrix<MT,SO,true>::maxNonZeros() noexcept
2387 return maxNonZeros( Size<MT,0UL>::value );
2403 template<
typename MT
2405 inline constexpr
size_t StrictlyLowerMatrix<MT,SO,true>::maxNonZeros(
size_t n ) noexcept
2407 return ( ( n - 1UL ) * n ) / 2UL;
2439 template<
typename MT
2441 template<
typename Other >
2442 inline StrictlyLowerMatrix<MT,SO,true>&
2443 StrictlyLowerMatrix<MT,SO,true>::scale(
const Other& scalar )
2445 matrix_.scale( scalar );
2470 template<
typename MT
2501 template<
typename MT
2503 template<
typename Other >
2504 inline bool StrictlyLowerMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2506 return matrix_.canAlias( alias );
2523 template<
typename MT
2525 template<
typename Other >
2526 inline bool StrictlyLowerMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2528 return matrix_.isAliased( alias );
2544 template<
typename MT
2546 inline bool StrictlyLowerMatrix<MT,SO,true>::isAligned() const noexcept
2548 return matrix_.isAligned();
2565 template<
typename MT
2567 inline bool StrictlyLowerMatrix<MT,SO,true>::canSMPAssign() const noexcept
2569 return matrix_.canSMPAssign();
2591 template<
typename MT
2594 StrictlyLowerMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2596 return matrix_.load( i, j );
2618 template<
typename MT
2623 return matrix_.loada( i, j );
2645 template<
typename MT
2650 return matrix_.loadu( i, j );
2671 template<
typename MT
2673 inline const MT StrictlyLowerMatrix<MT,SO,true>::construct(
size_t n, TrueType )
2690 template<
typename MT
2692 inline const MT StrictlyLowerMatrix<MT,SO,true>::construct(
const ElementType& init, FalseType )
2700 for(
size_t j=0UL; j<tmp.columns(); ++j ) {
2701 for(
size_t i=j+1UL; i<tmp.rows(); ++i )
2706 for(
size_t i=0UL; i<tmp.rows(); ++i ) {
2707 for(
size_t j=0UL; j<i; ++j )
2729 template<
typename MT
2731 template<
typename MT2
2734 inline const MT StrictlyLowerMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2738 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
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
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 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
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
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
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.
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:670
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
Header file for the isZero shim.
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.
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 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_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower triangular matrix type...
Definition: Lower.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_RESIZABLE_TYPE(T)
Constraint on the data type.In case the given data type T is resizable, i.e. has a 'resize' member fu...
Definition: Resizable.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:79
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:272
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
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
EnableIf_< IsNumeric< ST >, MT &> operator/=(DenseMatrix< MT, SO > &mat, ST scalar)
Division assignment operator for the division of a dense matrix by a scalar value ( )...
Definition: DenseMatrix.h:655
#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
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
EnableIf_< IsNumeric< ST >, MT &> operator*=(DenseMatrix< MT, SO > &mat, ST scalar)
Multiplication assignment operator for the multiplication of a dense matrix and a scalar value ( )...
Definition: DenseMatrix.h:593
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.