35 #ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_DENSENUMERIC_H_
36 #define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_DENSENUMERIC_H_
108 template<
typename MT
110 class SymmetricMatrix<MT,SO,true,true>
111 :
public DenseMatrix< SymmetricMatrix<MT,SO,true,true>, SO >
118 typedef IntrinsicTrait<ET> IT;
123 typedef SymmetricMatrix<MT,SO,true,true>
This;
128 typedef typename MT::IntrinsicType IntrinsicType;
133 typedef typename MT::Pointer Pointer;
134 typedef typename MT::ConstPointer ConstPointer;
141 template<
typename ET >
144 typedef SymmetricMatrix< typename MT::template Rebind<ET>::Other > Other;
155 typedef std::random_access_iterator_tag IteratorCategory;
157 typedef NumericProxy<MT> PointerType;
158 typedef NumericProxy<MT> ReferenceType;
159 typedef ptrdiff_t DifferenceType;
162 typedef IteratorCategory iterator_category;
163 typedef ValueType value_type;
164 typedef PointerType pointer;
165 typedef ReferenceType reference;
166 typedef DifferenceType difference_type;
199 inline Iterator& operator+=(
size_t inc ) {
200 ( SO )?( row_ += inc ):( column_ += inc );
211 inline Iterator& operator-=(
size_t dec ) {
212 ( SO )?( row_ -= dec ):( column_ -= dec );
223 ( SO )?( ++row_ ):( ++column_ );
233 inline const Iterator operator++(
int ) {
246 ( SO )?( --row_ ):( --column_ );
256 inline const Iterator operator--(
int ) {
269 return ReferenceType( *matrix_, row_, column_ );
278 inline PointerType operator->()
const {
279 return PointerType( *matrix_, row_, column_ );
290 return matrix_->begin( column_ ) + row_;
292 return matrix_->begin( row_ ) + column_;
304 return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
340 return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
376 return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
412 return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
448 return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
484 return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
519 return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
532 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
534 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
547 return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
549 return Iterator( *it.matrix_, it.row_, it.column_ + inc );
562 return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
564 return Iterator( *it.matrix_, it.row_, it.column_ - dec );
579 enum { vectorizable = MT::vectorizable };
582 enum { smpAssignable = MT::smpAssignable };
588 explicit inline SymmetricMatrix();
589 explicit inline SymmetricMatrix(
size_t n );
591 explicit inline SymmetricMatrix( ElementType* ptr,
size_t n );
592 explicit inline SymmetricMatrix( ElementType* ptr,
size_t n,
size_t nn );
594 template<
typename Deleter >
595 explicit inline SymmetricMatrix( ElementType* ptr,
size_t n, Deleter d );
597 template<
typename Deleter >
598 explicit inline SymmetricMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d );
600 inline SymmetricMatrix(
const SymmetricMatrix& m );
601 template<
typename MT2 >
inline SymmetricMatrix(
const Matrix<MT2,SO>& m );
602 template<
typename MT2 >
inline SymmetricMatrix(
const Matrix<MT2,!SO>& m );
613 inline Reference operator()(
size_t i,
size_t j );
614 inline ConstReference operator()(
size_t i,
size_t j )
const;
615 inline Reference at(
size_t i,
size_t j );
616 inline ConstReference at(
size_t i,
size_t j )
const;
617 inline ConstPointer data ()
const;
618 inline ConstPointer data (
size_t i )
const;
620 inline ConstIterator
begin (
size_t i )
const;
621 inline ConstIterator
cbegin(
size_t i )
const;
623 inline ConstIterator
end (
size_t i )
const;
624 inline ConstIterator
cend (
size_t i )
const;
631 inline SymmetricMatrix& operator=(
const SymmetricMatrix& rhs );
633 template<
typename MT2 >
634 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
635 operator=(
const Matrix<MT2,SO>& rhs );
637 template<
typename MT2 >
638 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
639 operator=(
const Matrix<MT2,SO>& rhs );
641 template<
typename MT2 >
642 inline SymmetricMatrix& operator=(
const Matrix<MT2,!SO>& rhs );
644 template<
typename MT2 >
645 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
646 operator+=(
const Matrix<MT2,SO>& rhs );
648 template<
typename MT2 >
649 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
650 operator+=(
const Matrix<MT2,SO>& rhs );
652 template<
typename MT2 >
653 inline SymmetricMatrix& operator+=(
const Matrix<MT2,!SO>& rhs );
655 template<
typename MT2 >
656 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
657 operator-=(
const Matrix<MT2,SO>& rhs );
659 template<
typename MT2 >
660 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
661 operator-=(
const Matrix<MT2,SO>& rhs );
663 template<
typename MT2 >
664 inline SymmetricMatrix& operator-=(
const Matrix<MT2,!SO>& rhs );
666 template<
typename MT2,
bool SO2 >
667 inline SymmetricMatrix& operator*=(
const Matrix<MT2,SO2>& rhs );
669 template<
typename Other >
670 inline typename EnableIf< IsNumeric<Other>, SymmetricMatrix >::Type&
671 operator*=( Other rhs );
673 template<
typename Other >
674 inline typename EnableIf< IsNumeric<Other>, SymmetricMatrix >::Type&
675 operator/=( Other rhs );
682 inline size_t rows()
const;
686 inline size_t capacity(
size_t i )
const;
688 inline size_t nonZeros(
size_t i )
const;
690 inline void reset(
size_t i );
692 void resize (
size_t n,
bool preserve=
true );
693 inline void extend (
size_t n,
bool preserve=
true );
694 inline void reserve(
size_t elements );
697 template<
typename Other >
inline SymmetricMatrix& scale(
const Other& scalar );
698 inline void swap( SymmetricMatrix& m ) ;
712 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
713 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
715 inline bool isAligned ()
const;
716 inline bool canSMPAssign()
const;
722 inline void store (
size_t i,
size_t j,
const IntrinsicType& value );
723 inline void storea(
size_t i,
size_t j,
const IntrinsicType& value );
724 inline void storeu(
size_t i,
size_t j,
const IntrinsicType& value );
725 inline void stream(
size_t i,
size_t j,
const IntrinsicType& value );
738 template<
typename MT2,
bool SO2,
bool DF2,
bool NF2 >
739 friend bool isDefault(
const SymmetricMatrix<MT2,SO2,DF2,NF2>& m );
741 template<
typename MT2,
bool SO2 >
742 friend void invert2x2( SymmetricMatrix<MT2,SO2,true,true>& m );
744 template<
typename MT2,
bool SO2 >
745 friend void invert3x3( SymmetricMatrix<MT2,SO2,true,true>& m );
747 template<
typename MT2,
bool SO2 >
748 friend void invert4x4( SymmetricMatrix<MT2,SO2,true,true>& m );
750 template<
typename MT2,
bool SO2 >
751 friend void invert5x5( SymmetricMatrix<MT2,SO2,true,true>& m );
753 template<
typename MT2,
bool SO2 >
754 friend void invert6x6( SymmetricMatrix<MT2,SO2,true,true>& m );
756 template<
typename MT2,
bool SO2 >
757 friend void invertByLU( SymmetricMatrix<MT2,SO2,true,true>& m );
759 template<
typename MT2,
bool SO2 >
760 friend void invertByLDLT( SymmetricMatrix<MT2,SO2,true,true>& m );
762 template<
typename MT2,
bool SO2 >
763 friend void invertByLDLH( SymmetricMatrix<MT2,SO2,true,true>& m );
765 template<
typename MT2,
bool SO2 >
766 friend void invertByLLH( SymmetricMatrix<MT2,SO2,true,true>& m );
802 template<
typename MT
804 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix()
820 template<
typename MT
822 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
size_t n )
823 : matrix_( n, n, ElementType() )
855 template<
typename MT
857 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix( ElementType* ptr,
size_t n )
858 : matrix_( ptr, n, n )
893 template<
typename MT
895 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix( ElementType* ptr,
size_t n,
size_t nn )
896 : matrix_( ptr, n, n, nn )
929 template<
typename MT
931 template<
typename Deleter >
932 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix( ElementType* ptr,
size_t n, Deleter d )
933 : matrix_( ptr, n, n, d )
967 template<
typename MT
969 template<
typename Deleter >
970 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix( ElementType* ptr,
size_t n,
size_t nn, Deleter d )
971 : matrix_( ptr, n, n, nn, d )
989 template<
typename MT
991 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
const SymmetricMatrix& m )
992 : matrix_( m.matrix_ )
1011 template<
typename MT
1013 template<
typename MT2 >
1014 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
const Matrix<MT2,SO>& m )
1017 if( !IsSymmetric<MT2>::value && !
isSymmetric( matrix_ ) ) {
1038 template<
typename MT
1040 template<
typename MT2 >
1041 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
const Matrix<MT2,!SO>& m )
1042 : matrix_(
trans( ~m ) )
1044 if( !IsSymmetric<MT2>::value && !
isSymmetric( matrix_ ) ) {
1078 template<
typename MT
1081 SymmetricMatrix<MT,SO,true,true>::operator()(
size_t i,
size_t j )
1107 template<
typename MT
1110 SymmetricMatrix<MT,SO,true,true>::operator()(
size_t i,
size_t j )
const
1115 return matrix_(i,j);
1137 template<
typename MT
1140 SymmetricMatrix<MT,SO,true,true>::at(
size_t i,
size_t j )
1148 return (*
this)(i,j);
1170 template<
typename MT
1173 SymmetricMatrix<MT,SO,true,true>::at(
size_t i,
size_t j )
const
1181 return (*
this)(i,j);
1201 template<
typename MT
1203 inline typename SymmetricMatrix<MT,SO,true,true>::ConstPointer
1204 SymmetricMatrix<MT,SO,true,true>::data()
const
1206 return matrix_.data();
1223 template<
typename MT
1225 inline typename SymmetricMatrix<MT,SO,true,true>::ConstPointer
1226 SymmetricMatrix<MT,SO,true,true>::data(
size_t i )
const
1228 return matrix_.data(i);
1246 template<
typename MT
1252 return Iterator( matrix_, 0UL, i );
1254 return Iterator( matrix_, i, 0UL );
1272 template<
typename MT
1277 return matrix_.begin(i);
1295 template<
typename MT
1300 return matrix_.cbegin(i);
1318 template<
typename MT
1344 template<
typename MT
1349 return matrix_.end(i);
1367 template<
typename MT
1372 return matrix_.cend(i);
1396 template<
typename MT
1398 inline SymmetricMatrix<MT,SO,true,true>&
1399 SymmetricMatrix<MT,SO,true,true>::operator=(
const SymmetricMatrix& rhs )
1401 matrix_ = rhs.matrix_;
1425 template<
typename MT
1427 template<
typename MT2 >
1428 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >::Type
1429 SymmetricMatrix<MT,SO,true,true>::operator=(
const Matrix<MT2,SO>& rhs )
1431 if( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) {
1459 template<
typename MT
1461 template<
typename MT2 >
1462 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >::Type
1463 SymmetricMatrix<MT,SO,true,true>::operator=(
const Matrix<MT2,SO>& rhs )
1465 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1469 if( IsSymmetric<MT2>::value ) {
1479 move( matrix_, tmp );
1504 template<
typename MT
1506 template<
typename MT2 >
1507 inline SymmetricMatrix<MT,SO,true,true>&
1508 SymmetricMatrix<MT,SO,true,true>::operator=(
const Matrix<MT2,!SO>& rhs )
1510 return this->operator=(
trans( ~rhs ) );
1529 template<
typename MT
1531 template<
typename MT2 >
1532 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >::Type
1533 SymmetricMatrix<MT,SO,true,true>::operator+=(
const Matrix<MT2,SO>& rhs )
1535 if( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) {
1563 template<
typename MT
1565 template<
typename MT2 >
1566 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >::Type
1567 SymmetricMatrix<MT,SO,true,true>::operator+=(
const Matrix<MT2,SO>& rhs )
1569 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1573 if( IsSymmetric<MT2>::value ) {
1609 template<
typename MT
1611 template<
typename MT2 >
1612 inline SymmetricMatrix<MT,SO,true,true>&
1613 SymmetricMatrix<MT,SO,true,true>::operator+=(
const Matrix<MT2,!SO>& rhs )
1615 return this->operator+=(
trans( ~rhs ) );
1634 template<
typename MT
1636 template<
typename MT2 >
1637 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >::Type
1638 SymmetricMatrix<MT,SO,true,true>::operator-=(
const Matrix<MT2,SO>& rhs )
1640 if( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) {
1668 template<
typename MT
1670 template<
typename MT2 >
1671 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >::Type
1672 SymmetricMatrix<MT,SO,true,true>::operator-=(
const Matrix<MT2,SO>& rhs )
1674 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1678 if( IsSymmetric<MT2>::value ) {
1714 template<
typename MT
1716 template<
typename MT2 >
1717 inline SymmetricMatrix<MT,SO,true,true>&
1718 SymmetricMatrix<MT,SO,true,true>::operator-=(
const Matrix<MT2,!SO>& rhs )
1720 return this->operator-=(
trans( ~rhs ) );
1738 template<
typename MT
1740 template<
typename MT2
1742 inline SymmetricMatrix<MT,SO,true,true>&
1743 SymmetricMatrix<MT,SO,true,true>::operator*=(
const Matrix<MT2,SO2>& rhs )
1745 if( matrix_.rows() != (~rhs).
columns() ) {
1749 MT tmp( matrix_ * ~rhs );
1755 move( matrix_, tmp );
1774 template<
typename MT
1776 template<
typename Other >
1777 inline typename EnableIf< IsNumeric<Other>, SymmetricMatrix<MT,SO,true,true> >::Type&
1778 SymmetricMatrix<MT,SO,true,true>::operator*=( Other rhs )
1794 template<
typename MT
1796 template<
typename Other >
1797 inline typename EnableIf< IsNumeric<Other>, SymmetricMatrix<MT,SO,true,true> >::Type&
1798 SymmetricMatrix<MT,SO,true,true>::operator/=( Other rhs )
1823 template<
typename MT
1827 return matrix_.rows();
1839 template<
typename MT
1843 return matrix_.columns();
1861 template<
typename MT
1865 return matrix_.spacing();
1877 template<
typename MT
1881 return matrix_.capacity();
1898 template<
typename MT
1902 return matrix_.capacity(i);
1914 template<
typename MT
1918 return matrix_.nonZeros();
1936 template<
typename MT
1940 return matrix_.nonZeros(i);
1952 template<
typename MT
1998 template<
typename MT
2002 row ( matrix_, i ).reset();
2003 column( matrix_, i ).reset();
2021 template<
typename MT
2068 template<
typename MT
2078 const size_t oldsize( matrix_.rows() );
2080 matrix_.resize( n, n,
true );
2083 const size_t increment( n - oldsize );
2084 submatrix( matrix_, 0UL, oldsize, oldsize, increment ).reset();
2085 submatrix( matrix_, oldsize, 0UL, increment, n ).reset();
2105 template<
typename MT
2107 inline void SymmetricMatrix<MT,SO,true,true>::extend(
size_t n,
bool preserve )
2128 template<
typename MT
2130 inline void SymmetricMatrix<MT,SO,true,true>::reserve(
size_t elements )
2132 matrix_.reserve( elements );
2144 template<
typename MT
2160 template<
typename MT
2164 if( !IsBuiltin<ElementType>::value )
2180 template<
typename MT
2182 template<
typename Other >
2183 inline SymmetricMatrix<MT,SO,true,true>&
2184 SymmetricMatrix<MT,SO,true,true>::scale(
const Other& scalar )
2186 matrix_.scale( scalar );
2201 template<
typename MT
2207 swap( matrix_, m.matrix_ );
2231 template<
typename MT
2262 template<
typename MT
2264 template<
typename Other >
2265 inline bool SymmetricMatrix<MT,SO,true,true>::canAlias(
const Other* alias )
const
2267 return matrix_.canAlias( alias );
2284 template<
typename MT
2286 template<
typename Other >
2287 inline bool SymmetricMatrix<MT,SO,true,true>::isAliased(
const Other* alias )
const
2289 return matrix_.isAliased( alias );
2305 template<
typename MT
2307 inline bool SymmetricMatrix<MT,SO,true,true>::isAligned()
const
2309 return matrix_.isAligned();
2326 template<
typename MT
2328 inline bool SymmetricMatrix<MT,SO,true,true>::canSMPAssign()
const
2330 return matrix_.canSMPAssign();
2352 template<
typename MT
2355 SymmetricMatrix<MT,SO,true,true>::load(
size_t i,
size_t j )
const
2357 return matrix_.load( i, j );
2379 template<
typename MT
2384 return matrix_.loada( i, j );
2406 template<
typename MT
2411 return matrix_.loadu( i, j );
2434 template<
typename MT
2436 inline void SymmetricMatrix<MT,SO,true,true>::store(
size_t i,
size_t j,
const IntrinsicType& value )
2438 matrix_.store( i, j, value );
2442 for(
size_t k=i; k<kend; ++k )
2443 matrix_(j,k) = matrix_(k,j);
2447 for(
size_t k=j; k<kend; ++k )
2448 matrix_(k,i) = matrix_(i,k);
2472 template<
typename MT
2476 matrix_.storea( i, j, value );
2480 for(
size_t k=i; k<kend; ++k )
2481 matrix_(j,k) = matrix_(k,j);
2485 for(
size_t k=j; k<kend; ++k )
2486 matrix_(k,i) = matrix_(i,k);
2510 template<
typename MT
2514 matrix_.storeu( i, j, value );
2518 for(
size_t k=i; k<kend; ++k )
2519 matrix_(j,k) = matrix_(k,j);
2523 for(
size_t k=j; k<kend; ++k )
2524 matrix_(k,i) = matrix_(i,k);
2548 template<
typename MT
2552 matrix_.stream( i, j, value );
2556 for(
size_t k=i; k<kend; ++k )
2557 matrix_(j,k) = matrix_(k,j);
2561 for(
size_t k=j; k<kend; ++k )
2562 matrix_(k,i) = matrix_(i,k);
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
void move(CompressedMatrix< Type, SO > &dst, CompressedMatrix< Type, SO > &src)
Moving the contents of one compressed matrix to another.
Definition: CompressedMatrix.h:5016
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.
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition: DenseMatrix.h:697
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
Constraint on the data type.
Header file for the NumericProxy class.
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2584
Header file for the implementation of the base template of the SymmetricMatrix.
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.
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 IsSymmetric type trait.
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.
BLAZE_ALWAYS_INLINE void conjugate(T &a)
In-place conjugation of the given value/object.
Definition: Conjugate.h:120
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
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
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.
#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
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
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.
#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
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
BLAZE_ALWAYS_INLINE void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:558