35 #ifndef _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_DENSE_H_
36 #define _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_DENSE_H_
111 template<
typename MT
113 class HermitianMatrix<MT,SO,true>
114 :
public DenseMatrix< HermitianMatrix<MT,SO,true>, SO >
121 typedef IntrinsicTrait<ET> IT;
126 typedef HermitianMatrix<MT,SO,true>
This;
131 typedef typename MT::IntrinsicType IntrinsicType;
136 typedef typename MT::Pointer Pointer;
137 typedef typename MT::ConstPointer ConstPointer;
144 template<
typename ET >
147 typedef HermitianMatrix< typename MT::template Rebind<ET>::Other > Other;
158 typedef std::random_access_iterator_tag IteratorCategory;
160 typedef HermitianProxy<MT> PointerType;
161 typedef HermitianProxy<MT> ReferenceType;
162 typedef ptrdiff_t DifferenceType;
165 typedef IteratorCategory iterator_category;
166 typedef ValueType value_type;
167 typedef PointerType pointer;
168 typedef ReferenceType reference;
169 typedef DifferenceType difference_type;
202 inline Iterator& operator+=(
size_t inc ) {
203 ( SO )?( row_ += inc ):( column_ += inc );
214 inline Iterator& operator-=(
size_t dec ) {
215 ( SO )?( row_ -= dec ):( column_ -= dec );
226 ( SO )?( ++row_ ):( ++column_ );
236 inline const Iterator operator++(
int ) {
249 ( SO )?( --row_ ):( --column_ );
259 inline const Iterator operator--(
int ) {
272 return ReferenceType( *matrix_, row_, column_ );
281 inline PointerType operator->()
const {
282 return PointerType( *matrix_, row_, column_ );
293 return matrix_->begin( column_ ) + row_;
295 return matrix_->begin( row_ ) + column_;
307 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
343 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
379 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
415 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
451 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
487 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
522 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
535 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
537 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
550 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
552 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
565 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
567 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
582 enum { vectorizable = MT::vectorizable };
585 enum { smpAssignable = MT::smpAssignable };
591 explicit inline HermitianMatrix();
592 explicit inline HermitianMatrix(
size_t n );
594 explicit inline HermitianMatrix( ElementType* ptr,
size_t n );
595 explicit inline HermitianMatrix( ElementType* ptr,
size_t n,
size_t nn );
597 template<
typename Deleter >
598 explicit inline HermitianMatrix( ElementType* ptr,
size_t n, Deleter d );
600 template<
typename Deleter >
601 explicit inline HermitianMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d );
603 inline HermitianMatrix(
const HermitianMatrix& m );
604 template<
typename MT2,
bool SO2 >
inline HermitianMatrix(
const Matrix<MT2,SO2>& m );
615 inline Reference operator()(
size_t i,
size_t j );
616 inline ConstReference operator()(
size_t i,
size_t j )
const;
617 inline Reference at(
size_t i,
size_t j );
618 inline ConstReference at(
size_t i,
size_t j )
const;
619 inline ConstPointer data ()
const;
620 inline ConstPointer data (
size_t i )
const;
622 inline ConstIterator
begin (
size_t i )
const;
623 inline ConstIterator
cbegin(
size_t i )
const;
625 inline ConstIterator
end (
size_t i )
const;
626 inline ConstIterator
cend (
size_t i )
const;
633 inline HermitianMatrix& operator=(
const HermitianMatrix& rhs );
635 template<
typename MT2,
bool SO2 >
636 inline typename DisableIf< IsComputation<MT2>, HermitianMatrix& >::Type
637 operator=(
const Matrix<MT2,SO2>& rhs );
639 template<
typename MT2,
bool SO2 >
640 inline typename EnableIf< IsComputation<MT2>, HermitianMatrix& >::Type
641 operator=(
const Matrix<MT2,SO2>& rhs );
643 template<
typename MT2 >
644 inline typename EnableIf< IsBuiltin<typename MT2::ElementType>, HermitianMatrix& >::Type
645 operator=(
const Matrix<MT2,!SO>& rhs );
647 template<
typename MT2,
bool SO2 >
648 inline typename DisableIf< IsComputation<MT2>, HermitianMatrix& >::Type
649 operator+=(
const Matrix<MT2,SO2>& rhs );
651 template<
typename MT2,
bool SO2 >
652 inline typename EnableIf< IsComputation<MT2>, HermitianMatrix& >::Type
653 operator+=(
const Matrix<MT2,SO2>& rhs );
655 template<
typename MT2 >
656 inline typename EnableIf< IsBuiltin<typename MT2::ElementType>, HermitianMatrix& >::Type
657 operator+=(
const Matrix<MT2,!SO>& rhs );
659 template<
typename MT2,
bool SO2 >
660 inline typename DisableIf< IsComputation<MT2>, HermitianMatrix& >::Type
661 operator-=(
const Matrix<MT2,SO2>& rhs );
663 template<
typename MT2,
bool SO2 >
664 inline typename EnableIf< IsComputation<MT2>, HermitianMatrix& >::Type
665 operator-=(
const Matrix<MT2,SO2>& rhs );
667 template<
typename MT2 >
668 inline typename EnableIf< IsBuiltin<typename MT2::ElementType>, HermitianMatrix& >::Type
669 operator-=(
const Matrix<MT2,!SO>& rhs );
671 template<
typename MT2,
bool SO2 >
672 inline HermitianMatrix& operator*=(
const Matrix<MT2,SO2>& rhs );
674 template<
typename Other >
675 inline typename EnableIf< IsNumeric<Other>, HermitianMatrix >::Type&
676 operator*=( Other rhs );
678 template<
typename Other >
679 inline typename EnableIf< IsNumeric<Other>, HermitianMatrix >::Type&
680 operator/=( Other rhs );
687 inline size_t rows()
const;
691 inline size_t capacity(
size_t i )
const;
693 inline size_t nonZeros(
size_t i )
const;
695 inline void reset(
size_t i );
697 void resize (
size_t n,
bool preserve=
true );
698 inline void extend (
size_t n,
bool preserve=
true );
699 inline void reserve(
size_t elements );
702 template<
typename Other >
inline HermitianMatrix& scale(
const Other& scalar );
703 inline void swap( HermitianMatrix& m ) ;
717 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
718 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
720 inline bool isAligned ()
const;
721 inline bool canSMPAssign()
const;
727 inline void store (
size_t i,
size_t j,
const IntrinsicType& value );
728 inline void storea(
size_t i,
size_t j,
const IntrinsicType& value );
729 inline void storeu(
size_t i,
size_t j,
const IntrinsicType& value );
730 inline void stream(
size_t i,
size_t j,
const IntrinsicType& value );
738 template<
typename MT2,
bool SO2,
typename T >
739 inline const MT2& construct(
const Matrix<MT2,SO2>& m, T );
741 template<
typename MT2 >
742 inline typename TransExprTrait<MT2>::Type construct(
const Matrix<MT2,!SO>& m,
TrueType );
754 template<
typename MT2,
bool SO2,
bool DF2 >
755 friend bool isDefault(
const HermitianMatrix<MT2,SO2,DF2>& m );
757 template<
typename MT2,
bool SO2 >
758 friend void invert2x2( HermitianMatrix<MT2,SO2,true>& m );
760 template<
typename MT2,
bool SO2 >
761 friend void invert3x3( HermitianMatrix<MT2,SO2,true>& m );
763 template<
typename MT2,
bool SO2 >
764 friend void invert4x4( HermitianMatrix<MT2,SO2,true>& m );
766 template<
typename MT2,
bool SO2 >
767 friend void invert5x5( HermitianMatrix<MT2,SO2,true>& m );
769 template<
typename MT2,
bool SO2 >
770 friend void invert6x6( HermitianMatrix<MT2,SO2,true>& m );
772 template<
typename MT2,
bool SO2 >
773 friend void invertByLU( HermitianMatrix<MT2,SO2,true>& m );
775 template<
typename MT2,
bool SO2 >
776 friend void invertByLDLT( HermitianMatrix<MT2,SO2,true>& m );
778 template<
typename MT2,
bool SO2 >
779 friend void invertByLDLH( HermitianMatrix<MT2,SO2,true>& m );
781 template<
typename MT2,
bool SO2 >
782 friend void invertByLLH( HermitianMatrix<MT2,SO2,true>& m );
818 template<
typename MT
820 inline HermitianMatrix<MT,SO,true>::HermitianMatrix()
836 template<
typename MT
838 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
size_t n )
839 : matrix_( n, n, ElementType() )
871 template<
typename MT
873 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( ElementType* ptr,
size_t n )
874 : matrix_( ptr, n, n )
909 template<
typename MT
911 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( ElementType* ptr,
size_t n,
size_t nn )
912 : matrix_( ptr, n, n, nn )
945 template<
typename MT
947 template<
typename Deleter >
948 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( ElementType* ptr,
size_t n, Deleter d )
949 : matrix_( ptr, n, n, d )
983 template<
typename MT
985 template<
typename Deleter >
986 inline HermitianMatrix<MT,SO,true>::HermitianMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d )
987 : matrix_( ptr, n, n, nn, d )
1005 template<
typename MT
1007 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
const HermitianMatrix& m )
1008 : matrix_( m.matrix_ )
1027 template<
typename MT
1029 template<
typename MT2
1031 inline HermitianMatrix<MT,SO,true>::HermitianMatrix(
const Matrix<MT2,SO2>& m )
1032 : matrix_( construct( m, typename IsBuiltin<typename MT2::ElementType>::Type() ) )
1034 if( !IsHermitian<MT2>::value && !
isHermitian( matrix_ ) ) {
1068 template<
typename MT
1071 HermitianMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
1098 template<
typename MT
1101 HermitianMatrix<MT,SO,true>::operator()(
size_t i,
size_t j )
const
1106 return matrix_(i,j);
1129 template<
typename MT
1132 HermitianMatrix<MT,SO,true>::at(
size_t i,
size_t j )
1140 return (*
this)(i,j);
1163 template<
typename MT
1166 HermitianMatrix<MT,SO,true>::at(
size_t i,
size_t j )
const
1174 return (*
this)(i,j);
1194 template<
typename MT
1196 inline typename HermitianMatrix<MT,SO,true>::ConstPointer
1197 HermitianMatrix<MT,SO,true>::data()
const
1199 return matrix_.data();
1216 template<
typename MT
1218 inline typename HermitianMatrix<MT,SO,true>::ConstPointer
1219 HermitianMatrix<MT,SO,true>::data(
size_t i )
const
1221 return matrix_.data(i);
1239 template<
typename MT
1245 return Iterator( matrix_, 0UL, i );
1247 return Iterator( matrix_, i, 0UL );
1265 template<
typename MT
1270 return matrix_.begin(i);
1288 template<
typename MT
1293 return matrix_.cbegin(i);
1311 template<
typename MT
1337 template<
typename MT
1342 return matrix_.end(i);
1360 template<
typename MT
1365 return matrix_.cend(i);
1389 template<
typename MT
1391 inline HermitianMatrix<MT,SO,true>&
1392 HermitianMatrix<MT,SO,true>::operator=(
const HermitianMatrix& rhs )
1394 matrix_ = rhs.matrix_;
1418 template<
typename MT
1420 template<
typename MT2
1422 inline typename DisableIf< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >::Type
1423 HermitianMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1425 if( !IsHermitian<MT2>::value && !
isHermitian( ~rhs ) ) {
1453 template<
typename MT
1455 template<
typename MT2
1457 inline typename EnableIf< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >::Type
1458 HermitianMatrix<MT,SO,true>::operator=(
const Matrix<MT2,SO2>& rhs )
1460 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1464 if( IsHermitian<MT2>::value ) {
1474 move( matrix_, tmp );
1499 template<
typename MT
1501 template<
typename MT2 >
1502 inline typename EnableIf< IsBuiltin<typename MT2::ElementType>, HermitianMatrix<MT,SO,true>& >::Type
1503 HermitianMatrix<MT,SO,true>::operator=(
const Matrix<MT2,!SO>& rhs )
1505 return this->operator=(
trans( ~rhs ) );
1524 template<
typename MT
1526 template<
typename MT2
1528 inline typename DisableIf< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >::Type
1529 HermitianMatrix<MT,SO,true>::operator+=(
const Matrix<MT2,SO2>& rhs )
1531 if( !IsHermitian<MT2>::value && !
isHermitian( ~rhs ) ) {
1559 template<
typename MT
1561 template<
typename MT2
1563 inline typename EnableIf< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >::Type
1564 HermitianMatrix<MT,SO,true>::operator+=(
const Matrix<MT2,SO2>& rhs )
1566 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1570 if( IsHermitian<MT2>::value ) {
1606 template<
typename MT
1608 template<
typename MT2 >
1609 inline typename EnableIf< IsBuiltin<typename MT2::ElementType>, HermitianMatrix<MT,SO,true>& >::Type
1610 HermitianMatrix<MT,SO,true>::operator+=(
const Matrix<MT2,!SO>& rhs )
1612 return this->operator+=(
trans( ~rhs ) );
1631 template<
typename MT
1633 template<
typename MT2
1635 inline typename DisableIf< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >::Type
1636 HermitianMatrix<MT,SO,true>::operator-=(
const Matrix<MT2,SO2>& rhs )
1638 if( !IsHermitian<MT2>::value && !
isHermitian( ~rhs ) ) {
1666 template<
typename MT
1668 template<
typename MT2
1670 inline typename EnableIf< IsComputation<MT2>, HermitianMatrix<MT,SO,true>& >::Type
1671 HermitianMatrix<MT,SO,true>::operator-=(
const Matrix<MT2,SO2>& rhs )
1673 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1677 if( IsHermitian<MT2>::value ) {
1713 template<
typename MT
1715 template<
typename MT2 >
1716 inline typename EnableIf< IsBuiltin<typename MT2::ElementType>, HermitianMatrix<MT,SO,true>& >::Type
1717 HermitianMatrix<MT,SO,true>::operator-=(
const Matrix<MT2,!SO>& rhs )
1719 return this->operator-=(
trans( ~rhs ) );
1737 template<
typename MT
1739 template<
typename MT2
1741 inline HermitianMatrix<MT,SO,true>&
1742 HermitianMatrix<MT,SO,true>::operator*=(
const Matrix<MT2,SO2>& rhs )
1744 if( matrix_.rows() != (~rhs).
columns() ) {
1748 MT tmp( matrix_ * ~rhs );
1754 move( matrix_, tmp );
1773 template<
typename MT
1775 template<
typename Other >
1776 inline typename EnableIf< IsNumeric<Other>, HermitianMatrix<MT,SO,true> >::Type&
1777 HermitianMatrix<MT,SO,true>::operator*=( Other rhs )
1793 template<
typename MT
1795 template<
typename Other >
1796 inline typename EnableIf< IsNumeric<Other>, HermitianMatrix<MT,SO,true> >::Type&
1797 HermitianMatrix<MT,SO,true>::operator/=( Other rhs )
1822 template<
typename MT
1826 return matrix_.rows();
1838 template<
typename MT
1842 return matrix_.columns();
1860 template<
typename MT
1864 return matrix_.spacing();
1876 template<
typename MT
1880 return matrix_.capacity();
1897 template<
typename MT
1901 return matrix_.capacity(i);
1913 template<
typename MT
1917 return matrix_.nonZeros();
1935 template<
typename MT
1939 return matrix_.nonZeros(i);
1951 template<
typename MT
1997 template<
typename MT
2001 row ( matrix_, i ).reset();
2002 column( matrix_, i ).reset();
2020 template<
typename MT
2067 template<
typename MT
2077 const size_t oldsize( matrix_.rows() );
2079 matrix_.resize( n, n,
true );
2082 const size_t increment( n - oldsize );
2083 submatrix( matrix_, 0UL, oldsize, oldsize, increment ).reset();
2084 submatrix( matrix_, oldsize, 0UL, increment, n ).reset();
2104 template<
typename MT
2106 inline void HermitianMatrix<MT,SO,true>::extend(
size_t n,
bool preserve )
2127 template<
typename MT
2129 inline void HermitianMatrix<MT,SO,true>::reserve(
size_t elements )
2131 matrix_.reserve( elements );
2143 template<
typename MT
2147 if( IsComplex<ElementType>::value )
2148 matrix_.transpose();
2161 template<
typename MT
2178 template<
typename MT
2180 template<
typename Other >
2181 inline HermitianMatrix<MT,SO,true>&
2182 HermitianMatrix<MT,SO,true>::scale(
const Other& scalar )
2184 matrix_.scale( scalar );
2199 template<
typename MT
2205 swap( matrix_, m.matrix_ );
2229 template<
typename MT
2260 template<
typename MT
2262 template<
typename Other >
2263 inline bool HermitianMatrix<MT,SO,true>::canAlias(
const Other* alias )
const
2265 return matrix_.canAlias( alias );
2282 template<
typename MT
2284 template<
typename Other >
2285 inline bool HermitianMatrix<MT,SO,true>::isAliased(
const Other* alias )
const
2287 return matrix_.isAliased( alias );
2303 template<
typename MT
2305 inline bool HermitianMatrix<MT,SO,true>::isAligned()
const
2307 return matrix_.isAligned();
2324 template<
typename MT
2326 inline bool HermitianMatrix<MT,SO,true>::canSMPAssign()
const
2328 return matrix_.canSMPAssign();
2350 template<
typename MT
2353 HermitianMatrix<MT,SO,true>::load(
size_t i,
size_t j )
const
2355 return matrix_.load( i, j );
2377 template<
typename MT
2382 return matrix_.loada( i, j );
2404 template<
typename MT
2409 return matrix_.loadu( i, j );
2432 template<
typename MT
2434 inline void HermitianMatrix<MT,SO,true>::store(
size_t i,
size_t j,
const IntrinsicType& value )
2436 matrix_.store( i, j, value );
2440 for(
size_t k=i; k<kend; ++k )
2441 matrix_(j,k) =
conj( matrix_(k,j) );
2445 for(
size_t k=j; k<kend; ++k )
2446 matrix_(k,i) =
conj( matrix_(i,k) );
2470 template<
typename MT
2474 matrix_.storea( i, j, value );
2478 for(
size_t k=i; k<kend; ++k )
2479 matrix_(j,k) =
conj( matrix_(k,j) );
2483 for(
size_t k=j; k<kend; ++k )
2484 matrix_(k,i) =
conj( matrix_(i,k) );
2508 template<
typename MT
2512 matrix_.storeu( i, j, value );
2516 for(
size_t k=i; k<kend; ++k )
2517 matrix_(j,k) =
conj( matrix_(k,j) );
2521 for(
size_t k=j; k<kend; ++k )
2522 matrix_(k,i) =
conj( matrix_(i,k) );
2546 template<
typename MT
2550 matrix_.stream( i, j, value );
2554 for(
size_t k=i; k<kend; ++k )
2555 matrix_(j,k) =
conj( matrix_(k,j) );
2559 for(
size_t k=j; k<kend; ++k )
2560 matrix_(k,i) =
conj( matrix_(i,k) );
2577 template<
typename MT
2579 template<
typename MT2
2582 inline const MT2& HermitianMatrix<MT,SO,true>::construct(
const Matrix<MT2,SO2>& m, T )
2592 template<
typename MT
2594 template<
typename MT2 >
2595 inline typename TransExprTrait<MT2>::Type
2596 HermitianMatrix<MT,SO,true>::construct(
const Matrix<MT2,!SO>& m,
TrueType )
Header file for all restructuring submatrix functions.
#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:116
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exceptionThis macro encapsulates the default way of...
Definition: Exception.h:187
Constraint on the data type.
Header file for mathematical functions.
#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 Rows type trait.
Header file for the UNUSED_PARAMETER function template.
const DMatDMatMultExpr< T1, T2 > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:7820
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix)
Checks if the given matrix is a square matrix.
Definition: Matrix.h:603
BLAZE_ALWAYS_INLINE MT::ConstIterator cbegin(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:229
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:252
BLAZE_ALWAYS_INLINE MT::ConstIterator cend(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:292
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:404
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:250
#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:81
#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:79
Constraint on the data type.
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:507
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2588
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix)
Returns the maximum capacity of the matrix.
Definition: Matrix.h:340
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:308
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:4926
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename ColumnExprTrait< MT >::Type >::Type column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:107
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:81
bool operator>(const NegativeAccuracy< A > &lhs, const T &rhs)
Greater-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:366
BLAZE_ALWAYS_INLINE void ctranspose(Matrix< MT, SO > &matrix)
In-place conjugate transpose of the given matrix.
Definition: Matrix.h:584
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2582
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:442
#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:116
BLAZE_ALWAYS_INLINE size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:378
void move(CustomMatrix< Type, AF, PF, SO > &dst, CustomMatrix< Type, AF, PF, SO > &src)
Moving the contents of one custom matrix to another.
Definition: CustomMatrix.h:6085
Constraint on the data type.
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2584
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:547
Constraint on the data type.
Header file for the DenseColumn class template.
Constraint on the data type.
ConjExprTrait< typename DiagonalProxy< MT >::RepresentedType >::Type conj(const DiagonalProxy< MT > &proxy)
Computing the complex conjugate of the represented element.
Definition: DiagonalProxy.h:487
Header file for the IsSquare type trait.
Constraint on the data type.
Header file for the DenseSubmatrix class template.
Header file for the DisableIf class template.
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, simd_int16_t >::Type loadu(const T *address)
Loads a vector of 2-byte integral values.
Definition: Loadu.h:74
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for the If class template.
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b)
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:4998
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:4980
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type storeu(T *address, const simd_int16_t &value)
Unaligned store of a vector of 2-byte integral values.
Definition: Storeu.h:75
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
#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:116
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exceptionThis macro encapsulates the default way of Bla...
Definition: Exception.h:331
const DenseIterator< Type, AF > operator+(const DenseIterator< Type, AF > &it, ptrdiff_t inc)
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:610
const MT::ElementType min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1682
Header file for the DenseMatrix base class.
Header file for the Columns type trait.
Constraint on the data type.
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc)
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:642
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2585
Constraints on the storage order of matrix types.
#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:118
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:187
BLAZE_ALWAYS_INLINE void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:532
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2586
Header file for all forward declarations for expression class templates.
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2590
Header file for the EnableIf class template.
Header file for utility functions for dense matrices.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:527
Header file for all restructuring column functions.
Header file for the conjugate shim.
Header file for the IsNumeric type trait.
const bool spacing
Adding an additional spacing line between two log messages.This setting gives the opportunity to add ...
Definition: Logging.h:70
Header file for the implementation of the base template of the HeritianMatrix.
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename RowExprTrait< MT >::Type >::Type row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:107
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, simd_int16_t >::Type loada(const T *address)
Loads a vector of 2-byte integral values.
Definition: Loada.h:77
#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:116
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2587
Header file for run time assertion macros.
Header file for the DenseRow class template.
Constraint on the data type.
Constraint on the data type.
#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:79
#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:118
#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:116
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2591
Header file for the TransExprTrait class template.
Constraint on the data type.
Constraint on the data type.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b)
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:256
Header file for all intrinsic functionality.
Header file for the move shim.
SubmatrixExprTrait< MT, unaligned >::Type submatrix(Matrix< MT, SO > &matrix, size_t row, size_t column, size_t m, size_t n)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:146
bool operator<(const NegativeAccuracy< A > &lhs, const T &rhs)
Less-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:328
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE(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:79
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:944
Header file for the IsComputation type trait class.
Header file for the IsBuiltin type trait.
bool isHermitian(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is Hermitian.
Definition: DenseMatrix.h:767
#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:118
Header file for the HermitianProxy class.
bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:249
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2583
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type stream(T *address, const simd_int16_t &value)
Aligned, non-temporal store of a vector of 2-byte integral values.
Definition: Stream.h:74
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:324
bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:289
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:237
Header file for the IsComplex type trait.
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2589
#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:116
Header file for exception macros.
boost::true_type TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
#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:143
Header file for the IsHermitian type trait.
System settings for the inline keywords.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for all restructuring row functions.
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > > >::Type storea(T *address, const simd_int16_t &value)
Aligned store of a vector of 2-byte integral values.
Definition: Storea.h:78
Header file for the TrueType type/value trait base class.
BLAZE_ALWAYS_INLINE void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:558