35#ifndef _BLAZE_MATH_ADAPTORS_LOWERMATRIX_DENSE_H_
36#define _BLAZE_MATH_ADAPTORS_LOWERMATRIX_DENSE_H_
108class LowerMatrix<MT,SO,true>
109 :
public DenseMatrix< LowerMatrix<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 = LowerMatrix<MT,SO,true>;
121 using BaseType = DenseMatrix<This,SO>;
122 using ResultType = This;
123 using OppositeType = LowerMatrix<OT,!SO,true>;
124 using TransposeType = UpperMatrix<TT,!SO,true>;
125 using ElementType = ET;
126 using SIMDType = SIMDType_t<MT>;
127 using TagType = TagType_t<MT>;
128 using ReturnType = ReturnType_t<MT>;
129 using CompositeType =
const This&;
130 using Reference = LowerProxy<MT>;
131 using ConstReference = ConstReference_t<MT>;
132 using Pointer = Pointer_t<MT>;
133 using ConstPointer = ConstPointer_t<MT>;
134 using ConstIterator = ConstIterator_t<MT>;
140 template<
typename NewType >
143 using Other = LowerMatrix< typename MT::template Rebind<NewType>::Other >;
150 template<
size_t NewM
154 using Other = LowerMatrix< typename MT::template Resize<NewM,NewN>::Other >;
165 using IteratorCategory = std::random_access_iterator_tag;
166 using ValueType = ElementType_t<MT>;
167 using PointerType = LowerProxy<MT>;
168 using ReferenceType = LowerProxy<MT>;
172 using iterator_category = IteratorCategory;
173 using value_type = ValueType;
174 using pointer = PointerType;
175 using reference = ReferenceType;
176 using difference_type = DifferenceType;
182 inline Iterator() noexcept
196 inline Iterator( MT& matrix,
size_t row,
size_t column ) noexcept
209 inline Iterator&
operator+=(
size_t inc )
noexcept {
210 ( SO )?( row_ += inc ):( column_ += inc );
221 inline Iterator&
operator-=(
size_t dec )
noexcept {
222 ( SO )?( row_ -= dec ):( column_ -= dec );
232 inline Iterator& operator++() noexcept {
233 ( SO )?( ++row_ ):( ++column_ );
243 inline const Iterator operator++(
int )
noexcept {
244 const Iterator tmp( *
this );
255 inline Iterator& operator--() noexcept {
256 ( SO )?( --row_ ):( --column_ );
266 inline const Iterator operator--(
int )
noexcept {
267 const Iterator tmp( *
this );
279 return ReferenceType( *matrix_, row_, column_ );
288 inline PointerType operator->()
const {
289 return PointerType( *matrix_, row_, column_ );
303 inline SIMDType load()
const {
304 return (*matrix_).load(row_,column_);
318 inline SIMDType
loada()
const {
319 return (*matrix_).loada(row_,column_);
333 inline SIMDType
loadu()
const {
334 return (*matrix_).loadu(row_,column_);
343 inline operator ConstIterator()
const {
345 return matrix_->begin( column_ ) + row_;
347 return matrix_->begin( row_ ) + column_;
358 friend inline bool operator==(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
359 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
370 friend inline bool operator==(
const Iterator& lhs,
const ConstIterator& rhs ) {
371 return ( ConstIterator( lhs ) == rhs );
382 friend inline bool operator==(
const ConstIterator& lhs,
const Iterator& rhs ) {
383 return ( lhs == ConstIterator( rhs ) );
394 friend inline bool operator!=(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
395 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
406 friend inline bool operator!=(
const Iterator& lhs,
const ConstIterator& rhs ) {
407 return ( ConstIterator( lhs ) != rhs );
418 friend inline bool operator!=(
const ConstIterator& lhs,
const Iterator& rhs ) {
419 return ( lhs != ConstIterator( rhs ) );
430 friend inline bool operator<(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
431 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
442 friend inline bool operator<(
const Iterator& lhs,
const ConstIterator& rhs ) {
443 return ( ConstIterator( lhs ) < rhs );
454 friend inline bool operator<(
const ConstIterator& lhs,
const Iterator& rhs ) {
455 return ( lhs < ConstIterator( rhs ) );
466 friend inline bool operator>(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
467 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
478 friend inline bool operator>(
const Iterator& lhs,
const ConstIterator& rhs ) {
479 return ( ConstIterator( lhs ) > rhs );
490 friend inline bool operator>(
const ConstIterator& lhs,
const Iterator& rhs ) {
491 return ( lhs > ConstIterator( rhs ) );
502 friend inline bool operator<=(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
503 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
514 friend inline bool operator<=(
const Iterator& lhs,
const ConstIterator& rhs ) {
515 return ( ConstIterator( lhs ) <= rhs );
526 friend inline bool operator<=(
const ConstIterator& lhs,
const Iterator& rhs ) {
527 return ( lhs <= ConstIterator( rhs ) );
538 friend inline bool operator>=(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
539 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
550 friend inline bool operator>=(
const Iterator& lhs,
const ConstIterator& rhs ) {
551 return ( ConstIterator( lhs ) >= rhs );
562 friend inline bool operator>=(
const ConstIterator& lhs,
const Iterator& rhs ) {
563 return ( lhs >= ConstIterator( rhs ) );
573 inline DifferenceType
operator-(
const Iterator& rhs )
const noexcept {
574 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
585 friend inline const Iterator
operator+(
const Iterator& it,
size_t inc )
noexcept {
587 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
589 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
600 friend inline const Iterator
operator+(
size_t inc,
const Iterator& it )
noexcept {
602 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
604 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
615 friend inline const Iterator
operator-(
const Iterator& it,
size_t dec )
noexcept {
617 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
619 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
634 static constexpr bool simdEnabled = MT::simdEnabled;
637 static constexpr bool smpAssignable = MT::smpAssignable;
643 inline LowerMatrix();
644 template<
typename A1 >
explicit inline LowerMatrix(
const A1& a1 );
645 inline LowerMatrix(
size_t n,
const ElementType& init );
649 template<
typename Other >
650 inline LowerMatrix(
size_t n,
const Other* array );
652 template<
typename Other,
size_t N >
653 inline LowerMatrix(
const Other (&array)[N][N] );
655 inline LowerMatrix( ElementType* ptr,
size_t n );
656 inline LowerMatrix( ElementType* ptr,
size_t n,
size_t nn );
658 inline LowerMatrix(
const LowerMatrix& m );
659 inline LowerMatrix( LowerMatrix&& m )
noexcept;
666 ~LowerMatrix() =
default;
673 inline Reference operator()(
size_t i,
size_t j );
674 inline ConstReference operator()(
size_t i,
size_t j )
const;
675 inline Reference at(
size_t i,
size_t j );
676 inline ConstReference at(
size_t i,
size_t j )
const;
677 inline ConstPointer
data () const noexcept;
678 inline ConstPointer
data (
size_t i ) const noexcept;
679 inline Iterator
begin (
size_t i );
680 inline ConstIterator
begin (
size_t i ) const;
681 inline ConstIterator
cbegin(
size_t i ) const;
682 inline Iterator
end (
size_t i );
683 inline ConstIterator
end (
size_t i ) const;
684 inline ConstIterator
cend (
size_t i ) const;
691 inline LowerMatrix& operator=( const ElementType& rhs );
694 template< typename Other,
size_t N >
695 inline LowerMatrix& operator=( const Other (&array)[N][N] );
697 inline LowerMatrix& operator=( const LowerMatrix& rhs );
698 inline LowerMatrix& operator=( LowerMatrix&& rhs ) noexcept;
700 template< typename MT2,
bool SO2 >
701 inline auto operator=( const Matrix<MT2,SO2>& rhs )
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 ) -> LowerMatrix&;
727 template< typename ST >
730 template< typename ST >
738 inline
size_t rows() const noexcept;
739 inline
size_t columns() const noexcept;
740 inline
size_t spacing() const noexcept;
741 inline
size_t capacity() const noexcept;
742 inline
size_t capacity(
size_t i ) const noexcept;
744 inline
size_t nonZeros(
size_t i ) const;
746 inline
void reset(
size_t i );
748 void resize (
size_t n,
bool preserve=true );
749 inline
void extend (
size_t n,
bool preserve=true );
750 inline
void reserve(
size_t elements );
752 inline
void swap( LowerMatrix& m ) noexcept;
754 static constexpr
size_t maxNonZeros() noexcept;
755 static constexpr
size_t maxNonZeros(
size_t n ) noexcept;
762 template< typename Other > inline LowerMatrix& scale( const Other& scalar );
769 inline
bool isIntact() const noexcept;
776 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
777 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
779 inline
bool isAligned () const noexcept;
780 inline
bool canSMPAssign() const noexcept;
792 inline const MT construct(
size_t n ,
TrueType );
793 inline const MT construct( const ElementType& value,
FalseType );
795 template< typename MT2,
bool SO2, typename T >
796 inline const MT construct( const Matrix<MT2,SO2>& m, T );
808 template< typename MT2,
bool SO2,
bool DF2 >
809 friend MT2& derestrict( LowerMatrix<MT2,SO2,DF2>& m );
848inline LowerMatrix<MT,SO,true>::LowerMatrix()
878template<
typename A1 >
879inline LowerMatrix<MT,SO,true>::LowerMatrix(
const A1& a1 )
880 : matrix_( construct( a1, IsResizable<MT>() ) )
898inline LowerMatrix<MT,SO,true>::LowerMatrix(
size_t n,
const ElementType& init )
899 : matrix_( n, n, ElementType() )
904 for(
size_t j=0UL; j<
columns(); ++j )
905 for(
size_t i=j; i<
rows(); ++i )
909 for(
size_t i=0UL; i<
rows(); ++i )
910 for(
size_t j=0UL; j<=i; ++j )
988template<
typename Other >
989inline LowerMatrix<MT,SO,true>::LowerMatrix(
size_t n,
const Other* array )
990 : matrix_( n, n, array )
1025template<
typename MT
1027template<
typename Other
1029inline LowerMatrix<MT,SO,true>::LowerMatrix(
const Other (&array)[N][N] )
1074template<
typename MT
1076inline LowerMatrix<MT,SO,true>::LowerMatrix( ElementType* ptr,
size_t n )
1077 : matrix_( ptr, n, n )
1123template<
typename MT
1125inline LowerMatrix<MT,SO,true>::LowerMatrix( ElementType* ptr,
size_t n,
size_t nn )
1126 : matrix_( ptr, n, n, nn )
1144template<
typename MT
1146inline LowerMatrix<MT,SO,true>::LowerMatrix(
const LowerMatrix& m )
1147 : matrix_( m.matrix_ )
1162template<
typename MT
1164inline LowerMatrix<MT,SO,true>::LowerMatrix( LowerMatrix&& m ) noexcept
1165 : matrix_( std::move( m.matrix_ ) )
1198template<
typename MT
1200inline typename LowerMatrix<MT,SO,true>::Reference
1201 LowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1206 return Reference( matrix_, i, j );
1228template<
typename MT
1230inline typename LowerMatrix<MT,SO,true>::ConstReference
1231 LowerMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const
1236 return matrix_(i,j);
1259template<
typename MT
1261inline typename LowerMatrix<MT,SO,true>::Reference
1262 LowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1270 return (*
this)(i,j);
1293template<
typename MT
1295inline typename LowerMatrix<MT,SO,true>::ConstReference
1296 LowerMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const
1304 return (*
this)(i,j);
1323template<
typename MT
1325inline typename LowerMatrix<MT,SO,true>::ConstPointer
1328 return matrix_.data();
1343template<
typename MT
1345inline typename LowerMatrix<MT,SO,true>::ConstPointer
1348 return matrix_.data(i);
1366template<
typename MT
1368inline typename LowerMatrix<MT,SO,true>::Iterator
1372 return Iterator( matrix_, 0UL, i );
1374 return Iterator( matrix_, i, 0UL );
1392template<
typename MT
1394inline typename LowerMatrix<MT,SO,true>::ConstIterator
1397 return matrix_.begin(i);
1415template<
typename MT
1417inline typename LowerMatrix<MT,SO,true>::ConstIterator
1420 return matrix_.cbegin(i);
1438template<
typename MT
1440inline typename LowerMatrix<MT,SO,true>::Iterator
1444 return Iterator( matrix_,
rows(), i );
1446 return Iterator( matrix_, i,
columns() );
1464template<
typename MT
1466inline typename LowerMatrix<MT,SO,true>::ConstIterator
1469 return matrix_.end(i);
1487template<
typename MT
1489inline typename LowerMatrix<MT,SO,true>::ConstIterator
1492 return matrix_.cend(i);
1513template<
typename MT
1515inline LowerMatrix<MT,SO,true>&
1516 LowerMatrix<MT,SO,true>::operator=(
const ElementType& rhs )
1519 for(
size_t j=0UL; j<
columns(); ++j )
1520 for(
size_t i=j; i<
rows(); ++i )
1524 for(
size_t i=0UL; i<
rows(); ++i )
1525 for(
size_t j=0UL; j<=i; ++j )
1560template<
typename MT
1562inline LowerMatrix<MT,SO,true>&
1565 const InitializerMatrix<ElementType> tmp( list, list.size() );
1606template<
typename MT
1608template<
typename Other
1610inline LowerMatrix<MT,SO,true>&
1611 LowerMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1619 matrix_ = std::move( tmp );
1640template<
typename MT
1642inline LowerMatrix<MT,SO,true>&
1643 LowerMatrix<MT,SO,true>::operator=(
const LowerMatrix& rhs )
1645 matrix_ = rhs.matrix_;
1663template<
typename MT
1665inline LowerMatrix<MT,SO,true>&
1666 LowerMatrix<MT,SO,true>::operator=( LowerMatrix&& rhs )
noexcept
1668 matrix_ = std::move( rhs.matrix_ );
1692template<
typename MT
1694template<
typename MT2
1696inline auto LowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1697 -> DisableIf_t< IsComputation_v<MT2>, LowerMatrix& >
1699 if( !IsLower_v<MT2> && !
isLower( *rhs ) ) {
1727template<
typename MT
1729template<
typename MT2
1731inline auto LowerMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1732 -> EnableIf_t< IsComputation_v<MT2>, LowerMatrix& >
1734 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1738 if( IsLower_v<MT2> ) {
1748 matrix_ = std::move( tmp );
1773template<
typename MT
1775template<
typename MT2
1778 -> DisableIf_t< IsComputation_v<MT2>, LowerMatrix& >
1780 if( !IsLower_v<MT2> && !
isLower( *rhs ) ) {
1808template<
typename MT
1810template<
typename MT2
1813 -> EnableIf_t< IsComputation_v<MT2>, LowerMatrix& >
1815 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1819 if( IsLower_v<MT2> ) {
1823 const ResultType_t<MT2> tmp( *rhs );
1854template<
typename MT
1856template<
typename MT2
1859 -> DisableIf_t< IsComputation_v<MT2>, LowerMatrix& >
1861 if( !IsLower_v<MT2> && !
isLower( *rhs ) ) {
1889template<
typename MT
1891template<
typename MT2
1894 -> EnableIf_t< IsComputation_v<MT2>, LowerMatrix& >
1896 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1900 if( IsLower_v<MT2> ) {
1904 const ResultType_t<MT2> tmp( *rhs );
1933template<
typename MT
1935template<
typename MT2
1937inline auto LowerMatrix<MT,SO,true>::operator%=(
const Matrix<MT2,SO2>& rhs )
1940 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1963template<
typename MT
1965template<
typename ST >
1967 -> EnableIf_t< IsScalar_v<ST>, LowerMatrix& >
1983template<
typename MT
1985template<
typename ST >
1987 -> EnableIf_t< IsScalar_v<ST>, LowerMatrix& >
2012template<
typename MT
2016 return matrix_.rows();
2028template<
typename MT
2032 return matrix_.columns();
2049template<
typename MT
2053 return matrix_.spacing();
2065template<
typename MT
2069 return matrix_.capacity();
2087template<
typename MT
2091 return matrix_.capacity(i);
2103template<
typename MT
2107 return matrix_.nonZeros();
2125template<
typename MT
2129 return matrix_.nonZeros(i);
2141template<
typename MT
2148 for(
size_t j=0UL; j<
columns(); ++j )
2149 for(
size_t i=j; i<
rows(); ++i )
2150 clear( matrix_(i,j) );
2153 for(
size_t i=0UL; i<
rows(); ++i )
2154 for(
size_t j=0UL; j<=i; ++j )
2155 clear( matrix_(i,j) );
2175template<
typename MT
2182 for(
size_t j=i; j<
rows(); ++j )
2183 clear( matrix_(j,i) );
2186 for(
size_t j=0UL; j<=i; ++j )
2187 clear( matrix_(i,j) );
2206template<
typename MT
2255template<
typename MT
2265 const size_t oldsize( matrix_.rows() );
2267 matrix_.resize( n, n,
true );
2270 const size_t increment( n - oldsize );
2271 submatrix( matrix_, 0UL, oldsize, n-1UL, increment ).reset();
2291template<
typename MT
2293inline void LowerMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2314template<
typename MT
2316inline void LowerMatrix<MT,SO,true>::reserve(
size_t elements )
2334template<
typename MT
2338 matrix_.shrinkToFit();
2351template<
typename MT
2357 swap( matrix_, m.matrix_ );
2375template<
typename MT
2377constexpr size_t LowerMatrix<MT,SO,true>::maxNonZeros() noexcept
2381 return maxNonZeros( Size_v<MT,0UL> );
2397template<
typename MT
2399constexpr size_t LowerMatrix<MT,SO,true>::maxNonZeros(
size_t n )
noexcept
2401 return ( ( n + 1UL ) * n ) / 2UL;
2433template<
typename MT
2435template<
typename Other >
2436inline LowerMatrix<MT,SO,true>& LowerMatrix<MT,SO,true>::scale(
const Other& scalar )
2438 matrix_.scale( scalar );
2463template<
typename MT
2494template<
typename MT
2496template<
typename Other >
2497inline bool LowerMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2499 return matrix_.canAlias( alias );
2516template<
typename MT
2518template<
typename Other >
2519inline bool LowerMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2521 return matrix_.isAliased( alias );
2537template<
typename MT
2539inline bool LowerMatrix<MT,SO,true>::isAligned() const noexcept
2541 return matrix_.isAligned();
2558template<
typename MT
2560inline bool LowerMatrix<MT,SO,true>::canSMPAssign() const noexcept
2562 return matrix_.canSMPAssign();
2584template<
typename MT
2587 LowerMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2589 return matrix_.load( i, j );
2611template<
typename MT
2616 return matrix_.loada( i, j );
2638template<
typename MT
2643 return matrix_.loadu( i, j );
2664template<
typename MT
2666inline const MT LowerMatrix<MT,SO,true>::construct(
size_t n,
TrueType )
2670 return MT( n, n, ElementType() );
2683template<
typename MT
2685inline const MT LowerMatrix<MT,SO,true>::construct(
const ElementType& init,
FalseType )
2693 for(
size_t j=0UL; j<tmp.columns(); ++j )
2694 for(
size_t i=j; i<tmp.rows(); ++i )
2698 for(
size_t i=0UL; i<tmp.rows(); ++i )
2699 for(
size_t j=0UL; j<=i; ++j )
2720template<
typename MT
2722template<
typename MT2
2725inline const MT LowerMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2729 if( !IsLower_v<MT2> && !
isLower( tmp ) ) {
Header file for auxiliary alias declarations.
Header file for run time assertion macros.
Constraint on the data type.
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:751
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:719
Header file for the EnableIf class template.
Constraint on the data type.
Header file for the IntegralConstant class template.
Header file for the IsComputation type trait class.
Header file for the isDefault shim.
Header file for the IsLower type trait.
Header file for the IsResizable type trait.
Header file for the IsScalar type trait.
Header file for the IsSquare type trait.
Header file for the LowerProxy class.
Constraint on the data type.
Header file for the MAYBE_UNUSED function template.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the implementation of the base template of the LowerMatrix.
Initializer list type of the Blaze library.
Pointer difference type of the Blaze library.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for utility functions for dense matrices.
Header file for the implementation of a matrix representation of an initializer list.
Header file for the DenseMatrix base class.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:137
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.
Definition: Volatile.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.
Definition: Pointer.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.
Definition: Const.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.
Definition: Reference.h:79
auto operator/=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Division assignment operator for the division of a dense matrix by a scalar value ( ).
Definition: DenseMatrix.h:574
bool isLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower triangular matrix.
Definition: DenseMatrix.h:1921
MT::ElementType * data(DenseMatrix< MT, SO > &dm) noexcept
Low-level data access to the dense matrix elements.
Definition: DenseMatrix.h:182
auto operator+=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Addition assignment operator for the addition of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:386
auto operator*=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Multiplication assignment operator for the multiplication of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:510
size_t spacing(const DenseMatrix< MT, SO > &dm) noexcept
Returns the spacing between the beginning of two rows/columns.
Definition: DenseMatrix.h:265
decltype(auto) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.h:1004
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:9640
auto operator-=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Subtraction assignment operator for the subtraction of a dense matrix and a scalar value ( ).
Definition: DenseMatrix.h:448
bool isZero(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a zero matrix.
Definition: DenseMatrix.h:1819
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:207
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:225
decltype(auto) elements(Vector< VT, TF > &vector, REAs... args)
Creating a view on a selection of elements of the given vector.
Definition: Elements.h:143
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VIEW_TYPE(T)
Constraint on the data type.
Definition: View.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Hermitian.h:79
#define BLAZE_CONSTRAINT_MUST_BE_SQUARE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Square.h:60
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Upper.h:81
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: DenseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.
Definition: Computation.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_RESIZABLE_TYPE(T)
Constraint on the data type.
Definition: Resizable.h:81
#define BLAZE_CONSTRAINT_MUST_BE_STATIC_TYPE(T)
Constraint on the data type.
Definition: Static.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Lower.h:81
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE_TYPE(T)
Constraint on the data type.
Definition: Resizable.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSFORMATION_TYPE(T)
Constraint on the data type.
Definition: Transformation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.
Definition: StorageOrder.h:63
constexpr bool IsScalar_v
Auxiliary variable template for the IsScalar type trait.
Definition: IsScalar.h:104
constexpr ptrdiff_t Size_v
Auxiliary variable template for the Size type trait.
Definition: Size.h:176
constexpr bool IsComputation_v
Auxiliary variable template for the IsComputation type trait.
Definition: IsComputation.h:90
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 > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:253
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
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
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
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 void clear(Matrix< MT, SO > &matrix)
Clearing the given matrix.
Definition: Matrix.h:960
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:628
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:644
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:730
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:562
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:692
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition: Matrix.h:806
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:660
void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:1108
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:584
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:518
void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition: Matrix.h:1169
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:1383
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:137
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition: Assert.h:117
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
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
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112
decltype(auto) submatrix(Matrix< MT, SO > &, RSAs...)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:181
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
BoolConstant< true > TrueType
Type traits base class.
Definition: IntegralConstant.h:132
BoolConstant< false > FalseType
Type/value traits base class.
Definition: IntegralConstant.h:121
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition: Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition: Exception.h:235
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:175
Header file for the exception macros of the math module.
Header file for the extended initializer_list functionality.
Header file for all adaptor forward declarations.
Constraints on the storage order of matrix types.
Header file for the Size type trait.
Header file for the clear shim.
Header file for the isZero shim.
System settings for the inline keywords.
Header file for basic type definitions.
Header file for the implementation of the Submatrix view.