35 #ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_SPARSENUMERIC_H_
36 #define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_SPARSENUMERIC_H_
101 template<
typename MT
103 class SymmetricMatrix<MT,SO,false,true>
104 :
public SparseMatrix< SymmetricMatrix<MT,SO,false,true>, SO >
115 typedef SymmetricMatrix<MT,SO,false,true>
This;
117 typedef SymmetricMatrix<OT,!SO,false,true>
OppositeType;
130 template<
typename ET >
133 typedef SymmetricMatrix< typename MT::template Rebind<ET>::Other > Other;
146 typedef std::forward_iterator_tag IteratorCategory;
147 typedef SymmetricElement<MT> ValueType;
148 typedef ValueType PointerType;
149 typedef ValueType ReferenceType;
150 typedef ptrdiff_t DifferenceType;
153 typedef IteratorCategory iterator_category;
154 typedef ValueType value_type;
155 typedef PointerType pointer;
156 typedef ReferenceType reference;
157 typedef DifferenceType difference_type;
177 inline Iterator( IteratorType pos, MT& matrix,
size_t index )
200 inline const Iterator operator++(
int ) {
213 return ReferenceType( pos_, matrix_, index_ );
222 inline PointerType operator->()
const {
223 return PointerType( pos_, matrix_, index_ );
244 return pos_ == rhs.pos_;
255 return !( *
this == rhs );
266 return pos_ - rhs.pos_;
275 inline IteratorType base()
const {
291 enum { smpAssignable = 0 };
297 explicit inline SymmetricMatrix();
298 explicit inline SymmetricMatrix(
size_t n );
299 explicit inline SymmetricMatrix(
size_t n,
size_t nonzeros );
300 explicit inline SymmetricMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
302 inline SymmetricMatrix(
const SymmetricMatrix& m );
303 template<
typename MT2 >
inline SymmetricMatrix(
const Matrix<MT2,SO>& m );
304 template<
typename MT2 >
inline SymmetricMatrix(
const Matrix<MT2,!SO>& m );
315 inline Reference operator()(
size_t i,
size_t j );
316 inline ConstReference operator()(
size_t i,
size_t j )
const;
317 inline Reference at(
size_t i,
size_t j );
318 inline ConstReference at(
size_t i,
size_t j )
const;
320 inline ConstIterator
begin (
size_t i )
const;
321 inline ConstIterator
cbegin(
size_t i )
const;
323 inline ConstIterator
end (
size_t i )
const;
324 inline ConstIterator
cend (
size_t i )
const;
331 inline SymmetricMatrix& operator=(
const SymmetricMatrix& rhs );
333 template<
typename MT2 >
334 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
335 operator=(
const Matrix<MT2,SO>& rhs );
337 template<
typename MT2 >
338 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
339 operator=(
const Matrix<MT2,SO>& rhs );
341 template<
typename MT2 >
342 inline SymmetricMatrix& operator=(
const Matrix<MT2,!SO>& rhs );
344 template<
typename MT2 >
345 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
346 operator+=(
const Matrix<MT2,SO>& rhs );
348 template<
typename MT2 >
349 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
350 operator+=(
const Matrix<MT2,SO>& rhs );
352 template<
typename MT2 >
353 inline SymmetricMatrix& operator+=(
const Matrix<MT2,!SO>& rhs );
355 template<
typename MT2 >
356 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
357 operator-=(
const Matrix<MT2,SO>& rhs );
359 template<
typename MT2 >
360 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix& >::Type
361 operator-=(
const Matrix<MT2,SO>& rhs );
363 template<
typename MT2 >
364 inline SymmetricMatrix& operator-=(
const Matrix<MT2,!SO>& rhs );
366 template<
typename MT2,
bool SO2 >
367 inline SymmetricMatrix& operator*=(
const Matrix<MT2,SO2>& rhs );
369 template<
typename Other >
370 inline typename EnableIf< IsNumeric<Other>, SymmetricMatrix >::Type&
371 operator*=( Other rhs );
373 template<
typename Other >
374 inline typename EnableIf< IsNumeric<Other>, SymmetricMatrix >::Type&
375 operator/=( Other rhs );
382 inline size_t rows()
const;
385 inline size_t capacity(
size_t i )
const;
387 inline size_t nonZeros(
size_t i )
const;
389 inline void reset(
size_t i );
391 inline Iterator set(
size_t i,
size_t j,
const ElementType& value );
392 inline Iterator insert(
size_t i,
size_t j,
const ElementType& value );
393 inline void erase(
size_t i,
size_t j );
396 inline void resize (
size_t n,
bool preserve=
true );
397 inline void reserve(
size_t nonzeros );
398 inline void reserve(
size_t i,
size_t nonzeros );
400 inline void trim(
size_t i );
403 template<
typename Other >
inline SymmetricMatrix& scale(
const Other& scalar );
404 template<
typename Other >
inline SymmetricMatrix& scaleDiagonal( Other scale );
405 inline void swap( SymmetricMatrix& m ) ;
412 inline Iterator find (
size_t i,
size_t j );
413 inline ConstIterator find (
size_t i,
size_t j )
const;
414 inline Iterator lowerBound(
size_t i,
size_t j );
415 inline ConstIterator lowerBound(
size_t i,
size_t j )
const;
416 inline Iterator upperBound(
size_t i,
size_t j );
417 inline ConstIterator upperBound(
size_t i,
size_t j )
const;
424 inline void append (
size_t i,
size_t j,
const ElementType& value,
bool check=
false );
425 inline void finalize(
size_t i );
439 template<
typename Other >
inline bool canAlias (
const Other* alias )
const;
440 template<
typename Other >
inline bool isAliased(
const Other* alias )
const;
442 inline bool canSMPAssign()
const;
455 template<
typename MT2,
bool SO2,
bool DF2,
bool NF2 >
456 friend bool isDefault(
const SymmetricMatrix<MT2,SO2,DF2,NF2>& m );
492 template<
typename MT
494 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix()
511 template<
typename MT
513 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix(
size_t n )
533 template<
typename MT
535 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix(
size_t n,
size_t nonzeros )
536 : matrix_( n, n, nonzeros )
557 template<
typename MT
559 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
560 : matrix_( n, n, nonzeros )
576 template<
typename MT
578 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix(
const SymmetricMatrix& m )
579 : matrix_( m.matrix_ )
598 template<
typename MT
600 template<
typename MT2 >
601 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix(
const Matrix<MT2,SO>& m )
604 if( !IsSymmetric<MT2>::value && !
isSymmetric( matrix_ ) ) {
625 template<
typename MT
627 template<
typename MT2 >
628 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix(
const Matrix<MT2,!SO>& m )
629 : matrix_(
trans( ~m ) )
631 if( !IsSymmetric<MT2>::value && !
isSymmetric( matrix_ ) ) {
665 template<
typename MT
668 SymmetricMatrix<MT,SO,false,true>::operator()(
size_t i,
size_t j )
694 template<
typename MT
697 SymmetricMatrix<MT,SO,false,true>::operator()(
size_t i,
size_t j )
const
724 template<
typename MT
727 SymmetricMatrix<MT,SO,false,true>::at(
size_t i,
size_t j )
757 template<
typename MT
760 SymmetricMatrix<MT,SO,false,true>::at(
size_t i,
size_t j )
const
786 template<
typename MT
791 return Iterator( matrix_.begin(i), matrix_, i );
809 template<
typename MT
814 return matrix_.begin(i);
832 template<
typename MT
837 return matrix_.cbegin(i);
855 template<
typename MT
860 return Iterator( matrix_.end(i), matrix_, i );
878 template<
typename MT
883 return matrix_.end(i);
901 template<
typename MT
906 return matrix_.cend(i);
930 template<
typename MT
932 inline SymmetricMatrix<MT,SO,false,true>&
933 SymmetricMatrix<MT,SO,false,true>::operator=(
const SymmetricMatrix& rhs )
935 matrix_ = rhs.matrix_;
959 template<
typename MT
961 template<
typename MT2 >
962 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,false,true>& >::Type
963 SymmetricMatrix<MT,SO,false,true>::operator=(
const Matrix<MT2,SO>& rhs )
965 if( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) {
993 template<
typename MT
995 template<
typename MT2 >
996 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,false,true>& >::Type
997 SymmetricMatrix<MT,SO,false,true>::operator=(
const Matrix<MT2,SO>& rhs )
999 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1003 if( IsSymmetric<MT2>::value ) {
1013 move( matrix_, tmp );
1038 template<
typename MT
1040 template<
typename MT2 >
1041 inline SymmetricMatrix<MT,SO,false,true>&
1042 SymmetricMatrix<MT,SO,false,true>::operator=(
const Matrix<MT2,!SO>& rhs )
1044 return this->operator=(
trans( ~rhs ) );
1063 template<
typename MT
1065 template<
typename MT2 >
1066 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,false,true>& >::Type
1067 SymmetricMatrix<MT,SO,false,true>::operator+=(
const Matrix<MT2,SO>& rhs )
1069 if( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) {
1097 template<
typename MT
1099 template<
typename MT2 >
1100 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,false,true>& >::Type
1101 SymmetricMatrix<MT,SO,false,true>::operator+=(
const Matrix<MT2,SO>& rhs )
1103 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1107 if( IsSymmetric<MT2>::value ) {
1143 template<
typename MT
1145 template<
typename MT2 >
1146 inline SymmetricMatrix<MT,SO,false,true>&
1147 SymmetricMatrix<MT,SO,false,true>::operator+=(
const Matrix<MT2,!SO>& rhs )
1149 return this->operator+=(
trans( ~rhs ) );
1168 template<
typename MT
1170 template<
typename MT2 >
1171 inline typename DisableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,false,true>& >::Type
1172 SymmetricMatrix<MT,SO,false,true>::operator-=(
const Matrix<MT2,SO>& rhs )
1174 if( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) {
1202 template<
typename MT
1204 template<
typename MT2 >
1205 inline typename EnableIf< IsComputation<MT2>, SymmetricMatrix<MT,SO,false,true>& >::Type
1206 SymmetricMatrix<MT,SO,false,true>::operator-=(
const Matrix<MT2,SO>& rhs )
1208 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1212 if( IsSymmetric<MT2>::value ) {
1248 template<
typename MT
1250 template<
typename MT2 >
1251 inline SymmetricMatrix<MT,SO,false,true>&
1252 SymmetricMatrix<MT,SO,false,true>::operator-=(
const Matrix<MT2,!SO>& rhs )
1254 return this->operator-=(
trans( ~rhs ) );
1272 template<
typename MT
1274 template<
typename MT2
1276 inline SymmetricMatrix<MT,SO,false,true>&
1277 SymmetricMatrix<MT,SO,false,true>::operator*=(
const Matrix<MT2,SO2>& rhs )
1279 if( matrix_.rows() != (~rhs).
columns() ) {
1283 MT tmp( matrix_ * ~rhs );
1289 move( matrix_, tmp );
1308 template<
typename MT
1310 template<
typename Other >
1311 inline typename EnableIf< IsNumeric<Other>, SymmetricMatrix<MT,SO,false,true> >::Type&
1312 SymmetricMatrix<MT,SO,false,true>::operator*=( Other rhs )
1328 template<
typename MT
1330 template<
typename Other >
1331 inline typename EnableIf< IsNumeric<Other>, SymmetricMatrix<MT,SO,false,true> >::Type&
1332 SymmetricMatrix<MT,SO,false,true>::operator/=( Other rhs )
1357 template<
typename MT
1361 return matrix_.rows();
1373 template<
typename MT
1377 return matrix_.columns();
1389 template<
typename MT
1393 return matrix_.capacity();
1410 template<
typename MT
1414 return matrix_.capacity(i);
1426 template<
typename MT
1430 return matrix_.nonZeros();
1448 template<
typename MT
1452 return matrix_.nonZeros(i);
1464 template<
typename MT
1510 template<
typename MT
1514 for(
typename MT::Iterator it=matrix_.begin(i); it!=matrix_.end(i); ++it )
1516 const size_t j( it->index() );
1522 const typename MT::Iterator pos( matrix_.find( i, j ) );
1524 matrix_.erase( j, pos );
1527 const typename MT::Iterator pos( matrix_.find( j, i ) );
1529 matrix_.erase( j, pos );
1547 template<
typename MT
1573 template<
typename MT
1579 matrix_.set( j, i, value );
1580 return Iterator( matrix_.set( i, j, value ), matrix_, ( SO ? j : i ) );
1601 template<
typename MT
1604 SymmetricMatrix<MT,SO,false,true>::insert(
size_t i,
size_t j,
const ElementType& value )
1607 matrix_.insert( j, i, value );
1608 return Iterator( matrix_.insert( i, j, value ), matrix_, ( SO ? j : i ) );
1624 template<
typename MT
1626 inline void SymmetricMatrix<MT,SO,false,true>::erase(
size_t i,
size_t j )
1628 matrix_.erase( i, j );
1630 matrix_.erase( j, i );
1648 template<
typename MT
1651 SymmetricMatrix<MT,SO,false,true>::erase(
size_t i,
Iterator pos )
1655 if( base == matrix_.end( i ) )
1658 const size_t j( base->index() );
1662 return Iterator( matrix_.erase( i, base ), matrix_, i );
1667 matrix_.erase( j, matrix_.find( i, j ) );
1668 return Iterator( matrix_.erase( i, base ), matrix_, i );
1672 matrix_.erase( j, matrix_.find( j, i ) );
1673 return Iterator( matrix_.erase( i, base ), matrix_, i );
1694 template<
typename MT
1697 SymmetricMatrix<MT,SO,false,true>::erase(
size_t i,
Iterator first,
Iterator last )
1699 for(
typename MT::Iterator it=first.base(); it!=last.base(); ++it )
1701 const size_t j( it->index() );
1708 matrix_.erase( i, j );
1712 matrix_.erase( j, i );
1716 return Iterator( matrix_.erase( i, first.base(), last.base() ), matrix_, i );
1737 template<
typename MT
1747 matrix_.resize( n, n,
true );
1764 template<
typename MT
1766 inline void SymmetricMatrix<MT,SO,false,true>::reserve(
size_t nonzeros )
1768 matrix_.reserve( nonzeros );
1788 template<
typename MT
1790 inline void SymmetricMatrix<MT,SO,false,true>::reserve(
size_t i,
size_t nonzeros )
1792 matrix_.reserve( i, nonzeros );
1809 template<
typename MT
1811 inline void SymmetricMatrix<MT,SO,false,true>::trim()
1831 template<
typename MT
1833 inline void SymmetricMatrix<MT,SO,false,true>::trim(
size_t i )
1847 template<
typename MT
1863 template<
typename MT
1867 if( !IsBuiltin<ElementType>::value )
1883 template<
typename MT
1885 template<
typename Other >
1886 inline SymmetricMatrix<MT,SO,false,true>&
1887 SymmetricMatrix<MT,SO,false,true>::scale(
const Other& scalar )
1889 matrix_.scale( scalar );
1903 template<
typename MT
1905 template<
typename Other >
1906 inline SymmetricMatrix<MT,SO,false,true>&
1907 SymmetricMatrix<MT,SO,false,true>::scaleDiagonal( Other scalar )
1909 matrix_.scaleDiagonal( scalar );
1924 template<
typename MT
1930 swap( matrix_, m.matrix_ );
1960 template<
typename MT
1963 SymmetricMatrix<MT,SO,false,true>::find(
size_t i,
size_t j )
1965 return Iterator( matrix_.find( i, j ), matrix_, ( SO ? j : i ) );
1987 template<
typename MT
1990 SymmetricMatrix<MT,SO,false,true>::find(
size_t i,
size_t j )
const
1992 return matrix_.find( i, j );
2014 template<
typename MT
2017 SymmetricMatrix<MT,SO,false,true>::lowerBound(
size_t i,
size_t j )
2019 return Iterator( matrix_.lowerBound( i, j ), matrix_, ( SO ? j : i ) );
2041 template<
typename MT
2044 SymmetricMatrix<MT,SO,false,true>::lowerBound(
size_t i,
size_t j )
const
2046 return matrix_.lowerBound( i, j );
2068 template<
typename MT
2071 SymmetricMatrix<MT,SO,false,true>::upperBound(
size_t i,
size_t j )
2073 return Iterator( matrix_.upperBound( i, j ), matrix_, ( SO ? j : i ) );
2095 template<
typename MT
2098 SymmetricMatrix<MT,SO,false,true>::upperBound(
size_t i,
size_t j )
const
2100 return matrix_.upperBound( i, j );
2169 template<
typename MT
2171 inline void SymmetricMatrix<MT,SO,false,true>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
2173 matrix_.append( i, j, value, check );
2174 if( i != j && ( !check || !
isDefault( value ) ) )
2175 matrix_.insert( j, i, value );
2195 template<
typename MT
2197 inline void SymmetricMatrix<MT,SO,false,true>::finalize(
size_t i )
2223 template<
typename MT
2254 template<
typename MT
2256 template<
typename Other >
2257 inline bool SymmetricMatrix<MT,SO,false,true>::canAlias(
const Other* alias )
const
2259 return matrix_.canAlias( alias );
2276 template<
typename MT
2278 template<
typename Other >
2279 inline bool SymmetricMatrix<MT,SO,false,true>::isAliased(
const Other* alias )
const
2281 return matrix_.isAliased( alias );
2298 template<
typename MT
2300 inline bool SymmetricMatrix<MT,SO,false,true>::canSMPAssign()
const
2302 return matrix_.canSMPAssign();
#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
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, simd_int16_t >::Type set(T value)
Sets all values in the vector to the given 2-byte integral value.
Definition: Set.h:73
Constraint on the data type.
#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 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
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
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
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:81
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
#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.
Constraint on the data type.
Header file for the SparseMatrix base class.
Header file for utility functions for sparse matrices.
Header file for the IsSquare type trait.
Constraint on the data type.
bool isDefault(const CompressedMatrix< Type, SO > &m)
Returns whether the given compressed matrix is in default state.
Definition: CompressedMatrix.h:4953
Header file for the DisableIf class template.
Header file for the IsSymmetric type trait.
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the SymmetricElement class.
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
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
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.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:527
Header file for the conjugate shim.
Header file for the IsNumeric type trait.
#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.
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 isDefault shim.
Header file for the SymmetricValue class.
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 the move shim.
#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 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
#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
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:79
BLAZE_ALWAYS_INLINE void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:558