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_t<MT>;
114 using TT = TransposeType_t<MT>;
115 using ET = ElementType_t<MT>;
120 using This = StrictlyLowerMatrix<MT,SO,true>;
121 using BaseType = DenseMatrix<This,SO>;
126 using SIMDType = SIMDType_t<MT>;
129 using Reference = StrictlyLowerProxy<MT>;
131 using Pointer = Pointer_t<MT>;
132 using ConstPointer = ConstPointer_t<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_t<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 static constexpr
bool simdEnabled = MT::simdEnabled;
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;
665 ~StrictlyLowerMatrix() =
default;
672 inline Reference operator()(
size_t i,
size_t j );
674 inline Reference at(
size_t i,
size_t j );
676 inline ConstPointer
data () const noexcept;
677 inline ConstPointer
data (
size_t i ) const noexcept;
690 inline StrictlyLowerMatrix& operator=( const
ElementType& rhs );
691 inline StrictlyLowerMatrix& operator=( initializer_list< initializer_list<
ElementType> > list );
693 template< typename Other,
size_t N >
694 inline StrictlyLowerMatrix& operator=( const Other (&array)[N][N] );
696 inline StrictlyLowerMatrix& operator=( const StrictlyLowerMatrix& rhs );
697 inline StrictlyLowerMatrix& operator=( StrictlyLowerMatrix&& rhs ) noexcept;
699 template< typename MT2,
bool SO2 >
700 inline auto operator=( const Matrix<MT2,SO2>& rhs )
703 template< typename MT2,
bool SO2 >
704 inline auto operator=( const Matrix<MT2,SO2>& rhs )
707 template< typename MT2,
bool SO2 >
708 inline auto operator+=( const Matrix<MT2,SO2>& rhs )
711 template< typename MT2,
bool SO2 >
712 inline auto operator+=( const Matrix<MT2,SO2>& rhs )
715 template< typename MT2,
bool SO2 >
716 inline auto operator-=( const Matrix<MT2,SO2>& rhs )
719 template< typename MT2,
bool SO2 >
720 inline auto operator-=( const Matrix<MT2,SO2>& rhs )
723 template< typename MT2,
bool SO2 >
724 inline auto operator%=( const Matrix<MT2,SO2>& rhs ) -> StrictlyLowerMatrix&;
726 template< typename ST >
729 template< typename ST >
737 inline
size_t rows() const noexcept;
738 inline
size_t columns() const noexcept;
739 inline
size_t spacing() const noexcept;
740 inline
size_t capacity() const noexcept;
741 inline
size_t capacity(
size_t i ) const noexcept;
743 inline
size_t nonZeros(
size_t i ) const;
745 inline
void reset(
size_t i );
747 void resize (
size_t n,
bool preserve=true );
748 inline
void extend (
size_t n,
bool preserve=true );
749 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 );
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 )
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 )
944 template<
typename MT
946 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( initializer_list< initializer_list<ElementType> > list )
985 template<
typename MT
987 template<
typename Other >
988 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
size_t n,
const Other* array )
989 : matrix_( n, n, array )
1024 template<
typename MT
1026 template<
typename Other
1028 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
const Other (&array)[N][N] )
1074 template<
typename MT
1076 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
ElementType* ptr,
size_t n )
1077 : matrix_( ptr, n, n )
1123 template<
typename MT
1125 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
ElementType* ptr,
size_t n,
size_t nn )
1126 : matrix_( ptr, n, n, nn )
1144 template<
typename MT
1146 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix(
const StrictlyLowerMatrix& m )
1147 : matrix_( m.matrix_ )
1162 template<
typename MT
1164 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( StrictlyLowerMatrix&& m ) noexcept
1165 : matrix_( std::move( m.matrix_ ) )
1198 template<
typename MT
1201 StrictlyLowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1228 template<
typename MT
1231 StrictlyLowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const 1236 return matrix_(i,j);
1259 template<
typename MT
1262 StrictlyLowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1270 return (*
this)(i,j);
1293 template<
typename MT
1296 StrictlyLowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const 1304 return (*
this)(i,j);
1323 template<
typename MT
1325 inline typename StrictlyLowerMatrix<MT,SO,true>::ConstPointer
1328 return matrix_.data();
1343 template<
typename MT
1345 inline typename StrictlyLowerMatrix<MT,SO,true>::ConstPointer
1348 return matrix_.data(i);
1366 template<
typename MT
1372 return Iterator( matrix_, 0UL, i );
1374 return Iterator( matrix_, i, 0UL );
1392 template<
typename MT
1397 return matrix_.begin(i);
1415 template<
typename MT
1420 return matrix_.cbegin(i);
1438 template<
typename MT
1464 template<
typename MT
1469 return matrix_.end(i);
1487 template<
typename MT
1492 return matrix_.cend(i);
1513 template<
typename MT
1515 inline StrictlyLowerMatrix<MT,SO,true>&
1516 StrictlyLowerMatrix<MT,SO,true>::operator=(
const ElementType& rhs )
1519 for(
size_t j=0UL; j<
columns(); ++j )
1520 for(
size_t i=j+1UL; i<
rows(); ++i )
1524 for(
size_t i=1UL; i<
rows(); ++i )
1525 for(
size_t j=0UL; j<i; ++j )
1560 template<
typename MT
1562 inline StrictlyLowerMatrix<MT,SO,true>&
1563 StrictlyLowerMatrix<MT,SO,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1565 const InitializerMatrix<ElementType> tmp( list, list.size() );
1607 template<
typename MT
1609 template<
typename Other
1611 inline StrictlyLowerMatrix<MT,SO,true>&
1612 StrictlyLowerMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1620 matrix_ = std::move( tmp );
1641 template<
typename MT
1643 inline StrictlyLowerMatrix<MT,SO,true>&
1644 StrictlyLowerMatrix<MT,SO,true>::operator=(
const StrictlyLowerMatrix& rhs )
1646 matrix_ = rhs.matrix_;
1664 template<
typename MT
1666 inline StrictlyLowerMatrix<MT,SO,true>&
1667 StrictlyLowerMatrix<MT,SO,true>::operator=( StrictlyLowerMatrix&& rhs ) noexcept
1669 matrix_ = std::move( rhs.matrix_ );
1693 template<
typename MT
1695 template<
typename MT2
1697 inline auto StrictlyLowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1698 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1700 if( IsUniTriangular_v<MT2> ||
1729 template<
typename MT
1731 template<
typename MT2
1733 inline auto StrictlyLowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1734 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1736 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1740 if( IsStrictlyLower_v<MT2> ) {
1750 matrix_ = std::move( tmp );
1775 template<
typename MT
1777 template<
typename MT2
1780 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1782 if( IsUniTriangular_v<MT2> ||
1811 template<
typename MT
1813 template<
typename MT2
1816 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1818 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1822 if( IsStrictlyLower_v<MT2> ) {
1826 const ResultType_t<MT2> tmp( ~rhs );
1857 template<
typename MT
1859 template<
typename MT2
1862 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1864 if( IsUniTriangular_v<MT2> ||
1893 template<
typename MT
1895 template<
typename MT2
1898 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1900 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1904 if( IsStrictlyLower_v<MT2> ) {
1908 const ResultType_t<MT2> tmp( ~rhs );
1937 template<
typename MT
1939 template<
typename MT2
1941 inline auto StrictlyLowerMatrix<MT,SO,true>::operator%=(
const Matrix<MT2,SO2>& rhs )
1942 -> StrictlyLowerMatrix&
1944 if( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) {
1967 template<
typename MT
1969 template<
typename ST >
1971 -> EnableIf_t< IsNumeric_v<ST>, StrictlyLowerMatrix& >
1987 template<
typename MT
1989 template<
typename ST >
1991 -> EnableIf_t< IsNumeric_v<ST>, StrictlyLowerMatrix& >
2016 template<
typename MT
2020 return matrix_.rows();
2032 template<
typename MT
2036 return matrix_.columns();
2053 template<
typename MT
2057 return matrix_.spacing();
2069 template<
typename MT
2073 return matrix_.capacity();
2091 template<
typename MT
2095 return matrix_.capacity(i);
2107 template<
typename MT
2111 return matrix_.nonZeros();
2129 template<
typename MT
2133 return matrix_.nonZeros(i);
2145 template<
typename MT
2152 for(
size_t j=0UL; j<
columns(); ++j )
2153 for(
size_t i=j+1UL; i<
rows(); ++i )
2154 clear( matrix_(i,j) );
2157 for(
size_t i=1UL; i<
rows(); ++i )
2158 for(
size_t j=0UL; j<i; ++j )
2159 clear( matrix_(i,j) );
2179 template<
typename MT
2186 for(
size_t j=i+1UL; j<
rows(); ++j )
2187 clear( matrix_(j,i) );
2190 for(
size_t j=0UL; j<i; ++j )
2191 clear( matrix_(i,j) );
2210 template<
typename MT
2216 if( IsResizable_v<MT> ) {
2263 template<
typename MT
2273 const size_t oldsize( matrix_.rows() );
2275 matrix_.resize( n, n,
true );
2279 const size_t increment( n - oldsize );
2280 submatrix( matrix_, 0UL, oldsize, n, increment ).reset();
2300 template<
typename MT
2302 inline void StrictlyLowerMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2323 template<
typename MT
2325 inline void StrictlyLowerMatrix<MT,SO,true>::reserve(
size_t elements )
2343 template<
typename MT
2347 matrix_.shrinkToFit();
2360 template<
typename MT
2366 swap( matrix_, m.matrix_ );
2384 template<
typename MT
2386 inline constexpr
size_t StrictlyLowerMatrix<MT,SO,true>::maxNonZeros() noexcept
2390 return maxNonZeros( Size_v<MT,0UL> );
2406 template<
typename MT
2408 inline constexpr
size_t StrictlyLowerMatrix<MT,SO,true>::maxNonZeros(
size_t n ) noexcept
2410 return ( ( n - 1UL ) * n ) / 2UL;
2442 template<
typename MT
2444 template<
typename Other >
2445 inline StrictlyLowerMatrix<MT,SO,true>&
2446 StrictlyLowerMatrix<MT,SO,true>::scale(
const Other& scalar )
2448 matrix_.scale( scalar );
2473 template<
typename MT
2504 template<
typename MT
2506 template<
typename Other >
2507 inline bool StrictlyLowerMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2509 return matrix_.canAlias( alias );
2526 template<
typename MT
2528 template<
typename Other >
2529 inline bool StrictlyLowerMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2531 return matrix_.isAliased( alias );
2547 template<
typename MT
2549 inline bool StrictlyLowerMatrix<MT,SO,true>::isAligned() const noexcept
2551 return matrix_.isAligned();
2568 template<
typename MT
2570 inline bool StrictlyLowerMatrix<MT,SO,true>::canSMPAssign() const noexcept
2572 return matrix_.canSMPAssign();
2594 template<
typename MT
2597 StrictlyLowerMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2599 return matrix_.load( i, j );
2621 template<
typename MT
2626 return matrix_.loada( i, j );
2648 template<
typename MT
2653 return matrix_.loadu( i, j );
2674 template<
typename MT
2676 inline const MT StrictlyLowerMatrix<MT,SO,true>::construct(
size_t n,
TrueType )
2693 template<
typename MT
2695 inline const MT StrictlyLowerMatrix<MT,SO,true>::construct(
const ElementType& init,
FalseType )
2703 for(
size_t j=0UL; j<tmp.columns(); ++j ) {
2704 for(
size_t i=j+1UL; i<tmp.rows(); ++i )
2709 for(
size_t i=0UL; i<tmp.rows(); ++i ) {
2710 for(
size_t j=0UL; j<i; ++j )
2732 template<
typename MT
2734 template<
typename MT2
2737 inline const MT StrictlyLowerMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2741 if( IsUniTriangular_v<MT2> ||
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:133
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:3078
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1179
#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
auto operator/=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Division assignment operator for the division of a dense matrix by a scalar value ( )...
Definition: DenseMatrix.h:354
Header file for the UNUSED_PARAMETER function template.
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:546
Header file for basic type definitions.
constexpr 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:750
MT::ElementType * data(DenseMatrix< MT, SO > &dm) noexcept
Low-level data access to the dense matrix elements.
Definition: DenseMatrix.h:169
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
Header file for the isZero shim.
#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:332
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:76
Constraint on the data type.
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:3077
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3075
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:591
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: CompressedMatrix.h:3113
void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition: Matrix.h:799
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:5828
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:3079
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:3084
#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
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:584
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:3085
Header file for the extended initializer_list functionality.
constexpr void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Constraint on the data type.
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
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:482
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:416
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
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:673
Constraint on the data type.
Header file for the implementation of a matrix representation of an initializer list.
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
Header file for the DisableIf class template.
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:3083
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:5907
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5890
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3076
#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:3080
#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:370
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:446
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3086
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:253
constexpr bool IsNumeric_v
Auxiliary variable template for the IsNumeric type trait.The IsNumeric_v variable template provides a...
Definition: IsNumeric.h:143
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:1002
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:135
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
void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:738
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:438
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:8908
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:293
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:611
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:133
#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:281
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:408
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
constexpr 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:718
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > loada(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loada.h:79
constexpr bool IsComputation_v
Auxiliary variable template for the IsComputation type trait.The IsComputation_v variable template pr...
Definition: IsComputation.h:90
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3081
#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:3082
#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
auto operator*=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsNumeric_v< ST >, MT & >
Multiplication assignment operator for the multiplication of a dense matrix and a scalar value ( )...
Definition: DenseMatrix.h:290
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:263
#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
typename DisableIf< Condition, T >::Type DisableIf_t
Auxiliary type for the DisableIf class template.The DisableIf_t alias declaration provides a convenie...
Definition: DisableIf.h:138
#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
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:951
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
constexpr ptrdiff_t Size_v
Auxiliary variable template for the Size type trait.The Size_v variable template provides a convenien...
Definition: Size.h:176
Header file for the TrueType type/value trait base class.
Header file for the clear shim.