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 >
108 typedef OppositeType_<MT> OT;
109 typedef TransposeType_<MT> TT;
110 typedef ElementType_<MT> ET;
115 typedef SymmetricMatrix<MT,SO,false,true>
This;
116 typedef SparseMatrix<This,SO>
BaseType;
118 typedef SymmetricMatrix<OT,!SO,false,true>
OppositeType;
131 template<
typename ET >
134 typedef SymmetricMatrix< typename MT::template Rebind<ET>::Other > Other;
145 typedef Iterator_<MT> IteratorType;
147 typedef std::forward_iterator_tag IteratorCategory;
148 typedef SymmetricElement<MT> ValueType;
149 typedef ValueType PointerType;
150 typedef ValueType ReferenceType;
151 typedef ptrdiff_t DifferenceType;
154 typedef IteratorCategory iterator_category;
155 typedef ValueType value_type;
156 typedef PointerType pointer;
157 typedef ReferenceType reference;
158 typedef DifferenceType difference_type;
178 inline Iterator( IteratorType pos, MT& matrix,
size_t index )
201 inline const Iterator operator++(
int ) {
214 return ReferenceType( pos_, matrix_, index_ );
223 inline PointerType operator->()
const {
224 return PointerType( pos_, matrix_, index_ );
245 return pos_ == rhs.pos_;
256 return !( *
this == rhs );
267 return pos_ - rhs.pos_;
276 inline IteratorType base()
const {
292 enum :
bool { smpAssignable =
false };
298 explicit inline SymmetricMatrix();
299 explicit inline SymmetricMatrix(
size_t n );
300 explicit inline SymmetricMatrix(
size_t n,
size_t nonzeros );
301 explicit inline SymmetricMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
303 inline SymmetricMatrix(
const SymmetricMatrix& m );
304 inline SymmetricMatrix( SymmetricMatrix&& m ) noexcept;
306 template< typename MT2 > inline SymmetricMatrix( const Matrix<MT2,SO>& m );
307 template< typename MT2 > inline SymmetricMatrix( const Matrix<MT2,!SO>& m );
318 inline Reference operator()(
size_t i,
size_t j );
319 inline ConstReference operator()(
size_t i,
size_t j ) const;
320 inline Reference at(
size_t i,
size_t j );
321 inline ConstReference at(
size_t i,
size_t j ) const;
323 inline ConstIterator
begin (
size_t i ) const;
324 inline ConstIterator
cbegin(
size_t i ) const;
326 inline ConstIterator
end (
size_t i ) const;
327 inline ConstIterator
cend (
size_t i ) const;
334 inline SymmetricMatrix& operator=( const SymmetricMatrix& rhs );
335 inline SymmetricMatrix& operator=( SymmetricMatrix&& rhs ) noexcept;
337 template< typename MT2 >
338 inline
DisableIf_< IsComputation<MT2>, SymmetricMatrix& > operator=( const Matrix<MT2,SO>& rhs );
340 template< typename MT2 >
341 inline
EnableIf_< IsComputation<MT2>, SymmetricMatrix& > operator=( const Matrix<MT2,SO>& rhs );
343 template< typename MT2 >
344 inline SymmetricMatrix& operator=( const Matrix<MT2,!SO>& rhs );
346 template< typename MT2 >
347 inline
DisableIf_< IsComputation<MT2>, SymmetricMatrix& > operator+=( const Matrix<MT2,SO>& rhs );
349 template< typename MT2 >
350 inline
EnableIf_< IsComputation<MT2>, SymmetricMatrix& > 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
DisableIf_< IsComputation<MT2>, SymmetricMatrix& > operator-=( const Matrix<MT2,SO>& rhs );
358 template< typename MT2 >
359 inline
EnableIf_< IsComputation<MT2>, SymmetricMatrix& > operator-=( const Matrix<MT2,SO>& rhs );
361 template< typename MT2 >
362 inline SymmetricMatrix& operator-=( const Matrix<MT2,!SO>& rhs );
364 template< typename MT2,
bool SO2 >
365 inline SymmetricMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
367 template< typename Other >
368 inline
EnableIf_< IsNumeric<Other>, SymmetricMatrix >& operator*=( Other rhs );
370 template< typename Other >
371 inline
EnableIf_< IsNumeric<Other>, SymmetricMatrix >& operator/=( Other rhs );
378 inline
size_t rows() const noexcept;
379 inline
size_t columns() const noexcept;
380 inline
size_t capacity() const noexcept;
381 inline
size_t capacity(
size_t i ) const noexcept;
383 inline
size_t nonZeros(
size_t i ) const;
385 inline
void reset(
size_t i );
387 inline
Iterator set(
size_t i,
size_t j, const ElementType& value );
388 inline
Iterator insert(
size_t i,
size_t j, const ElementType& value );
389 inline
void erase(
size_t i,
size_t j );
392 inline
void resize (
size_t n,
bool preserve=true );
393 inline
void reserve(
size_t nonzeros );
394 inline
void reserve(
size_t i,
size_t nonzeros );
396 inline
void trim(
size_t i );
399 template< typename Other > inline SymmetricMatrix& scale( const Other& scalar );
400 template< typename Other > inline SymmetricMatrix& scaleDiagonal( Other scale );
401 inline
void swap( SymmetricMatrix& m ) noexcept;
408 inline
Iterator find (
size_t i,
size_t j );
409 inline ConstIterator find (
size_t i,
size_t j ) const;
410 inline
Iterator lowerBound(
size_t i,
size_t j );
411 inline ConstIterator lowerBound(
size_t i,
size_t j ) const;
412 inline
Iterator upperBound(
size_t i,
size_t j );
413 inline ConstIterator upperBound(
size_t i,
size_t j ) const;
420 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
421 inline
void finalize(
size_t i );
428 inline
bool isIntact() const noexcept;
435 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
436 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
438 inline
bool canSMPAssign() const noexcept;
451 template< typename MT2,
bool SO2,
bool DF2,
bool NF2 >
452 friend
bool isDefault( const SymmetricMatrix<MT2,SO2,DF2,NF2>& m );
488 template< typename MT
490 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix()
507 template<
typename MT
509 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix(
size_t n )
529 template<
typename MT
531 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix(
size_t n,
size_t nonzeros )
532 : matrix_( n, n, nonzeros )
553 template<
typename MT
555 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
556 : matrix_( n, n, nonzeros )
572 template<
typename MT
574 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix(
const SymmetricMatrix& m )
575 : matrix_( m.matrix_ )
590 template<
typename MT
592 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix( SymmetricMatrix&& m ) noexcept
593 : matrix_(
std::move( m.matrix_ ) )
612 template<
typename MT
614 template<
typename MT2 >
615 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix(
const Matrix<MT2,SO>& m )
618 if( !IsSymmetric<MT2>::value && !
isSymmetric( matrix_ ) ) {
639 template<
typename MT
641 template<
typename MT2 >
642 inline SymmetricMatrix<MT,SO,false,true>::SymmetricMatrix(
const Matrix<MT2,!SO>& m )
643 : matrix_(
trans( ~m ) )
645 if( !IsSymmetric<MT2>::value && !
isSymmetric( matrix_ ) ) {
679 template<
typename MT
682 SymmetricMatrix<MT,SO,false,true>::operator()(
size_t i,
size_t j )
708 template<
typename MT
711 SymmetricMatrix<MT,SO,false,true>::operator()(
size_t i,
size_t j )
const
738 template<
typename MT
741 SymmetricMatrix<MT,SO,false,true>::at(
size_t i,
size_t j )
771 template<
typename MT
774 SymmetricMatrix<MT,SO,false,true>::at(
size_t i,
size_t j )
const
800 template<
typename MT
805 return Iterator( matrix_.begin(i), matrix_, i );
823 template<
typename MT
828 return matrix_.begin(i);
846 template<
typename MT
851 return matrix_.cbegin(i);
869 template<
typename MT
874 return Iterator( matrix_.end(i), matrix_, i );
892 template<
typename MT
897 return matrix_.end(i);
915 template<
typename MT
920 return matrix_.cend(i);
944 template<
typename MT
946 inline SymmetricMatrix<MT,SO,false,true>&
947 SymmetricMatrix<MT,SO,false,true>::operator=(
const SymmetricMatrix& rhs )
949 matrix_ = rhs.matrix_;
967 template<
typename MT
969 inline SymmetricMatrix<MT,SO,false,true>&
970 SymmetricMatrix<MT,SO,false,true>::operator=( SymmetricMatrix&& rhs ) noexcept
972 matrix_ = std::move( rhs.matrix_ );
996 template<
typename MT
998 template<
typename MT2 >
999 inline DisableIf_< IsComputation<MT2>, SymmetricMatrix<MT,SO,false,true>& >
1000 SymmetricMatrix<MT,SO,false,true>::operator=(
const Matrix<MT2,SO>& rhs )
1002 if( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) {
1030 template<
typename MT
1032 template<
typename MT2 >
1033 inline EnableIf_< IsComputation<MT2>, SymmetricMatrix<MT,SO,false,true>& >
1034 SymmetricMatrix<MT,SO,false,true>::operator=(
const Matrix<MT2,SO>& rhs )
1036 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1040 if( IsSymmetric<MT2>::value ) {
1050 matrix_ = std::move( tmp );
1075 template<
typename MT
1077 template<
typename MT2 >
1078 inline SymmetricMatrix<MT,SO,false,true>&
1079 SymmetricMatrix<MT,SO,false,true>::operator=(
const Matrix<MT2,!SO>& rhs )
1081 return this->operator=(
trans( ~rhs ) );
1100 template<
typename MT
1102 template<
typename MT2 >
1103 inline DisableIf_< IsComputation<MT2>, SymmetricMatrix<MT,SO,false,true>& >
1106 if( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) {
1134 template<
typename MT
1136 template<
typename MT2 >
1137 inline EnableIf_< IsComputation<MT2>, SymmetricMatrix<MT,SO,false,true>& >
1140 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1144 if( IsSymmetric<MT2>::value ) {
1148 const ResultType_<MT2> tmp( ~rhs );
1180 template<
typename MT
1182 template<
typename MT2 >
1183 inline SymmetricMatrix<MT,SO,false,true>&
1205 template<
typename MT
1207 template<
typename MT2 >
1208 inline DisableIf_< IsComputation<MT2>, SymmetricMatrix<MT,SO,false,true>& >
1211 if( !IsSymmetric<MT2>::value && !
isSymmetric( ~rhs ) ) {
1239 template<
typename MT
1241 template<
typename MT2 >
1242 inline EnableIf_< IsComputation<MT2>, SymmetricMatrix<MT,SO,false,true>& >
1245 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1249 if( IsSymmetric<MT2>::value ) {
1253 const ResultType_<MT2> tmp( ~rhs );
1285 template<
typename MT
1287 template<
typename MT2 >
1288 inline SymmetricMatrix<MT,SO,false,true>&
1309 template<
typename MT
1311 template<
typename MT2
1313 inline SymmetricMatrix<MT,SO,false,true>&
1316 if( matrix_.rows() != (~rhs).
columns() ) {
1320 MT tmp( matrix_ * ~rhs );
1326 matrix_ = std::move( tmp );
1345 template<
typename MT
1347 template<
typename Other >
1348 inline EnableIf_< IsNumeric<Other>, SymmetricMatrix<MT,SO,false,true> >&
1365 template<
typename MT
1367 template<
typename Other >
1368 inline EnableIf_< IsNumeric<Other>, SymmetricMatrix<MT,SO,false,true> >&
1394 template<
typename MT
1398 return matrix_.rows();
1410 template<
typename MT
1414 return matrix_.columns();
1426 template<
typename MT
1430 return matrix_.capacity();
1447 template<
typename MT
1451 return matrix_.capacity(i);
1463 template<
typename MT
1467 return matrix_.nonZeros();
1485 template<
typename MT
1489 return matrix_.nonZeros(i);
1501 template<
typename MT
1547 template<
typename MT
1551 for( Iterator_<MT> it=matrix_.begin(i); it!=matrix_.end(i); ++it )
1553 const size_t j( it->index() );
1559 const Iterator_<MT> pos( matrix_.find( i, j ) );
1561 matrix_.erase( j, pos );
1564 const Iterator_<MT> pos( matrix_.find( j, i ) );
1566 matrix_.erase( j, pos );
1584 template<
typename MT
1610 template<
typename MT
1616 matrix_.set( j, i, value );
1617 return Iterator( matrix_.set( i, j, value ), matrix_, ( SO ? j : i ) );
1638 template<
typename MT
1641 SymmetricMatrix<MT,SO,false,true>::insert(
size_t i,
size_t j,
const ElementType& value )
1644 matrix_.insert( j, i, value );
1645 return Iterator( matrix_.insert( i, j, value ), matrix_, ( SO ? j : i ) );
1661 template<
typename MT
1663 inline void SymmetricMatrix<MT,SO,false,true>::erase(
size_t i,
size_t j )
1665 matrix_.erase( i, j );
1667 matrix_.erase( j, i );
1685 template<
typename MT
1688 SymmetricMatrix<MT,SO,false,true>::erase(
size_t i,
Iterator pos )
1690 const Iterator_<MT> base( pos.base() );
1692 if( base == matrix_.end( i ) )
1695 const size_t j( base->index() );
1699 return Iterator( matrix_.erase( i, base ), matrix_, i );
1704 matrix_.erase( j, matrix_.find( i, j ) );
1705 return Iterator( matrix_.erase( i, base ), matrix_, i );
1709 matrix_.erase( j, matrix_.find( j, i ) );
1710 return Iterator( matrix_.erase( i, base ), matrix_, i );
1731 template<
typename MT
1734 SymmetricMatrix<MT,SO,false,true>::erase(
size_t i,
Iterator first,
Iterator last )
1736 for( Iterator_<MT> it=first.base(); it!=last.base(); ++it )
1738 const size_t j( it->index() );
1745 matrix_.erase( i, j );
1749 matrix_.erase( j, i );
1753 return Iterator( matrix_.erase( i, first.base(), last.base() ), matrix_, i );
1774 template<
typename MT
1784 matrix_.resize( n, n,
true );
1801 template<
typename MT
1803 inline void SymmetricMatrix<MT,SO,false,true>::reserve(
size_t nonzeros )
1805 matrix_.reserve( nonzeros );
1825 template<
typename MT
1827 inline void SymmetricMatrix<MT,SO,false,true>::reserve(
size_t i,
size_t nonzeros )
1829 matrix_.reserve( i, nonzeros );
1846 template<
typename MT
1848 inline void SymmetricMatrix<MT,SO,false,true>::trim()
1868 template<
typename MT
1870 inline void SymmetricMatrix<MT,SO,false,true>::trim(
size_t i )
1884 template<
typename MT
1900 template<
typename MT
1904 if( !IsBuiltin<ElementType>::value )
1920 template<
typename MT
1922 template<
typename Other >
1923 inline SymmetricMatrix<MT,SO,false,true>&
1924 SymmetricMatrix<MT,SO,false,true>::scale(
const Other& scalar )
1926 matrix_.scale( scalar );
1940 template<
typename MT
1942 template<
typename Other >
1943 inline SymmetricMatrix<MT,SO,false,true>&
1944 SymmetricMatrix<MT,SO,false,true>::scaleDiagonal( Other scalar )
1946 matrix_.scaleDiagonal( scalar );
1960 template<
typename MT
1966 swap( matrix_, m.matrix_ );
1996 template<
typename MT
1999 SymmetricMatrix<MT,SO,false,true>::find(
size_t i,
size_t j )
2001 return Iterator( matrix_.find( i, j ), matrix_, ( SO ? j : i ) );
2023 template<
typename MT
2026 SymmetricMatrix<MT,SO,false,true>::find(
size_t i,
size_t j )
const
2028 return matrix_.find( i, j );
2050 template<
typename MT
2053 SymmetricMatrix<MT,SO,false,true>::lowerBound(
size_t i,
size_t j )
2055 return Iterator( matrix_.lowerBound( i, j ), matrix_, ( SO ? j : i ) );
2077 template<
typename MT
2080 SymmetricMatrix<MT,SO,false,true>::lowerBound(
size_t i,
size_t j )
const
2082 return matrix_.lowerBound( i, j );
2104 template<
typename MT
2107 SymmetricMatrix<MT,SO,false,true>::upperBound(
size_t i,
size_t j )
2109 return Iterator( matrix_.upperBound( i, j ), matrix_, ( SO ? j : i ) );
2131 template<
typename MT
2134 SymmetricMatrix<MT,SO,false,true>::upperBound(
size_t i,
size_t j )
const
2136 return matrix_.upperBound( i, j );
2205 template<
typename MT
2207 inline void SymmetricMatrix<MT,SO,false,true>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
2209 matrix_.append( i, j, value, check );
2210 if( i != j && ( !check || !
isDefault( value ) ) )
2211 matrix_.insert( j, i, value );
2231 template<
typename MT
2233 inline void SymmetricMatrix<MT,SO,false,true>::finalize(
size_t i )
2259 template<
typename MT
2290 template<
typename MT
2292 template<
typename Other >
2293 inline bool SymmetricMatrix<MT,SO,false,true>::canAlias(
const Other* alias )
const noexcept
2295 return matrix_.canAlias( alias );
2312 template<
typename MT
2314 template<
typename Other >
2315 inline bool SymmetricMatrix<MT,SO,false,true>::isAliased(
const Other* alias )
const noexcept
2317 return matrix_.isAliased( alias );
2334 template<
typename MT
2336 inline bool SymmetricMatrix<MT,SO,false,true>::canSMPAssign() const noexcept
2338 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:79
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Header file for auxiliary alias declarations.
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:7800
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:346
Header file for basic type definitions.
#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:63
BLAZE_ALWAYS_INLINE T1 & operator/=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Division assignment operator for the division of two SIMD packs.
Definition: BasicTypes.h:1339
Constraint on the data type.
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition: DenseMatrix.h:689
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:188
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2643
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:5077
BLAZE_ALWAYS_INLINE void ctranspose(Matrix< MT, SO > &matrix)
In-place conjugate transpose of the given matrix.
Definition: Matrix.h:590
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2636
#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:79
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:384
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:731
BLAZE_ALWAYS_INLINE T1 & operator*=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Multiplication assignment operator for the multiplication of two SIMD packs.
Definition: BasicTypes.h:1321
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:2639
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:298
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:232
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
Header file for the implementation of the base template of the SymmetricMatrix.
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:5104
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) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5148
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5131
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
#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:79
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the Columns type trait.
Constraint on the data type.
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:330
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2640
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
#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:81
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:538
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:254
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2641
Header file for all forward declarations for expression class templates.
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2645
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
Header file for the conjugate shim.
Header file for the IsNumeric type trait.
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:76
#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:79
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2642
BLAZE_ALWAYS_INLINE T1 & operator+=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Addition assignment operator for the addition of two SIMD packs.
Definition: BasicTypes.h:1285
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:61
#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:81
#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:79
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2646
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:258
Header file for the SymmetricValue class.
Constraint on the data type.
Constraint on the data type.
BLAZE_ALWAYS_INLINE void conjugate(T &a) noexcept(IsNumeric< T >::value)
In-place conjugation of the given value/object.
Definition: Conjugate.h:120
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:314
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2637
#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:61
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:950
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:81
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:2638
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:240
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2644
#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:79
BLAZE_ALWAYS_INLINE T1 & operator-=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Subtraction assignment operator for the subtraction of two SIMD packs.
Definition: BasicTypes.h:1303
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
#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:112
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:609
#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:61
BLAZE_ALWAYS_INLINE void transpose(Matrix< MT, SO > &matrix)
In-place transpose of the given matrix.
Definition: Matrix.h:564