35 #ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_DENSENUMERIC_H_
36 #define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_DENSENUMERIC_H_
104 template<
typename MT
106 class SymmetricMatrix<MT,SO,true,true>
107 :
public DenseMatrix< SymmetricMatrix<MT,SO,true,true>, SO >
114 typedef IntrinsicTrait<ET> IT;
119 typedef SymmetricMatrix<MT,SO,true,true>
This;
124 typedef typename MT::IntrinsicType IntrinsicType;
129 typedef typename MT::Pointer Pointer;
130 typedef typename MT::ConstPointer ConstPointer;
137 template<
typename ET >
140 typedef SymmetricMatrix< typename MT::template Rebind<ET>::Other > Other;
151 typedef std::random_access_iterator_tag IteratorCategory;
153 typedef NumericProxy<MT> PointerType;
154 typedef NumericProxy<MT> ReferenceType;
155 typedef ptrdiff_t DifferenceType;
158 typedef IteratorCategory iterator_category;
159 typedef ValueType value_type;
160 typedef PointerType pointer;
161 typedef ReferenceType reference;
162 typedef DifferenceType difference_type;
182 inline RowIterator( MT& matrix,
size_t row,
size_t column )
195 inline RowIterator& operator+=(
size_t inc ) {
207 inline RowIterator& operator-=(
size_t dec ) {
218 inline RowIterator& operator++() {
229 inline const RowIterator operator++(
int ) {
230 const RowIterator tmp( *
this );
241 inline RowIterator& operator--() {
252 inline const RowIterator operator--(
int ) {
253 const RowIterator tmp( *
this );
265 return ReferenceType( *matrix_, row_, column_ );
274 inline PointerType operator->()
const {
275 return PointerType( *matrix_, row_, column_ );
285 return matrix_->begin(row_) + column_;
296 friend inline bool operator==(
const RowIterator& lhs,
const RowIterator& rhs ) {
297 return ( lhs.column_ == rhs.column_ );
332 friend inline bool operator!=(
const RowIterator& lhs,
const RowIterator& rhs ) {
333 return ( lhs.column_ != rhs.column_ );
368 friend inline bool operator<(
const RowIterator& lhs,
const RowIterator& rhs ) {
369 return ( lhs.column_ < rhs.column_ );
404 friend inline bool operator>(
const RowIterator& lhs,
const RowIterator& rhs ) {
405 return ( lhs.column_ > rhs.column_ );
440 friend inline bool operator<=(
const RowIterator& lhs,
const RowIterator& rhs ) {
441 return ( lhs.column_ <= rhs.column_ );
476 friend inline bool operator>=(
const RowIterator& lhs,
const RowIterator& rhs ) {
477 return ( lhs.column_ >= rhs.column_ );
511 inline DifferenceType
operator-(
const RowIterator& rhs )
const {
512 return ( column_ - rhs.column_ );
523 friend inline const RowIterator
operator+(
const RowIterator& it,
size_t inc ) {
524 return RowIterator( *it.matrix_, it.row_, it.column_ + inc );
535 friend inline const RowIterator
operator+(
size_t inc,
const RowIterator& it ) {
536 return RowIterator( *it.matrix_, it.row_, it.column_ + inc );
547 friend inline const RowIterator
operator-(
const RowIterator& it,
size_t dec ) {
548 return RowIterator( *it.matrix_, it.row_, it.column_ - dec );
568 typedef std::random_access_iterator_tag IteratorCategory;
570 typedef NumericProxy<MT> PointerType;
571 typedef NumericProxy<MT> ReferenceType;
572 typedef ptrdiff_t DifferenceType;
575 typedef IteratorCategory iterator_category;
576 typedef ValueType value_type;
577 typedef PointerType pointer;
578 typedef ReferenceType reference;
579 typedef DifferenceType difference_type;
585 inline ColumnIterator()
599 inline ColumnIterator( MT& matrix,
size_t row,
size_t column )
612 inline ColumnIterator& operator+=(
size_t inc ) {
624 inline ColumnIterator& operator-=(
size_t dec ) {
635 inline ColumnIterator& operator++() {
646 inline const ColumnIterator operator++(
int ) {
647 const ColumnIterator tmp( *
this );
658 inline ColumnIterator& operator--() {
669 inline const ColumnIterator operator--(
int ) {
670 const ColumnIterator tmp( *
this );
682 return ReferenceType( *matrix_, row_, column_ );
691 inline PointerType operator->()
const {
692 return PointerType( *matrix_, row_, column_ );
702 return matrix_->begin(column_) + row_;
713 friend inline bool operator==(
const ColumnIterator& lhs,
const ColumnIterator& rhs ) {
714 return ( lhs.row_ == rhs.row_ );
749 friend inline bool operator!=(
const ColumnIterator& lhs,
const ColumnIterator& rhs ) {
750 return ( lhs.row_ != rhs.row_ );
785 friend inline bool operator<(
const ColumnIterator& lhs,
const ColumnIterator& rhs ) {
786 return ( lhs.row_ < rhs.row_ );
821 friend inline bool operator>(
const ColumnIterator& lhs,
const ColumnIterator& rhs ) {
822 return ( lhs.row_ > rhs.row_ );
857 friend inline bool operator<=(
const ColumnIterator& lhs,
const ColumnIterator& rhs ) {
858 return ( lhs.row_ <= rhs.row_ );
893 friend inline bool operator>=(
const ColumnIterator& lhs,
const ColumnIterator& rhs ) {
894 return ( lhs.row_ >= rhs.row_ );
928 inline DifferenceType
operator-(
const ColumnIterator& rhs )
const {
929 return ( row_ - rhs.row_ );
940 friend inline const ColumnIterator
operator+(
const ColumnIterator& it,
size_t inc ) {
941 return ColumnIterator( *it.matrix_, it.row_ + inc, it.column_ );
952 friend inline const ColumnIterator
operator+(
size_t inc,
const ColumnIterator& it ) {
953 return ColumnIterator( *it.matrix_, it.row_ + inc, it.column_ );
964 friend inline const ColumnIterator
operator-(
const ColumnIterator& it,
size_t dec ) {
965 return ColumnIterator( *it.matrix_, it.row_ - dec, it.column_ );
980 typedef typename IfTrue< SO, ColumnIterator, RowIterator >::Type
Iterator;
985 enum { vectorizable = MT::vectorizable };
988 enum { smpAssignable = 0 };
994 explicit inline SymmetricMatrix();
995 explicit inline SymmetricMatrix(
size_t n );
997 inline SymmetricMatrix(
const SymmetricMatrix& m );
998 template<
typename MT2 >
inline SymmetricMatrix(
const Matrix<MT2,SO>& m );
999 template<
typename MT2 >
inline SymmetricMatrix(
const Matrix<MT2,!SO>& m );
1010 inline Reference operator()(
size_t i,
size_t j );
1012 inline ConstPointer data ()
const;
1013 inline ConstPointer data (
size_t i )
const;
1026 inline SymmetricMatrix& operator=(
const SymmetricMatrix& rhs );
1028 template<
typename MT2 >
1029 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
1030 operator=(
const Matrix<MT2,SO>& rhs );
1032 template<
typename MT2 >
1033 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
1034 operator=(
const Matrix<MT2,SO>& rhs );
1036 template<
typename MT2 >
1037 inline SymmetricMatrix& operator=(
const Matrix<MT2,!SO>& rhs );
1039 template<
typename MT2 >
1040 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
1041 operator+=(
const Matrix<MT2,SO>& rhs );
1043 template<
typename MT2 >
1044 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
1045 operator+=(
const Matrix<MT2,SO>& rhs );
1047 template<
typename MT2 >
1048 inline SymmetricMatrix& operator+=(
const Matrix<MT2,!SO>& rhs );
1050 template<
typename MT2 >
1051 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
1052 operator-=(
const Matrix<MT2,SO>& rhs );
1054 template<
typename MT2 >
1055 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
1056 operator-=(
const Matrix<MT2,SO>& rhs );
1058 template<
typename MT2 >
1059 inline SymmetricMatrix& operator-=(
const Matrix<MT2,!SO>& rhs );
1061 template<
typename MT2,
bool SO2 >
1062 inline SymmetricMatrix& operator*=(
const Matrix<MT2,SO2>& rhs );
1064 template<
typename Other >
1065 inline typename EnableIf< IsNumeric<Other>, SymmetricMatrix >::Type&
1066 operator*=( Other rhs );
1068 template<
typename Other >
1069 inline typename EnableIf< IsNumeric<Other>, SymmetricMatrix >::Type&
1070 operator/=( Other rhs );
1077 inline size_t rows()
const;
1078 inline size_t columns()
const;
1079 inline size_t spacing()
const;
1081 inline size_t capacity(
size_t i )
const;
1083 inline size_t nonZeros(
size_t i )
const;
1084 inline void reset();
1085 inline void reset(
size_t i );
1086 inline void clear();
1087 void resize (
size_t n,
bool preserve=
true );
1088 inline void extend (
size_t n,
bool preserve=
true );
1089 inline void reserve(
size_t elements );
1090 inline SymmetricMatrix& transpose();
1091 template<
typename Other >
inline SymmetricMatrix& scale(
const Other& scalar );
1092 inline void swap( SymmetricMatrix& m ) ;
1099 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
1100 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
1102 inline bool isAligned ()
const;
1103 inline bool canSMPAssign()
const;
1105 inline IntrinsicType
load (
size_t i,
size_t j )
const;
1106 inline IntrinsicType
loadu (
size_t i,
size_t j )
const;
1107 inline void store (
size_t i,
size_t j,
const IntrinsicType& value );
1108 inline void storeu(
size_t i,
size_t j,
const IntrinsicType& value );
1109 inline void stream(
size_t i,
size_t j,
const IntrinsicType& value );
1122 template<
typename MT2,
bool SO2,
bool DF2,
bool NF2 >
1123 friend bool isDefault(
const SymmetricMatrix<MT2,SO2,DF2,NF2>& m );
1158 template<
typename MT
1160 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix()
1175 template<
typename MT
1177 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
size_t n )
1194 template<
typename MT
1196 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
const SymmetricMatrix& m )
1197 : matrix_( m.matrix_ )
1215 template<
typename MT
1217 template<
typename MT2 >
1218 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
const Matrix<MT2,SO>& m )
1221 if( IsLower<MT2>::value || IsUpper<MT2>::value ||
1222 ( !IsSymmetric<MT2>::value && !
isSymmetric( matrix_ ) ) )
1223 throw std::invalid_argument(
"Invalid setup of symmetric matrix" );
1241 template<
typename MT
1243 template<
typename MT2 >
1244 inline SymmetricMatrix<MT,SO,true,true>::SymmetricMatrix(
const Matrix<MT2,!SO>& m )
1245 : matrix_(
trans( ~m ) )
1247 if( IsLower<MT2>::value || IsUpper<MT2>::value ||
1248 ( !IsSymmetric<MT2>::value && !
isSymmetric( matrix_ ) ) )
1249 throw std::invalid_argument(
"Invalid setup of symmetric matrix" );
1277 template<
typename MT
1280 SymmetricMatrix<MT,SO,true,true>::operator()(
size_t i,
size_t j )
1303 template<
typename MT
1306 SymmetricMatrix<MT,SO,true,true>::operator()(
size_t i,
size_t j )
const
1311 return matrix_(i,j);
1331 template<
typename MT
1333 inline typename SymmetricMatrix<MT,SO,true,true>::ConstPointer
1334 SymmetricMatrix<MT,SO,true,true>::data()
const
1336 return matrix_.data();
1353 template<
typename MT
1355 inline typename SymmetricMatrix<MT,SO,true,true>::ConstPointer
1356 SymmetricMatrix<MT,SO,true,true>::data(
size_t i )
const
1358 return matrix_.data(i);
1376 template<
typename MT
1382 return Iterator( matrix_, 0UL, i );
1384 return Iterator( matrix_, i, 0UL );
1402 template<
typename MT
1407 return matrix_.begin(i);
1425 template<
typename MT
1430 return matrix_.cbegin(i);
1448 template<
typename MT
1474 template<
typename MT
1479 return matrix_.end(i);
1497 template<
typename MT
1502 return matrix_.cend(i);
1526 template<
typename MT
1528 inline SymmetricMatrix<MT,SO,true,true>&
1529 SymmetricMatrix<MT,SO,true,true>::operator=(
const SymmetricMatrix& rhs )
1531 matrix_ = rhs.matrix_;
1552 template<
typename MT
1554 template<
typename MT2 >
1555 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >::Type
1556 SymmetricMatrix<MT,SO,true,true>::operator=(
const Matrix<MT2,SO>& rhs )
1558 if( IsLower<MT2>::value || IsUpper<MT2>::value ||
1559 ( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) )
1560 throw std::invalid_argument(
"Invalid assignment to symmetric matrix" );
1583 template<
typename MT
1585 template<
typename MT2 >
1586 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >::Type
1587 SymmetricMatrix<MT,SO,true,true>::operator=(
const Matrix<MT2,SO>& rhs )
1589 if( IsLower<MT2>::value || IsUpper<MT2>::value || !
isSquare( ~rhs ) )
1590 throw std::invalid_argument(
"Invalid assignment to symmetric matrix" );
1592 if( IsSymmetric<MT2>::value ) {
1599 throw std::invalid_argument(
"Invalid assignment to symmetric matrix" );
1601 move( matrix_, tmp );
1623 template<
typename MT
1625 template<
typename MT2 >
1626 inline SymmetricMatrix<MT,SO,true,true>&
1627 SymmetricMatrix<MT,SO,true,true>::operator=(
const Matrix<MT2,!SO>& rhs )
1629 return this->operator=(
trans( ~rhs ) );
1648 template<
typename MT
1650 template<
typename MT2 >
1651 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >::Type
1652 SymmetricMatrix<MT,SO,true,true>::operator+=(
const Matrix<MT2,SO>& rhs )
1654 if( IsLower<MT2>::value || IsUpper<MT2>::value ||
1655 ( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) )
1656 throw std::invalid_argument(
"Invalid assignment to symmetric matrix" );
1679 template<
typename MT
1681 template<
typename MT2 >
1682 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >::Type
1683 SymmetricMatrix<MT,SO,true,true>::operator+=(
const Matrix<MT2,SO>& rhs )
1685 if( IsLower<MT2>::value || IsUpper<MT2>::value || !
isSquare( ~rhs ) )
1686 throw std::invalid_argument(
"Invalid assignment to symmetric matrix" );
1688 if( IsSymmetric<MT2>::value ) {
1695 throw std::invalid_argument(
"Invalid assignment to symmetric matrix" );
1720 template<
typename MT
1722 template<
typename MT2 >
1723 inline SymmetricMatrix<MT,SO,true,true>&
1724 SymmetricMatrix<MT,SO,true,true>::operator+=(
const Matrix<MT2,!SO>& rhs )
1726 return this->operator+=(
trans( ~rhs ) );
1745 template<
typename MT
1747 template<
typename MT2 >
1748 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >::Type
1749 SymmetricMatrix<MT,SO,true,true>::operator-=(
const Matrix<MT2,SO>& rhs )
1751 if( IsLower<MT2>::value || IsUpper<MT2>::value ||
1752 ( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) )
1753 throw std::invalid_argument(
"Invalid assignment to symmetric matrix" );
1776 template<
typename MT
1778 template<
typename MT2 >
1779 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,true,true>& >::Type
1780 SymmetricMatrix<MT,SO,true,true>::operator-=(
const Matrix<MT2,SO>& rhs )
1782 if( IsLower<MT2>::value || IsUpper<MT2>::value || !
isSquare( ~rhs ) )
1783 throw std::invalid_argument(
"Invalid assignment to symmetric matrix" );
1785 if( IsSymmetric<MT2>::value ) {
1792 throw std::invalid_argument(
"Invalid assignment to symmetric matrix" );
1817 template<
typename MT
1819 template<
typename MT2 >
1820 inline SymmetricMatrix<MT,SO,true,true>&
1821 SymmetricMatrix<MT,SO,true,true>::operator-=(
const Matrix<MT2,!SO>& rhs )
1823 return this->operator-=(
trans( ~rhs ) );
1841 template<
typename MT
1843 template<
typename MT2
1845 inline SymmetricMatrix<MT,SO,true,true>&
1846 SymmetricMatrix<MT,SO,true,true>::operator*=(
const Matrix<MT2,SO2>& rhs )
1848 if( matrix_.rows() != (~rhs).
columns() )
1849 throw std::invalid_argument(
"Invalid assignment to symmetric matrix" );
1851 MT tmp( matrix_ * ~rhs );
1854 throw std::invalid_argument(
"Invalid assignment to symmetric matrix" );
1856 move( matrix_, tmp );
1872 template<
typename MT
1874 template<
typename Other >
1875 inline typename EnableIf< IsNumeric<Other>, SymmetricMatrix<MT,SO,true,true> >::Type&
1876 SymmetricMatrix<MT,SO,true,true>::operator*=( Other rhs )
1892 template<
typename MT
1894 template<
typename Other >
1895 inline typename EnableIf< IsNumeric<Other>, SymmetricMatrix<MT,SO,true,true> >::Type&
1896 SymmetricMatrix<MT,SO,true,true>::operator/=( Other rhs )
1921 template<
typename MT
1925 return matrix_.rows();
1937 template<
typename MT
1941 return matrix_.columns();
1959 template<
typename MT
1963 return matrix_.spacing();
1975 template<
typename MT
1979 return matrix_.capacity();
1996 template<
typename MT
2000 return matrix_.capacity(i);
2012 template<
typename MT
2016 return matrix_.nonZeros();
2034 template<
typename MT
2038 return matrix_.nonZeros(i);
2050 template<
typename MT
2096 template<
typename MT
2100 row ( matrix_, i ).reset();
2101 column( matrix_, i ).reset();
2119 template<
typename MT
2166 template<
typename MT
2176 const size_t oldsize( matrix_.rows() );
2178 matrix_.resize( n, n,
true );
2181 const size_t increment( n - oldsize );
2182 submatrix( matrix_, 0UL, oldsize, oldsize, increment ).reset();
2183 submatrix( matrix_, oldsize, 0UL, increment, n ).reset();
2203 template<
typename MT
2205 inline void SymmetricMatrix<MT,SO,true,true>::extend(
size_t n,
bool preserve )
2226 template<
typename MT
2228 inline void SymmetricMatrix<MT,SO,true,true>::reserve(
size_t elements )
2230 matrix_.reserve( elements );
2242 template<
typename MT
2244 inline SymmetricMatrix<MT,SO,true,true>& SymmetricMatrix<MT,SO,true,true>::transpose()
2259 template<
typename MT
2261 template<
typename Other >
2262 inline SymmetricMatrix<MT,SO,true,true>&
2263 SymmetricMatrix<MT,SO,true,true>::scale(
const Other& scalar )
2265 matrix_.scale( scalar );
2280 template<
typename MT
2286 swap( matrix_, m.matrix_ );
2311 template<
typename MT
2313 template<
typename Other >
2314 inline bool SymmetricMatrix<MT,SO,true,true>::canAlias(
const Other* alias )
const
2316 return matrix_.canAlias( alias );
2333 template<
typename MT
2335 template<
typename Other >
2336 inline bool SymmetricMatrix<MT,SO,true,true>::isAliased(
const Other* alias )
const
2338 return matrix_.isAliased( alias );
2354 template<
typename MT
2356 inline bool SymmetricMatrix<MT,SO,true,true>::isAligned()
const
2358 return matrix_.isAligned();
2375 template<
typename MT
2377 inline bool SymmetricMatrix<MT,SO,true,true>::canSMPAssign()
const
2379 return matrix_.canSMPAssign();
2401 template<
typename MT
2403 inline typename SymmetricMatrix<MT,SO,true,true>::IntrinsicType
2406 return matrix_.load( i, j );
2428 template<
typename MT
2430 inline typename SymmetricMatrix<MT,SO,true,true>::IntrinsicType
2433 return matrix_.loadu( i, j );
2456 template<
typename MT
2460 matrix_.store( i, j, value );
2464 for(
size_t k=i; k<kend; ++k )
2465 matrix_(j,k) = matrix_(k,j);
2469 for(
size_t k=j; k<kend; ++k )
2470 matrix_(k,i) = matrix_(i,k);
2494 template<
typename MT
2498 matrix_.storeu( i, j, value );
2502 for(
size_t k=i; k<kend; ++k )
2503 matrix_(j,k) = matrix_(k,j);
2507 for(
size_t k=j; k<kend; ++k )
2508 matrix_(k,i) = matrix_(i,k);
2532 template<
typename MT
2536 matrix_.stream( i, j, value );
2540 for(
size_t k=i; k<kend; ++k )
2541 matrix_(j,k) = matrix_(k,j);
2545 for(
size_t k=j; k<kend; ++k )
2546 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
Constraint on the data type.
Header file for mathematical functions.
void swap(SymmetricMatrix< MT, SO, DF, NF > &a, SymmetricMatrix< MT, SO, DF, NF > &b)
Swapping the contents of two matrices.
Definition: SymmetricMatrix.h:195
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for the UNUSED_PARAMETER function template.
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:4838
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix)
Checks if the given matrix is a square matrix.
Definition: Matrix.h:902
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:237
void move(CompressedMatrix< Type, SO > &dst, CompressedMatrix< Type, SO > &src)
Moving the contents of one compressed matrix to another.
Definition: CompressedMatrix.h:4772
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:258
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:300
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:258
#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:242
#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
BLAZE_ALWAYS_INLINE EnableIf< IsIntegral< T > >::Type stream(T *address, const typename Stream< T, sizeof(T)>::Type &value)
Aligned, non-temporal store of a vector of integral values.
Definition: Stream.h:220
Constraint on the data type.
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition: DenseMatrix.h:731
Constraint on the data type.
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2478
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix)
Returns the maximum capacity of the matrix.
Definition: Matrix.h:348
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:316
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:4709
BLAZE_ALWAYS_INLINE EnableIf< IsIntegral< T >, Load< T, sizeof(T)> >::Type::Type load(const T *address)
Loads a vector of integral values.
Definition: Load.h:224
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:103
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
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2472
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:386
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:2474
Constraint on the data type.
Header file for the DenseColumn class template.
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.
Header file for the IsSymmetric type trait.
Header file for the clear shim.
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:4754
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2482
#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
const MT::ElementType min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:947
Header file for the DenseMatrix base class.
BLAZE_ALWAYS_INLINE void clear(const NonNumericProxy< MT > &proxy)
Clearing the represented element.
Definition: NonNumericProxy.h:854
Constraint on the data type.
const DenseIterator< Type > operator+(const DenseIterator< Type > &it, ptrdiff_t inc)
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:556
Header file for the IsLower type trait.
BLAZE_ALWAYS_INLINE EnableIf< IsIntegral< T >, Loadu< T, sizeof(T)> >::Type::Type loadu(const T *address)
Loads a vector of integral values.
Definition: Loadu.h:221
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2475
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:195
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:535
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2476
Header file for all forward declarations for expression class templates.
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2480
Header file for the EnableIf class template.
Header file for utility functions for dense matrices.
Header file for all restructuring column functions.
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:103
#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:2477
Header file for run time assertion macros.
Header file for the DenseRow class template.
Constraint on the data type.
Constraint on the data type.
Header file for the implementation of the base template of the SymmetricMatrix.
const DenseIterator< Type > operator-(const DenseIterator< Type > &it, ptrdiff_t inc)
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:585
#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:2481
BLAZE_ALWAYS_INLINE bool isDefault(const NonNumericProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: NonNumericProxy.h:874
Constraint on the data type.
Constraint on the data type.
BLAZE_ALWAYS_INLINE void reset(const NonNumericProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: NonNumericProxy.h:833
Header file for all intrinsic functionality.
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:137
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:932
Header file for the IsComputation type trait class.
#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:2473
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:332
bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:289
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE EnableIf< IsIntegral< T > >::Type storeu(T *address, const typename Storeu< T, sizeof(T)>::Type &value)
Unaligned store of a vector of integral values.
Definition: Storeu.h:218
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2479
Header file for the IsUpper type trait.
#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
BLAZE_ALWAYS_INLINE EnableIf< IsIntegral< T > >::Type store(T *address, const typename Store< T, sizeof(T)>::Type &value)
Aligned store of a vector of integral values.
Definition: Store.h:225
Header file for the IsResizable type trait.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for all restructuring row functions.