35 #ifndef _BLAZE_MATH_ADAPTORS_UNILOWERMATRIX_SPARSE_H_
36 #define _BLAZE_MATH_ADAPTORS_UNILOWERMATRIX_SPARSE_H_
105 template<
typename MT
107 class UniLowerMatrix<MT,SO,false>
108 :
public SparseMatrix< UniLowerMatrix<MT,SO,false>, SO >
112 typedef OppositeType_<MT> OT;
113 typedef TransposeType_<MT> TT;
114 typedef ElementType_<MT> ET;
119 typedef UniLowerMatrix<MT,SO,false>
This;
120 typedef SparseMatrix<This,SO>
BaseType;
135 template<
typename ET >
138 typedef UniLowerMatrix< typename MT::template Rebind<ET>::Other > Other;
149 typedef Iterator_<MT> IteratorType;
151 typedef std::forward_iterator_tag IteratorCategory;
152 typedef UniLowerElement<MT> ValueType;
153 typedef ValueType PointerType;
154 typedef ValueType 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;
180 inline Iterator( IteratorType pos,
size_t index )
202 inline const Iterator operator++(
int ) {
215 return ReferenceType( pos_, pos_->index() == index_ );
224 inline PointerType operator->()
const {
225 return PointerType( pos_, pos_->index() == index_ );
246 return pos_ == rhs.pos_;
257 return !( *
this == rhs );
268 return pos_ - rhs.pos_;
277 inline IteratorType base()
const {
292 enum :
bool { smpAssignable =
false };
298 explicit inline UniLowerMatrix();
299 explicit inline UniLowerMatrix(
size_t n );
300 explicit inline UniLowerMatrix(
size_t n,
size_t nonzeros );
301 explicit inline UniLowerMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
303 inline UniLowerMatrix(
const UniLowerMatrix& m );
304 inline UniLowerMatrix( UniLowerMatrix&& m ) noexcept;
306 template< typename MT2,
bool SO2 >
307 inline UniLowerMatrix( const Matrix<MT2,SO2>& 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 UniLowerMatrix& operator=( const UniLowerMatrix& rhs );
335 inline UniLowerMatrix& operator=( UniLowerMatrix&& rhs ) noexcept;
337 template< typename MT2,
bool SO2 >
338 inline
DisableIf_< IsComputation<MT2>, UniLowerMatrix& > operator=( const Matrix<MT2,SO2>& rhs );
340 template< typename MT2,
bool SO2 >
341 inline
EnableIf_< IsComputation<MT2>, UniLowerMatrix& > operator=( const Matrix<MT2,SO2>& rhs );
343 template< typename MT2,
bool SO2 >
344 inline
DisableIf_< IsComputation<MT2>, UniLowerMatrix& > operator+=( const Matrix<MT2,SO2>& rhs );
346 template< typename MT2,
bool SO2 >
347 inline
EnableIf_< IsComputation<MT2>, UniLowerMatrix& > operator+=( const Matrix<MT2,SO2>& rhs );
349 template< typename MT2,
bool SO2 >
350 inline
DisableIf_< IsComputation<MT2>, UniLowerMatrix& > operator-=( const Matrix<MT2,SO2>& rhs );
352 template< typename MT2,
bool SO2 >
353 inline
EnableIf_< IsComputation<MT2>, UniLowerMatrix& > operator-=( const Matrix<MT2,SO2>& rhs );
355 template< typename MT2,
bool SO2 >
356 inline UniLowerMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
363 inline
size_t rows() const noexcept;
364 inline
size_t columns() const noexcept;
365 inline
size_t capacity() const noexcept;
366 inline
size_t capacity(
size_t i ) const noexcept;
368 inline
size_t nonZeros(
size_t i ) const;
370 inline
void reset(
size_t i );
372 inline
Iterator set(
size_t i,
size_t j, const ElementType& value );
373 inline
Iterator insert(
size_t i,
size_t j, const ElementType& value );
374 inline
void erase(
size_t i,
size_t j );
377 inline
void resize (
size_t n,
bool preserve=true );
378 inline
void reserve(
size_t nonzeros );
379 inline
void reserve(
size_t i,
size_t nonzeros );
381 inline
void trim(
size_t i );
382 inline
void swap( UniLowerMatrix& m ) noexcept;
384 static inline constexpr
size_t maxNonZeros() noexcept;
385 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
392 inline
Iterator find (
size_t i,
size_t j );
393 inline ConstIterator find (
size_t i,
size_t j ) const;
394 inline
Iterator lowerBound(
size_t i,
size_t j );
395 inline ConstIterator lowerBound(
size_t i,
size_t j ) const;
396 inline
Iterator upperBound(
size_t i,
size_t j );
397 inline ConstIterator upperBound(
size_t i,
size_t j ) const;
404 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
405 inline
void finalize(
size_t i );
412 inline
bool isIntact() const noexcept;
419 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
420 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
422 inline
bool canSMPAssign() const noexcept;
430 inline
void resetUpper();
442 template< typename MT2,
bool SO2,
bool DF2 >
443 friend MT2& derestrict( UniLowerMatrix<MT2,SO2,DF2>& m );
479 template< typename MT
481 inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix()
498 template<
typename MT
500 inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix(
size_t n )
505 for(
size_t i=0UL; i<n; ++i ) {
507 matrix_.finalize( i );
526 template<
typename MT
528 inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix(
size_t n,
size_t nonzeros )
529 : matrix_( n, n,
max( nonzeros, n ) )
533 for(
size_t i=0UL; i<n; ++i ) {
535 matrix_.finalize( i );
558 template<
typename MT
560 inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
561 : matrix_( n, n, nonzeros )
565 for(
size_t i=0UL; i<n; ++i )
567 if( nonzeros[i] == 0UL ) {
572 matrix_.finalize( i );
587 template<
typename MT
589 inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix(
const UniLowerMatrix& m )
590 : matrix_( m.matrix_ )
605 template<
typename MT
607 inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix( UniLowerMatrix&& m ) noexcept
608 : matrix_(
std::move( m.matrix_ ) )
627 template<
typename MT
629 template<
typename MT2
631 inline UniLowerMatrix<MT,SO,false>::UniLowerMatrix(
const Matrix<MT2,SO2>& m )
634 if( !IsUniLower<MT2>::value && !
isUniLower( matrix_ ) ) {
638 if( !IsUniLower<MT2>::value )
672 template<
typename MT
675 UniLowerMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
702 template<
typename MT
705 UniLowerMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const
733 template<
typename MT
736 UniLowerMatrix<MT,SO,false>::at(
size_t i,
size_t j )
767 template<
typename MT
770 UniLowerMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const
796 template<
typename MT
801 return Iterator( matrix_.begin(i), i );
819 template<
typename MT
824 return matrix_.begin(i);
842 template<
typename MT
847 return matrix_.cbegin(i);
865 template<
typename MT
870 return Iterator( matrix_.end(i), i );
888 template<
typename MT
893 return matrix_.end(i);
911 template<
typename MT
916 return matrix_.cend(i);
940 template<
typename MT
942 inline UniLowerMatrix<MT,SO,false>&
943 UniLowerMatrix<MT,SO,false>::operator=(
const UniLowerMatrix& rhs )
945 matrix_ = rhs.matrix_;
963 template<
typename MT
965 inline UniLowerMatrix<MT,SO,false>&
966 UniLowerMatrix<MT,SO,false>::operator=( UniLowerMatrix&& rhs ) noexcept
968 matrix_ = std::move( rhs.matrix_ );
992 template<
typename MT
994 template<
typename MT2
996 inline DisableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,false>& >
997 UniLowerMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
999 if( IsStrictlyTriangular<MT2>::value || ( !IsUniLower<MT2>::value && !
isUniLower( ~rhs ) ) ) {
1005 if( !IsUniLower<MT2>::value )
1030 template<
typename MT
1032 template<
typename MT2
1034 inline EnableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,false>& >
1035 UniLowerMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
1037 if( IsStrictlyTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1041 if( IsUniLower<MT2>::value ) {
1051 matrix_ = std::move( tmp );
1054 if( !IsUniLower<MT2>::value )
1079 template<
typename MT
1081 template<
typename MT2
1083 inline DisableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,false>& >
1086 if( IsUpper<MT2>::value || IsUniTriangular<MT2>::value ||
1093 if( !IsStrictlyLower<MT2>::value )
1118 template<
typename MT
1120 template<
typename MT2
1122 inline EnableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,false>& >
1125 if( IsUpper<MT2>::value || IsUniTriangular<MT2>::value ||
1126 ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1130 if( IsStrictlyLower<MT2>::value ) {
1134 const ResultType_<MT2> tmp( ~rhs );
1143 if( !IsStrictlyLower<MT2>::value )
1168 template<
typename MT
1170 template<
typename MT2
1172 inline DisableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,false>& >
1175 if( IsUpper<MT2>::value || IsUniTriangular<MT2>::value ||
1182 if( !IsStrictlyLower<MT2>::value )
1207 template<
typename MT
1209 template<
typename MT2
1211 inline EnableIf_< IsComputation<MT2>, UniLowerMatrix<MT,SO,false>& >
1214 if( IsUpper<MT2>::value || IsUniTriangular<MT2>::value ||
1215 ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1219 if( IsStrictlyLower<MT2>::value ) {
1223 const ResultType_<MT2> tmp( ~rhs );
1232 if( !IsStrictlyLower<MT2>::value )
1256 template<
typename MT
1258 template<
typename MT2
1260 inline UniLowerMatrix<MT,SO,false>&
1263 if( matrix_.rows() != (~rhs).
columns() ) {
1267 MT tmp( matrix_ * ~rhs );
1273 matrix_ = std::move( tmp );
1275 if( !IsUniLower<MT2>::value )
1301 template<
typename MT
1305 return matrix_.rows();
1317 template<
typename MT
1321 return matrix_.columns();
1333 template<
typename MT
1337 return matrix_.capacity();
1355 template<
typename MT
1359 return matrix_.capacity(i);
1371 template<
typename MT
1375 return matrix_.nonZeros();
1393 template<
typename MT
1397 return matrix_.nonZeros(i);
1409 template<
typename MT
1414 for(
size_t j=0UL; j<
columns(); ++j ) {
1415 matrix_.erase( j, matrix_.lowerBound(j+1UL,j), matrix_.end(j) );
1419 for(
size_t i=1UL; i<
rows(); ++i ) {
1420 matrix_.erase( i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1441 template<
typename MT
1446 matrix_.erase( i, matrix_.lowerBound(i+1UL,i), matrix_.end(i) );
1449 matrix_.erase( i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1464 template<
typename MT
1470 if( IsResizable<MT>::value ) {
1497 template<
typename MT
1506 return Iterator( matrix_.set( i, j, value ), ( SO ? j : i ) );
1529 template<
typename MT
1532 UniLowerMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1538 return Iterator( matrix_.insert( i, j, value ), ( SO ? j : i ) );
1556 template<
typename MT
1558 inline void UniLowerMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1564 matrix_.erase( i, j );
1584 template<
typename MT
1587 UniLowerMatrix<MT,SO,false>::erase(
size_t i,
Iterator pos )
1589 if( pos != matrix_.end(i) && pos->index() == i ) {
1593 return Iterator( matrix_.erase( i, pos.base() ), i );
1614 template<
typename MT
1617 UniLowerMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last )
1619 for(
Iterator element=first; element!=last; ++element ) {
1620 if( element->index() == i ) {
1625 return Iterator( matrix_.erase( i, first.base(), last.base() ), i );
1646 template<
typename MT
1654 const size_t oldsize( matrix_.rows() );
1656 matrix_.resize( n, n, preserve );
1659 for(
size_t i=oldsize; i<n; ++i )
1660 matrix_.insert( i, i, ElementType(1) );
1678 template<
typename MT
1680 inline void UniLowerMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1682 matrix_.reserve( nonzeros );
1702 template<
typename MT
1704 inline void UniLowerMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1706 matrix_.reserve( i, nonzeros );
1723 template<
typename MT
1725 inline void UniLowerMatrix<MT,SO,false>::trim()
1745 template<
typename MT
1747 inline void UniLowerMatrix<MT,SO,false>::trim(
size_t i )
1762 template<
typename MT
1768 swap( matrix_, m.matrix_ );
1785 template<
typename MT
1787 inline constexpr
size_t UniLowerMatrix<MT,SO,false>::maxNonZeros() noexcept
1791 return maxNonZeros( Rows<MT>::value );
1807 template<
typename MT
1809 inline constexpr
size_t UniLowerMatrix<MT,SO,false>::maxNonZeros(
size_t n ) noexcept
1811 return ( ( n + 1UL ) * n ) / 2UL;
1823 template<
typename MT
1825 inline void UniLowerMatrix<MT,SO,false>::resetUpper()
1828 for(
size_t j=1UL; j<
columns(); ++j )
1829 matrix_.erase( j, matrix_.begin( j ), matrix_.lowerBound( j, j ) );
1832 for(
size_t i=0UL; i<
rows(); ++i )
1833 matrix_.erase( i, matrix_.upperBound( i, i ), matrix_.end( i ) );
1864 template<
typename MT
1867 UniLowerMatrix<MT,SO,false>::find(
size_t i,
size_t j )
1869 return Iterator( matrix_.find( i, j ), ( SO ? j : i ) );
1891 template<
typename MT
1894 UniLowerMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const
1896 return matrix_.find( i, j );
1918 template<
typename MT
1921 UniLowerMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
1923 return Iterator( matrix_.lowerBound( i, j ), ( SO ? j : i ) );
1945 template<
typename MT
1948 UniLowerMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const
1950 return matrix_.lowerBound( i, j );
1972 template<
typename MT
1975 UniLowerMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
1977 return Iterator( matrix_.upperBound( i, j ), ( SO ? j : i ) );
1999 template<
typename MT
2002 UniLowerMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const
2004 return matrix_.upperBound( i, j );
2068 template<
typename MT
2070 inline void UniLowerMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
2077 matrix_.insert( i, j, value );
2097 template<
typename MT
2099 inline void UniLowerMatrix<MT,SO,false>::finalize(
size_t i )
2125 template<
typename MT
2156 template<
typename MT
2158 template<
typename Other >
2159 inline bool UniLowerMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2161 return matrix_.canAlias( alias );
2178 template<
typename MT
2180 template<
typename Other >
2181 inline bool UniLowerMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2183 return matrix_.isAliased( alias );
2200 template<
typename MT
2202 inline bool UniLowerMatrix<MT,SO,false>::canSMPAssign() const noexcept
2204 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 the implementation of the base template of the UniLowerMatrix.
Header file for auxiliary alias declarations.
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.
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.
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1192
#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
Constraint on the data type.
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
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 IsUniLower type trait.
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1716
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
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 clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
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
Header file for the IsUniTriangular type trait.
Header file for the IsStrictlyTriangular type trait.
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
bool isUniLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower unitriangular matrix.
Definition: DenseMatrix.h:1113
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
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2645
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
Header file for the UniLowerElement class.
Header file for the UniLowerProxy class.
Header file for the UniLowerValue class.
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
Header file for all adaptor forward declarations.
#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
Constraint on the data type.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_RESIZABLE(T)
Constraint on the data type.In case the given data type T is resizable, i.e. has a 'resize' member fu...
Definition: Resizable.h:81
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
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: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
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: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
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
#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