35#ifndef _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_DENSE_H_
36#define _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_DENSE_H_
109class StrictlyUpperMatrix<MT,SO,true>
110 :
public DenseMatrix< StrictlyUpperMatrix<MT,SO,true>, SO >
114 using OT = OppositeType_t<MT>;
115 using TT = TransposeType_t<MT>;
116 using ET = ElementType_t<MT>;
121 using This = StrictlyUpperMatrix<MT,SO,true>;
122 using BaseType = DenseMatrix<This,SO>;
123 using ResultType = This;
124 using OppositeType = StrictlyUpperMatrix<OT,!SO,true>;
125 using TransposeType = StrictlyLowerMatrix<TT,!SO,true>;
126 using ElementType = ET;
127 using SIMDType = SIMDType_t<MT>;
128 using TagType = TagType_t<MT>;
129 using ReturnType = ReturnType_t<MT>;
130 using CompositeType =
const This&;
131 using Reference = StrictlyUpperProxy<MT>;
132 using ConstReference = ConstReference_t<MT>;
133 using Pointer = Pointer_t<MT>;
134 using ConstPointer = ConstPointer_t<MT>;
135 using ConstIterator = ConstIterator_t<MT>;
141 template<
typename NewType >
144 using Other = StrictlyUpperMatrix< typename MT::template Rebind<NewType>::Other >;
151 template<
size_t NewM
155 using Other = StrictlyUpperMatrix< typename MT::template Resize<NewM,NewN>::Other >;
166 using IteratorCategory = std::random_access_iterator_tag;
167 using ValueType = ElementType_t<MT>;
168 using PointerType = StrictlyUpperProxy<MT>;
169 using ReferenceType = StrictlyUpperProxy<MT>;
173 using iterator_category = IteratorCategory;
174 using value_type = ValueType;
175 using pointer = PointerType;
176 using reference = ReferenceType;
177 using difference_type = DifferenceType;
183 inline Iterator() noexcept
197 inline Iterator( MT& matrix,
size_t row,
size_t column ) noexcept
210 inline Iterator&
operator+=(
size_t inc )
noexcept {
211 ( SO )?( row_ += inc ):( column_ += inc );
222 inline Iterator&
operator-=(
size_t dec )
noexcept {
223 ( SO )?( row_ -= dec ):( column_ -= dec );
233 inline Iterator& operator++() noexcept {
234 ( SO )?( ++row_ ):( ++column_ );
244 inline const Iterator operator++(
int )
noexcept {
245 const Iterator tmp( *
this );
256 inline Iterator& operator--() noexcept {
257 ( SO )?( --row_ ):( --column_ );
267 inline const Iterator operator--(
int )
noexcept {
268 const Iterator tmp( *
this );
280 return ReferenceType( *matrix_, row_, column_ );
289 inline PointerType operator->()
const {
290 return PointerType( *matrix_, row_, column_ );
304 inline SIMDType load()
const {
305 return (*matrix_).load(row_,column_);
319 inline SIMDType
loada()
const {
320 return (*matrix_).loada(row_,column_);
334 inline SIMDType
loadu()
const {
335 return (*matrix_).loadu(row_,column_);
344 inline operator ConstIterator()
const {
346 return matrix_->begin( column_ ) + row_;
348 return matrix_->begin( row_ ) + column_;
359 friend inline bool operator==(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
360 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
371 friend inline bool operator==(
const Iterator& lhs,
const ConstIterator& rhs ) {
372 return ( ConstIterator( lhs ) == rhs );
383 friend inline bool operator==(
const ConstIterator& lhs,
const Iterator& rhs ) {
384 return ( lhs == ConstIterator( rhs ) );
395 friend inline bool operator!=(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
396 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
407 friend inline bool operator!=(
const Iterator& lhs,
const ConstIterator& rhs ) {
408 return ( ConstIterator( lhs ) != rhs );
419 friend inline bool operator!=(
const ConstIterator& lhs,
const Iterator& rhs ) {
420 return ( lhs != ConstIterator( rhs ) );
431 friend inline bool operator<(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
432 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
443 friend inline bool operator<(
const Iterator& lhs,
const ConstIterator& rhs ) {
444 return ( ConstIterator( lhs ) < rhs );
455 friend inline bool operator<(
const ConstIterator& lhs,
const Iterator& rhs ) {
456 return ( lhs < ConstIterator( rhs ) );
467 friend inline bool operator>(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
468 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
479 friend inline bool operator>(
const Iterator& lhs,
const ConstIterator& rhs ) {
480 return ( ConstIterator( lhs ) > rhs );
491 friend inline bool operator>(
const ConstIterator& lhs,
const Iterator& rhs ) {
492 return ( lhs > ConstIterator( rhs ) );
503 friend inline bool operator<=(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
504 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
515 friend inline bool operator<=(
const Iterator& lhs,
const ConstIterator& rhs ) {
516 return ( ConstIterator( lhs ) <= rhs );
527 friend inline bool operator<=(
const ConstIterator& lhs,
const Iterator& rhs ) {
528 return ( lhs <= ConstIterator( rhs ) );
539 friend inline bool operator>=(
const Iterator& lhs,
const Iterator& rhs )
noexcept {
540 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
551 friend inline bool operator>=(
const Iterator& lhs,
const ConstIterator& rhs ) {
552 return ( ConstIterator( lhs ) >= rhs );
563 friend inline bool operator>=(
const ConstIterator& lhs,
const Iterator& rhs ) {
564 return ( lhs >= ConstIterator( rhs ) );
574 inline DifferenceType
operator-(
const Iterator& rhs )
const noexcept {
575 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
586 friend inline const Iterator
operator+(
const Iterator& it,
size_t inc )
noexcept {
588 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
590 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
601 friend inline const Iterator
operator+(
size_t inc,
const Iterator& it )
noexcept {
603 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
605 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
616 friend inline const Iterator
operator-(
const Iterator& it,
size_t dec )
noexcept {
618 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
620 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
635 static constexpr bool simdEnabled = MT::simdEnabled;
638 static constexpr bool smpAssignable = MT::smpAssignable;
644 inline StrictlyUpperMatrix();
645 template<
typename A1 >
explicit inline StrictlyUpperMatrix(
const A1& a1 );
646 inline StrictlyUpperMatrix(
size_t n,
const ElementType& init );
650 template<
typename Other >
651 inline StrictlyUpperMatrix(
size_t n,
const Other* array );
653 template<
typename Other,
size_t N >
654 inline StrictlyUpperMatrix(
const Other (&array)[N][N] );
656 inline StrictlyUpperMatrix( ElementType* ptr,
size_t n );
657 inline StrictlyUpperMatrix( ElementType* ptr,
size_t n,
size_t nn );
659 inline StrictlyUpperMatrix(
const StrictlyUpperMatrix& m );
660 inline StrictlyUpperMatrix( StrictlyUpperMatrix&& m )
noexcept;
667 ~StrictlyUpperMatrix() =
default;
674 inline Reference operator()(
size_t i,
size_t j );
675 inline ConstReference operator()(
size_t i,
size_t j )
const;
676 inline Reference at(
size_t i,
size_t j );
677 inline ConstReference at(
size_t i,
size_t j )
const;
678 inline ConstPointer
data () const noexcept;
679 inline ConstPointer
data (
size_t i ) const noexcept;
680 inline Iterator
begin (
size_t i );
681 inline ConstIterator
begin (
size_t i ) const;
682 inline ConstIterator
cbegin(
size_t i ) const;
683 inline Iterator
end (
size_t i );
684 inline ConstIterator
end (
size_t i ) const;
685 inline ConstIterator
cend (
size_t i ) const;
694 template< typename Other,
size_t N >
695 inline StrictlyUpperMatrix& operator=( const Other (&array)[N][N] );
697 inline StrictlyUpperMatrix& operator=( const ElementType& rhs );
698 inline StrictlyUpperMatrix& operator=( const StrictlyUpperMatrix& rhs );
699 inline StrictlyUpperMatrix& operator=( StrictlyUpperMatrix&& rhs ) noexcept;
701 template< typename MT2,
bool SO2 >
702 inline auto operator=( const Matrix<MT2,SO2>& rhs )
705 template< typename MT2,
bool SO2 >
706 inline auto operator=( const Matrix<MT2,SO2>& rhs )
709 template< typename MT2,
bool SO2 >
710 inline auto operator+=( const Matrix<MT2,SO2>& rhs )
713 template< typename MT2,
bool SO2 >
714 inline auto operator+=( const Matrix<MT2,SO2>& rhs )
717 template< typename MT2,
bool SO2 >
718 inline auto operator-=( const Matrix<MT2,SO2>& rhs )
721 template< typename MT2,
bool SO2 >
722 inline auto operator-=( const Matrix<MT2,SO2>& rhs )
725 template< typename MT2,
bool SO2 >
726 inline auto operator%=( const Matrix<MT2,SO2>& rhs ) -> StrictlyUpperMatrix&;
728 template< typename ST >
731 template< typename ST >
739 inline
size_t rows() const noexcept;
740 inline
size_t columns() const noexcept;
741 inline
size_t spacing() const noexcept;
742 inline
size_t capacity() const noexcept;
743 inline
size_t capacity(
size_t i ) const noexcept;
745 inline
size_t nonZeros(
size_t i ) const;
747 inline
void reset(
size_t i );
749 void resize (
size_t n,
bool preserve=true );
750 inline
void extend (
size_t n,
bool preserve=true );
751 inline
void reserve(
size_t elements );
753 inline
void swap( StrictlyUpperMatrix& m ) noexcept;
755 static constexpr
size_t maxNonZeros() noexcept;
756 static constexpr
size_t maxNonZeros(
size_t n ) noexcept;
763 template< typename Other > inline StrictlyUpperMatrix& scale( const Other& scalar );
770 inline
bool isIntact() const noexcept;
777 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
778 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
780 inline
bool isAligned () const noexcept;
781 inline
bool canSMPAssign() const noexcept;
793 inline const MT construct(
size_t n ,
TrueType );
794 inline const MT construct( const ElementType& value,
FalseType );
796 template< typename MT2,
bool SO2, typename T >
797 inline const MT construct( const Matrix<MT2,SO2>& m, T );
809 template< typename MT2,
bool SO2,
bool DF2 >
810 friend MT2& derestrict( StrictlyUpperMatrix<MT2,SO2,DF2>& m );
849inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix()
879template<
typename A1 >
880inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
const A1& a1 )
881 : matrix_( construct( a1, IsResizable<MT>() ) )
899inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
size_t n,
const ElementType& init )
900 : matrix_( n, n, ElementType() )
905 for(
size_t j=0UL; j<
columns(); ++j ) {
906 for(
size_t i=0UL; i<j; ++i )
911 for(
size_t i=0UL; i<
rows(); ++i ) {
912 for(
size_t j=i+1UL; j<
columns(); ++j )
992template<
typename Other >
993inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
size_t n,
const Other* array )
994 : matrix_( n, n, array )
1029template<
typename MT
1031template<
typename Other
1033inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
const Other (&array)[N][N] )
1079template<
typename MT
1081inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix( ElementType* ptr,
size_t n )
1082 : matrix_( ptr, n, n )
1128template<
typename MT
1130inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix( ElementType* ptr,
size_t n,
size_t nn )
1131 : matrix_( ptr, n, n, nn )
1149template<
typename MT
1151inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix(
const StrictlyUpperMatrix& m )
1152 : matrix_( m.matrix_ )
1167template<
typename MT
1169inline StrictlyUpperMatrix<MT,SO,true>::StrictlyUpperMatrix( StrictlyUpperMatrix&& m ) noexcept
1170 : matrix_( std::move( m.matrix_ ) )
1203template<
typename MT
1205inline typename StrictlyUpperMatrix<MT,SO,true>::Reference
1206 StrictlyUpperMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1211 return Reference( matrix_, i, j );
1233template<
typename MT
1235inline typename StrictlyUpperMatrix<MT,SO,true>::ConstReference
1236 StrictlyUpperMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const
1241 return matrix_(i,j);
1264template<
typename MT
1266inline typename StrictlyUpperMatrix<MT,SO,true>::Reference
1267 StrictlyUpperMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1275 return (*
this)(i,j);
1298template<
typename MT
1300inline typename StrictlyUpperMatrix<MT,SO,true>::ConstReference
1301 StrictlyUpperMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const
1309 return (*
this)(i,j);
1328template<
typename MT
1330inline typename StrictlyUpperMatrix<MT,SO,true>::ConstPointer
1333 return matrix_.data();
1348template<
typename MT
1350inline typename StrictlyUpperMatrix<MT,SO,true>::ConstPointer
1353 return matrix_.data(i);
1371template<
typename MT
1373inline typename StrictlyUpperMatrix<MT,SO,true>::Iterator
1377 return Iterator( matrix_, 0UL, i );
1379 return Iterator( matrix_, i, 0UL );
1397template<
typename MT
1399inline typename StrictlyUpperMatrix<MT,SO,true>::ConstIterator
1402 return matrix_.begin(i);
1420template<
typename MT
1422inline typename StrictlyUpperMatrix<MT,SO,true>::ConstIterator
1425 return matrix_.cbegin(i);
1443template<
typename MT
1445inline typename StrictlyUpperMatrix<MT,SO,true>::Iterator
1449 return Iterator( matrix_,
rows(), i );
1451 return Iterator( matrix_, i,
columns() );
1469template<
typename MT
1471inline typename StrictlyUpperMatrix<MT,SO,true>::ConstIterator
1474 return matrix_.end(i);
1492template<
typename MT
1494inline typename StrictlyUpperMatrix<MT,SO,true>::ConstIterator
1497 return matrix_.cend(i);
1518template<
typename MT
1520inline StrictlyUpperMatrix<MT,SO,true>&
1521 StrictlyUpperMatrix<MT,SO,true>::operator=(
const ElementType& rhs )
1524 for(
size_t j=1UL; j<
columns(); ++j )
1525 for(
size_t i=0UL; i<j; ++i )
1529 for(
size_t i=0UL; i<
rows(); ++i )
1530 for(
size_t j=i+1UL; j<
columns(); ++j )
1565template<
typename MT
1567inline StrictlyUpperMatrix<MT,SO,true>&
1570 const InitializerMatrix<ElementType> tmp( list, list.size() );
1612template<
typename MT
1614template<
typename Other
1616inline StrictlyUpperMatrix<MT,SO,true>&
1617 StrictlyUpperMatrix<MT,SO,true>::operator=(
const Other (&array)[N][N] )
1625 matrix_ = std::move( tmp );
1646template<
typename MT
1648inline StrictlyUpperMatrix<MT,SO,true>&
1649 StrictlyUpperMatrix<MT,SO,true>::operator=(
const StrictlyUpperMatrix& rhs )
1651 matrix_ = rhs.matrix_;
1669template<
typename MT
1671inline StrictlyUpperMatrix<MT,SO,true>&
1672 StrictlyUpperMatrix<MT,SO,true>::operator=( StrictlyUpperMatrix&& rhs )
noexcept
1674 matrix_ = std::move( rhs.matrix_ );
1698template<
typename MT
1700template<
typename MT2
1702inline auto StrictlyUpperMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1703 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1705 if( IsUniTriangular_v<MT2> ||
1734template<
typename MT
1736template<
typename MT2
1738inline auto StrictlyUpperMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1739 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1741 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1745 if( IsStrictlyUpper_v<MT2> ) {
1755 matrix_ = std::move( tmp );
1780template<
typename MT
1782template<
typename MT2
1785 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1787 if( IsUniTriangular_v<MT2> ||
1816template<
typename MT
1818template<
typename MT2
1821 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1823 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1827 if( IsStrictlyUpper_v<MT2> ) {
1831 const ResultType_t<MT2> tmp( *rhs );
1862template<
typename MT
1864template<
typename MT2
1867 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1897template<
typename MT
1899template<
typename MT2
1902 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1904 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1908 if( IsStrictlyUpper_v<MT2> ) {
1912 const ResultType_t<MT2> tmp( *rhs );
1941template<
typename MT
1943template<
typename MT2
1945inline auto StrictlyUpperMatrix<MT,SO,true>::operator%=(
const Matrix<MT2,SO2>& rhs )
1946 -> StrictlyUpperMatrix&
1948 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1971template<
typename MT
1973template<
typename ST >
1975 -> EnableIf_t< IsScalar_v<ST>, StrictlyUpperMatrix& >
1991template<
typename MT
1993template<
typename ST >
1995 -> EnableIf_t< IsScalar_v<ST>, StrictlyUpperMatrix& >
2020template<
typename MT
2024 return matrix_.rows();
2036template<
typename MT
2040 return matrix_.columns();
2057template<
typename MT
2061 return matrix_.spacing();
2073template<
typename MT
2077 return matrix_.capacity();
2095template<
typename MT
2099 return matrix_.capacity(i);
2111template<
typename MT
2115 return matrix_.nonZeros();
2133template<
typename MT
2137 return matrix_.nonZeros(i);
2149template<
typename MT
2156 for(
size_t j=1UL; j<
columns(); ++j )
2157 for(
size_t i=0UL; i<j; ++i )
2158 clear( matrix_(i,j) );
2161 for(
size_t i=0UL; i<
rows(); ++i )
2162 for(
size_t j=i+1UL; j<
columns(); ++j )
2163 clear( matrix_(i,j) );
2183template<
typename MT
2190 for(
size_t j=0UL; j<i; ++j )
2191 clear( matrix_(j,i) );
2194 for(
size_t j=i+1UL; j<
columns(); ++j )
2195 clear( matrix_(i,j) );
2214template<
typename MT
2263template<
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_, oldsize, 0UL, increment, n ).reset();
2300template<
typename MT
2302inline void StrictlyUpperMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2323template<
typename MT
2325inline void StrictlyUpperMatrix<MT,SO,true>::reserve(
size_t elements )
2343template<
typename MT
2347 matrix_.shrinkToFit();
2360template<
typename MT
2366 swap( matrix_, m.matrix_ );
2384template<
typename MT
2386constexpr size_t StrictlyUpperMatrix<MT,SO,true>::maxNonZeros() noexcept
2390 return maxNonZeros( Size_v<MT,0UL> );
2406template<
typename MT
2408constexpr size_t StrictlyUpperMatrix<MT,SO,true>::maxNonZeros(
size_t n )
noexcept
2410 return ( ( n - 1UL ) * n ) / 2UL;
2442template<
typename MT
2444template<
typename Other >
2445inline StrictlyUpperMatrix<MT,SO,true>&
2446 StrictlyUpperMatrix<MT,SO,true>::scale(
const Other& scalar )
2448 matrix_.scale( scalar );
2473template<
typename MT
2504template<
typename MT
2506template<
typename Other >
2507inline bool StrictlyUpperMatrix<MT,SO,true>::canAlias(
const Other* alias )
const noexcept
2509 return matrix_.canAlias( alias );
2526template<
typename MT
2528template<
typename Other >
2529inline bool StrictlyUpperMatrix<MT,SO,true>::isAliased(
const Other* alias )
const noexcept
2531 return matrix_.isAliased( alias );
2547template<
typename MT
2549inline bool StrictlyUpperMatrix<MT,SO,true>::isAligned() const noexcept
2551 return matrix_.isAligned();
2568template<
typename MT
2570inline bool StrictlyUpperMatrix<MT,SO,true>::canSMPAssign() const noexcept
2572 return matrix_.canSMPAssign();
2594template<
typename MT
2597 StrictlyUpperMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const noexcept
2599 return matrix_.load( i, j );
2621template<
typename MT
2626 return matrix_.loada( i, j );
2648template<
typename MT
2653 return matrix_.loadu( i, j );
2674template<
typename MT
2676inline const MT StrictlyUpperMatrix<MT,SO,true>::construct(
size_t n,
TrueType )
2680 return MT( n, n, ElementType() );
2693template<
typename MT
2695inline const MT StrictlyUpperMatrix<MT,SO,true>::construct(
const ElementType& init,
FalseType )
2703 for(
size_t j=0UL; j<
columns(); ++j ) {
2704 for(
size_t i=0UL; i<j; ++i )
2709 for(
size_t i=0UL; i<
rows(); ++i ) {
2710 for(
size_t j=i+1UL; j<
columns(); ++j )
2732template<
typename MT
2734template<
typename MT2
2737inline const MT StrictlyUpperMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2741 if( IsUniTriangular_v<MT2> ||
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 IsResizable type trait.
Header file for the IsScalar type trait.
Header file for the IsSquare type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsUniTriangular type trait.
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.
Header file for the StrictlyUpperProxy class.
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 StrictlyUpperMatrix.
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
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
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:2363
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) declupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as upper.
Definition: DMatDeclUppExpr.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.