35 #ifndef _BLAZE_MATH_ADAPTORS_UNILOWERMATRIX_DENSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_UNILOWERMATRIX_DENSE_H_ 111 template<
typename MT
113 class UniLowerMatrix<MT,SO,true>
114 :
public DenseMatrix< UniLowerMatrix<MT,SO,true>, SO >
118 using OT = OppositeType_t<MT>;
119 using TT = TransposeType_t<MT>;
120 using ET = ElementType_t<MT>;
125 using This = UniLowerMatrix<MT,SO,true>;
126 using BaseType = DenseMatrix<This,SO>;
131 using SIMDType = SIMDType_t<MT>;
136 using Pointer = Pointer_t<MT>;
137 using ConstPointer = ConstPointer_t<MT>;
144 template<
typename NewType >
147 using Other = UniLowerMatrix< typename MT::template Rebind<NewType>::Other >;
154 template<
size_t NewM
158 using Other = UniLowerMatrix< typename MT::template Resize<NewM,NewN>::Other >;
169 using IteratorCategory = std::random_access_iterator_tag;
170 using ValueType = ElementType_t<MT>;
171 using PointerType = UniLowerProxy<MT>;
172 using ReferenceType = UniLowerProxy<MT>;
173 using DifferenceType = ptrdiff_t;
176 using iterator_category = IteratorCategory;
177 using value_type = ValueType;
178 using pointer = PointerType;
179 using reference = ReferenceType;
180 using difference_type = DifferenceType;
214 ( SO )?( row_ += inc ):( column_ += inc );
226 ( SO )?( row_ -= dec ):( column_ -= dec );
236 inline Iterator& operator++() noexcept {
237 ( SO )?( ++row_ ):( ++column_ );
247 inline const Iterator operator++(
int ) noexcept {
259 inline Iterator& operator--() noexcept {
260 ( SO )?( --row_ ):( --column_ );
270 inline const Iterator operator--(
int ) noexcept {
283 return ReferenceType( *matrix_, row_, column_ );
292 inline PointerType operator->()
const {
293 return PointerType( *matrix_, row_, column_ );
307 inline SIMDType load()
const {
308 return (*matrix_).load(row_,column_);
322 inline SIMDType
loada()
const {
323 return (*matrix_).loada(row_,column_);
337 inline SIMDType
loadu()
const {
338 return (*matrix_).loadu(row_,column_);
349 return matrix_->begin( column_ ) + row_;
351 return matrix_->begin( row_ ) + column_;
363 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
399 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
435 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
471 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
507 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
543 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
578 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
591 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
593 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
606 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
608 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
621 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
623 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
638 static constexpr
bool simdEnabled = MT::simdEnabled;
647 explicit inline UniLowerMatrix();
648 template<
typename A1 >
explicit inline UniLowerMatrix(
const A1& a1 );
649 explicit inline UniLowerMatrix(
size_t n,
const ElementType& init );
651 explicit inline UniLowerMatrix( initializer_list< initializer_list<ElementType> > list );
653 template<
typename Other >
654 explicit inline UniLowerMatrix(
size_t n,
const Other* array );
656 template<
typename Other,
size_t N >
657 explicit inline UniLowerMatrix(
const Other (&array)[N][N] );
659 explicit inline UniLowerMatrix(
ElementType* ptr,
size_t n );
660 explicit inline UniLowerMatrix(
ElementType* ptr,
size_t n,
size_t nn );
662 inline UniLowerMatrix(
const UniLowerMatrix& m );
663 inline UniLowerMatrix( UniLowerMatrix&& m ) noexcept;
670 ~UniLowerMatrix() =
default;
677 inline Reference operator()(
size_t i,
size_t j );
679 inline Reference at(
size_t i,
size_t j );
681 inline ConstPointer
data () const noexcept;
682 inline ConstPointer
data (
size_t i ) const noexcept;
695 inline UniLowerMatrix& operator=( const
ElementType& rhs );
696 inline UniLowerMatrix& operator=( initializer_list< initializer_list<
ElementType> > list );
698 template< typename Other,
size_t N >
699 inline UniLowerMatrix& operator=( const Other (&array)[N][N] );
701 inline UniLowerMatrix& operator=( const UniLowerMatrix& rhs );
702 inline UniLowerMatrix& operator=( UniLowerMatrix&& rhs ) noexcept;
704 template< typename MT2,
bool SO2 >
705 inline auto operator=( const Matrix<MT2,SO2>& rhs )
708 template< typename MT2,
bool SO2 >
709 inline auto operator=( const Matrix<MT2,SO2>& rhs )
712 template< typename MT2,
bool SO2 >
713 inline auto operator+=( const Matrix<MT2,SO2>& rhs )
716 template< typename MT2,
bool SO2 >
717 inline auto operator+=( const Matrix<MT2,SO2>& rhs )
720 template< typename MT2,
bool SO2 >
721 inline auto operator-=( const Matrix<MT2,SO2>& rhs )
724 template< typename MT2,
bool SO2 >
725 inline auto operator-=( const Matrix<MT2,SO2>& rhs )
728 template< typename MT2,
bool SO2 >
729 inline auto operator%=( const Matrix<MT2,SO2>& rhs ) -> UniLowerMatrix&;
736 inline
size_t rows() const noexcept;
737 inline
size_t columns() const noexcept;
738 inline
size_t spacing() const noexcept;
739 inline
size_t capacity() const noexcept;
740 inline
size_t capacity(
size_t i ) const noexcept;
742 inline
size_t nonZeros(
size_t i ) const;
744 inline
void reset(
size_t i );
746 void resize (
size_t n,
bool preserve=true );
747 inline
void extend (
size_t n,
bool preserve=true );
748 inline
void reserve(
size_t elements );
750 inline
void swap( UniLowerMatrix& m ) noexcept;
752 static inline constexpr
size_t maxNonZeros() noexcept;
753 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
760 inline
bool isIntact() const noexcept;
767 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
768 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
770 inline
bool isAligned () const noexcept;
771 inline
bool canSMPAssign() const noexcept;
783 inline const MT construct(
size_t n ,
TrueType );
786 template< typename MT2,
bool SO2, typename T >
787 inline const MT construct( const Matrix<MT2,SO2>& m, T );
799 template< typename MT2,
bool SO2,
bool DF2 >
800 friend MT2& derestrict( UniLowerMatrix<MT2,SO2,DF2>& m );
837 template< typename MT
839 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix()
842 for(
size_t i=0UL; i<
rows(); ++i )
870 template<
typename MT
872 template<
typename A1 >
873 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
const A1& a1 )
874 : matrix_( construct( a1, typename IsResizable<MT>::Type() ) )
890 template<
typename MT
892 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
size_t n,
const ElementType& init )
898 for(
size_t j=0UL; j<
columns(); ++j ) {
900 for(
size_t i=j+1UL; i<
rows(); ++i )
905 for(
size_t i=0UL; i<
rows(); ++i ) {
906 for(
size_t j=0UL; j<i; ++j )
943 template<
typename MT
945 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix( initializer_list< initializer_list<ElementType> > list )
984 template<
typename MT
986 template<
typename Other >
987 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
size_t n,
const Other* array )
988 : matrix_( n, n, array )
1023 template<
typename MT
1025 template<
typename Other
1027 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
const Other (&array)[N][N] )
1075 template<
typename MT
1077 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
ElementType* ptr,
size_t n )
1078 : matrix_( ptr, n, n )
1127 template<
typename MT
1129 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
ElementType* ptr,
size_t n,
size_t nn )
1130 : matrix_( ptr, n, n, nn )
1148 template<
typename MT
1150 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix(
const UniLowerMatrix& m )
1151 : matrix_( m.matrix_ )
1166 template<
typename MT
1168 inline UniLowerMatrix<MT,SO,true>::UniLowerMatrix( UniLowerMatrix&& m ) noexcept
1169 : matrix_( std::move( m.matrix_ ) )
1202 template<
typename MT
1205 UniLowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1232 template<
typename MT
1235 UniLowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const 1240 return matrix_(i,j);
1263 template<
typename MT
1266 UniLowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1274 return (*
this)(i,j);
1297 template<
typename MT
1300 UniLowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const 1308 return (*
this)(i,j);
1327 template<
typename MT
1329 inline typename UniLowerMatrix<MT,SO,true>::ConstPointer
1332 return matrix_.data();
1347 template<
typename MT
1349 inline typename UniLowerMatrix<MT,SO,true>::ConstPointer
1352 return matrix_.data(i);
1370 template<
typename MT
1376 return Iterator( matrix_, 0UL, i );
1378 return Iterator( matrix_, i, 0UL );
1396 template<
typename MT
1401 return matrix_.begin(i);
1419 template<
typename MT
1424 return matrix_.cbegin(i);
1442 template<
typename MT
1468 template<
typename MT
1473 return matrix_.end(i);
1491 template<
typename MT
1496 return matrix_.cend(i);
1517 template<
typename MT
1519 inline UniLowerMatrix<MT,SO,true>&
1520 UniLowerMatrix<MT,SO,true>::operator=(
const ElementType& rhs )
1523 for(
size_t j=0UL; j<
columns(); ++j )
1524 for(
size_t i=j+1UL; i<
rows(); ++i )
1528 for(
size_t i=1UL; i<
rows(); ++i )
1529 for(
size_t j=0UL; j<i; ++j )
1564 template<
typename MT
1566 inline UniLowerMatrix<MT,SO,true>&
1567 UniLowerMatrix<MT,SO,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1569 const InitializerMatrix<ElementType> tmp( list, list.size() );
1610 template<
typename MT
1612 template<
typename Other
1614 inline UniLowerMatrix<MT,SO,true>&
1615 UniLowerMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1623 matrix_ = std::move( tmp );
1644 template<
typename MT
1646 inline UniLowerMatrix<MT,SO,true>&
1647 UniLowerMatrix<MT,SO,true>::operator=(
const UniLowerMatrix& rhs )
1649 matrix_ = rhs.matrix_;
1667 template<
typename MT
1669 inline UniLowerMatrix<MT,SO,true>&
1670 UniLowerMatrix<MT,SO,true>::operator=( UniLowerMatrix&& rhs ) noexcept
1672 matrix_ = std::move( rhs.matrix_ );
1696 template<
typename MT
1698 template<
typename MT2
1700 inline auto UniLowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1701 -> DisableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >
1703 if( IsStrictlyTriangular_v<MT2> || ( !IsUniLower_v<MT2> && !
isUniLower( ~rhs ) ) ) {
1731 template<
typename MT
1733 template<
typename MT2
1735 inline auto UniLowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1736 -> EnableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >
1738 if( IsStrictlyTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1742 if( IsUniLower_v<MT2> ) {
1752 matrix_ = std::move( tmp );
1777 template<
typename MT
1779 template<
typename MT2
1782 -> DisableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >
1784 if( IsUpper_v<MT2> || IsUniTriangular_v<MT2> ||
1813 template<
typename MT
1815 template<
typename MT2
1818 -> EnableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >
1820 if( IsUpper_v<MT2> || IsUniTriangular_v<MT2> ||
1821 ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1825 if( IsStrictlyLower_v<MT2> ) {
1829 const ResultType_t<MT2> tmp( ~rhs );
1860 template<
typename MT
1862 template<
typename MT2
1865 -> DisableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >
1867 if( IsUpper_v<MT2> || IsUniTriangular_v<MT2> ||
1896 template<
typename MT
1898 template<
typename MT2
1901 -> EnableIf_t< IsComputation_v<MT2>, UniLowerMatrix& >
1903 if( IsUpper_v<MT2> || IsUniTriangular_v<MT2> ||
1904 ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1908 if( IsStrictlyLower_v<MT2> ) {
1912 const ResultType_t<MT2> tmp( ~rhs );
1943 template<
typename MT
1945 template<
typename MT2
1947 inline auto UniLowerMatrix<MT,SO,true>::operator%=(
const Matrix<MT2,SO2>& rhs )
1950 if( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) {
1954 If_t< IsComputation_v<MT2>, ResultType_t<MT2>,
const MT2& > tmp( ~rhs );
1956 for(
size_t i=0UL; i<(~rhs).
rows(); ++i ) {
1957 if( !
isOne( tmp(i,i) ) ) {
1987 template<
typename MT
1991 return matrix_.rows();
2003 template<
typename MT
2007 return matrix_.columns();
2024 template<
typename MT
2028 return matrix_.spacing();
2040 template<
typename MT
2044 return matrix_.capacity();
2062 template<
typename MT
2066 return matrix_.capacity(i);
2078 template<
typename MT
2082 return matrix_.nonZeros();
2100 template<
typename MT
2104 return matrix_.nonZeros(i);
2116 template<
typename MT
2123 for(
size_t j=0UL; j<
columns(); ++j )
2124 for(
size_t i=j+1UL; i<
rows(); ++i )
2125 clear( matrix_(i,j) );
2128 for(
size_t i=1UL; i<
rows(); ++i )
2129 for(
size_t j=0UL; j<i; ++j )
2130 clear( matrix_(i,j) );
2150 template<
typename MT
2157 for(
size_t j=i+1UL; j<
rows(); ++j )
2158 clear( matrix_(j,i) );
2161 for(
size_t j=0UL; j<i; ++j )
2162 clear( matrix_(i,j) );
2181 template<
typename MT
2187 if( IsResizable_v<MT> ) {
2234 template<
typename MT
2244 const size_t oldsize( matrix_.rows() );
2246 matrix_.resize( n, n,
true );
2250 const size_t increment( n - oldsize );
2251 submatrix( matrix_, 0UL, oldsize, n-1UL, increment ).reset();
2253 for(
size_t i=oldsize; i<n; ++i )
2274 template<
typename MT
2276 inline void UniLowerMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2297 template<
typename MT
2299 inline void UniLowerMatrix<MT,SO,true>::reserve(
size_t elements )
2317 template<
typename MT
2321 matrix_.shrinkToFit();
2334 template<
typename MT
2340 swap( matrix_, m.matrix_ );
2358 template<
typename MT
2360 inline constexpr
size_t UniLowerMatrix<MT,SO,true>::maxNonZeros() noexcept
2364 return maxNonZeros( Size_v<MT,0UL> );
2380 template<
typename MT
2382 inline constexpr
size_t UniLowerMatrix<MT,SO,true>::maxNonZeros(
size_t n ) noexcept
2384 return ( ( n + 1UL ) * n ) / 2UL;
2408 template<
typename MT
2439 template<
typename MT
2441 template<
typename Other >
2442 inline bool UniLowerMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2444 return matrix_.canAlias( alias );
2461 template<
typename MT
2463 template<
typename Other >
2464 inline bool UniLowerMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2466 return matrix_.isAliased( alias );
2482 template<
typename MT
2484 inline bool UniLowerMatrix<MT,SO,true>::isAligned() const noexcept
2486 return matrix_.isAligned();
2503 template<
typename MT
2505 inline bool UniLowerMatrix<MT,SO,true>::canSMPAssign() const noexcept
2507 return matrix_.canSMPAssign();
2529 template<
typename MT
2532 UniLowerMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2534 return matrix_.load( i, j );
2556 template<
typename MT
2561 return matrix_.loada( i, j );
2583 template<
typename MT
2588 return matrix_.loadu( i, j );
2609 template<
typename MT
2611 inline const MT UniLowerMatrix<MT,SO,true>::construct(
size_t n,
TrueType )
2617 for(
size_t i=0UL; i<n; ++i )
2633 template<
typename MT
2643 for(
size_t j=0UL; j<tmp.columns(); ++j ) {
2645 for(
size_t i=j+1UL; i<tmp.rows(); ++i )
2650 for(
size_t i=0UL; i<tmp.rows(); ++i ) {
2651 for(
size_t j=0UL; j<i; ++j )
2674 template<
typename MT
2676 template<
typename MT2
2679 inline const MT UniLowerMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2683 if( IsStrictlyTriangular_v<MT2> || ( !IsUniLower_v<MT2> && !
isUniLower( tmp ) ) ) {
Constraint on the data type.
Header file for the implementation of the Submatrix view.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type, a compilation error is created.
Definition: Const.h:79
BoolConstant< false > FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: FalseType.h:61
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Header file for the implementation of the base template of the UniLowerMatrix.
Header file for auxiliary alias declarations.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:133
Constraint on the data type.
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
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 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: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
bool isUniLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower unitriangular matrix.
Definition: DenseMatrix.h:1092
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.
Header file for the IsUniLower type trait.
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.
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
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.
Header file for the IsStrictlyTriangular type trait.
Constraints on the storage order of matrix types.
decltype(auto) elements(Vector< VT, TF > &vector, REAs... args)
Creating a view on a selection of elements of the given vector.
Definition: Elements.h: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 the UniLowerProxy class.
Header file for the isOne shim.
Header file for all adaptor forward declarations.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:79
BLAZE_ALWAYS_INLINE T1 & operator+=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Addition assignment operator for the addition of two SIMD packs.
Definition: BasicTypes.h:1357
Header file for run time assertion macros.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNIFORM_TYPE(T)
Constraint on the data type.In case the given data type T is a uniform vector or matrix type...
Definition: Uniform.h:81
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_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower triangular matrix type...
Definition: Lower.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_RESIZABLE_TYPE(T)
Constraint on the data type.In case the given data type T is resizable, i.e. has a 'resize' member fu...
Definition: Resizable.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:79
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:693
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.
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
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
Header file for the IsUpper type trait.
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.