35 #ifndef _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_SPARSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_SPARSE_H_ 105 template<
typename MT
107 class UniUpperMatrix<MT,SO,false>
108 :
public SparseMatrix< UniUpperMatrix<MT,SO,false>, SO >
112 typedef OppositeType_<MT> OT;
113 typedef TransposeType_<MT> TT;
114 typedef ElementType_<MT> ET;
119 typedef UniUpperMatrix<MT,SO,false>
This;
120 typedef SparseMatrix<This,SO>
BaseType;
135 template<
typename NewType >
138 typedef UniUpperMatrix< typename MT::template Rebind<NewType>::Other > Other;
145 template<
size_t NewM
149 typedef UniUpperMatrix< typename MT::template Resize<NewM,NewN>::Other > Other;
160 typedef Iterator_<MT> IteratorType;
162 typedef std::forward_iterator_tag IteratorCategory;
163 typedef UniUpperElement<MT> ValueType;
164 typedef ValueType PointerType;
165 typedef ValueType ReferenceType;
166 typedef ptrdiff_t DifferenceType;
169 typedef IteratorCategory iterator_category;
170 typedef ValueType value_type;
171 typedef PointerType pointer;
172 typedef ReferenceType reference;
173 typedef DifferenceType difference_type;
191 inline Iterator( IteratorType pos,
size_t index )
213 inline const Iterator operator++(
int ) {
226 return ReferenceType( pos_, pos_->index() == index_ );
235 inline PointerType operator->()
const {
236 return PointerType( pos_, pos_->index() == index_ );
257 return pos_ == rhs.pos_;
268 return !( *
this == rhs );
279 return pos_ - rhs.pos_;
288 inline IteratorType base()
const {
303 enum :
bool { smpAssignable =
false };
309 explicit inline UniUpperMatrix();
310 explicit inline UniUpperMatrix(
size_t n );
311 explicit inline UniUpperMatrix(
size_t n,
size_t nonzeros );
312 explicit inline UniUpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
314 inline UniUpperMatrix(
const UniUpperMatrix& m );
315 inline UniUpperMatrix( UniUpperMatrix&& m ) noexcept;
317 template<
typename MT2,
bool SO2 >
318 inline UniUpperMatrix(
const Matrix<MT2,SO2>& m );
329 inline Reference operator()(
size_t i,
size_t j );
330 inline ConstReference operator()(
size_t i,
size_t j )
const;
331 inline Reference at(
size_t i,
size_t j );
332 inline ConstReference at(
size_t i,
size_t j )
const;
334 inline ConstIterator
begin (
size_t i )
const;
335 inline ConstIterator
cbegin(
size_t i )
const;
337 inline ConstIterator
end (
size_t i )
const;
338 inline ConstIterator
cend (
size_t i )
const;
345 inline UniUpperMatrix& operator=(
const UniUpperMatrix& rhs );
346 inline UniUpperMatrix& operator=( UniUpperMatrix&& rhs ) noexcept;
348 template<
typename MT2,
bool SO2 >
349 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix& > operator=(
const Matrix<MT2,SO2>& rhs );
351 template<
typename MT2,
bool SO2 >
352 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix& > operator=(
const Matrix<MT2,SO2>& rhs );
354 template<
typename MT2,
bool SO2 >
355 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix& >
operator+=(
const Matrix<MT2,SO2>& rhs );
357 template<
typename MT2,
bool SO2 >
358 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix& >
operator+=(
const Matrix<MT2,SO2>& rhs );
360 template<
typename MT2,
bool SO2 >
361 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix& >
operator-=(
const Matrix<MT2,SO2>& rhs );
363 template<
typename MT2,
bool SO2 >
364 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix& >
operator-=(
const Matrix<MT2,SO2>& rhs );
366 template<
typename MT2,
bool SO2 >
367 inline UniUpperMatrix&
operator*=(
const Matrix<MT2,SO2>& rhs );
374 inline size_t rows() const noexcept;
375 inline
size_t columns() const noexcept;
376 inline
size_t capacity() const noexcept;
377 inline
size_t capacity(
size_t i ) const noexcept;
379 inline
size_t nonZeros(
size_t i ) const;
381 inline
void reset(
size_t i );
383 inline
void resize (
size_t n,
bool preserve=true );
384 inline
void reserve(
size_t nonzeros );
385 inline
void reserve(
size_t i,
size_t nonzeros );
387 inline
void trim(
size_t i );
388 inline
void swap( UniUpperMatrix& m ) noexcept;
390 static inline constexpr
size_t maxNonZeros() noexcept;
391 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
398 inline
Iterator set (
size_t i,
size_t j, const ElementType& value );
399 inline
Iterator insert (
size_t i,
size_t j, const ElementType& value );
400 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
401 inline
void finalize(
size_t i );
408 inline
void erase(
size_t i,
size_t j );
412 template< typename Pred >
413 inline
void erase( Pred predicate );
415 template< typename Pred >
416 inline
void erase(
size_t i,
Iterator first,
Iterator last, Pred predicate );
423 inline
Iterator find (
size_t i,
size_t j );
424 inline ConstIterator find (
size_t i,
size_t j ) const;
425 inline
Iterator lowerBound(
size_t i,
size_t j );
426 inline ConstIterator lowerBound(
size_t i,
size_t j ) const;
427 inline
Iterator upperBound(
size_t i,
size_t j );
428 inline ConstIterator upperBound(
size_t i,
size_t j ) const;
435 inline
bool isIntact() const noexcept;
442 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
443 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
445 inline
bool canSMPAssign() const noexcept;
453 inline
void resetLower();
465 template< typename MT2,
bool SO2,
bool DF2 >
466 friend MT2& derestrict( UniUpperMatrix<MT2,SO2,DF2>& m );
502 template< typename MT
504 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix()
521 template<
typename MT
523 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
size_t n )
528 for(
size_t i=0UL; i<n; ++i ) {
530 matrix_.finalize( i );
549 template<
typename MT
551 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
size_t n,
size_t nonzeros )
552 : matrix_( n, n,
max( nonzeros, n ) )
556 for(
size_t i=0UL; i<n; ++i ) {
558 matrix_.finalize( i );
581 template<
typename MT
583 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
584 : matrix_( n, n, nonzeros )
588 for(
size_t i=0UL; i<n; ++i )
590 if( nonzeros[i] == 0UL ) {
595 matrix_.finalize( i );
610 template<
typename MT
612 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
const UniUpperMatrix& m )
613 : matrix_( m.matrix_ )
628 template<
typename MT
630 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix( UniUpperMatrix&& m ) noexcept
631 : matrix_( std::move( m.matrix_ ) )
650 template<
typename MT
652 template<
typename MT2
654 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
const Matrix<MT2,SO2>& m )
657 if( !IsUniUpper<MT2>::value && !
isUniUpper( matrix_ ) ) {
661 if( !IsUniUpper<MT2>::value )
695 template<
typename MT
698 UniUpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
725 template<
typename MT
728 UniUpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const 756 template<
typename MT
759 UniUpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
790 template<
typename MT
793 UniUpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const 819 template<
typename MT
824 return Iterator( matrix_.begin(i), i );
842 template<
typename MT
847 return matrix_.begin(i);
865 template<
typename MT
870 return matrix_.cbegin(i);
888 template<
typename MT
893 return Iterator( matrix_.end(i), i );
911 template<
typename MT
916 return matrix_.end(i);
934 template<
typename MT
939 return matrix_.cend(i);
963 template<
typename MT
965 inline UniUpperMatrix<MT,SO,false>&
966 UniUpperMatrix<MT,SO,false>::operator=(
const UniUpperMatrix& rhs )
968 matrix_ = rhs.matrix_;
986 template<
typename MT
988 inline UniUpperMatrix<MT,SO,false>&
989 UniUpperMatrix<MT,SO,false>::operator=( UniUpperMatrix&& rhs ) noexcept
991 matrix_ = std::move( rhs.matrix_ );
1015 template<
typename MT
1017 template<
typename MT2
1019 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1020 UniUpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
1022 if( IsStrictlyTriangular<MT2>::value || ( !IsUniUpper<MT2>::value && !
isUniUpper( ~rhs ) ) ) {
1028 if( !IsUniUpper<MT2>::value )
1053 template<
typename MT
1055 template<
typename MT2
1057 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1058 UniUpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
1060 if( IsStrictlyTriangular<MT2>::value || ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1064 if( IsUniUpper<MT2>::value ) {
1074 matrix_ = std::move( tmp );
1077 if( !IsUniUpper<MT2>::value )
1102 template<
typename MT
1104 template<
typename MT2
1106 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1109 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1116 if( !IsStrictlyUpper<MT2>::value )
1141 template<
typename MT
1143 template<
typename MT2
1145 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1148 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1149 ( IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1153 if( IsStrictlyUpper<MT2>::value ) {
1157 const ResultType_<MT2> tmp( ~rhs );
1166 if( !IsStrictlyUpper<MT2>::value )
1191 template<
typename MT
1193 template<
typename MT2
1195 inline DisableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1198 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1205 if( !IsStrictlyUpper<MT2>::value )
1230 template<
typename MT
1232 template<
typename MT2
1234 inline EnableIf_< IsComputation<MT2>, UniUpperMatrix<MT,SO,false>& >
1237 if( IsLower<MT2>::value || IsUniTriangular<MT2>::value ||
1238 ( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) ) {
1242 if( IsStrictlyUpper<MT2>::value ) {
1246 const ResultType_<MT2> tmp( ~rhs );
1255 if( !IsStrictlyUpper<MT2>::value )
1279 template<
typename MT
1281 template<
typename MT2
1283 inline UniUpperMatrix<MT,SO,false>&
1286 if( matrix_.rows() != (~rhs).
columns() ) {
1290 MT tmp( matrix_ * ~rhs );
1296 matrix_ = std::move( tmp );
1298 if( !IsUniUpper<MT2>::value )
1324 template<
typename MT
1328 return matrix_.rows();
1340 template<
typename MT
1344 return matrix_.columns();
1356 template<
typename MT
1360 return matrix_.capacity();
1378 template<
typename MT
1382 return matrix_.capacity(i);
1394 template<
typename MT
1398 return matrix_.nonZeros();
1416 template<
typename MT
1420 return matrix_.nonZeros(i);
1432 template<
typename MT
1437 for(
size_t j=1UL; j<
columns(); ++j ) {
1438 matrix_.erase( j, matrix_.begin(j), matrix_.lowerBound(j,j) );
1442 for(
size_t i=0UL; i<
rows(); ++i ) {
1443 matrix_.erase( i, matrix_.lowerBound(i,i+1UL), matrix_.end(i) );
1464 template<
typename MT
1469 matrix_.erase( i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1472 matrix_.erase( i, matrix_.lowerBound(i,i+1UL), matrix_.end(i) );
1487 template<
typename MT
1493 if( IsResizable<MT>::value ) {
1519 template<
typename MT
1527 const size_t oldsize( matrix_.rows() );
1529 matrix_.resize( n, n, preserve );
1532 for(
size_t i=oldsize; i<n; ++i )
1533 matrix_.insert( i, i, ElementType(1) );
1551 template<
typename MT
1553 inline void UniUpperMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1555 matrix_.reserve( nonzeros );
1575 template<
typename MT
1577 inline void UniUpperMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1579 matrix_.reserve( i, nonzeros );
1596 template<
typename MT
1598 inline void UniUpperMatrix<MT,SO,false>::trim()
1618 template<
typename MT
1620 inline void UniUpperMatrix<MT,SO,false>::trim(
size_t i )
1635 template<
typename MT
1641 swap( matrix_, m.matrix_ );
1658 template<
typename MT
1660 inline constexpr
size_t UniUpperMatrix<MT,SO,false>::maxNonZeros() noexcept
1664 return maxNonZeros( Rows<MT>::value );
1680 template<
typename MT
1682 inline constexpr
size_t UniUpperMatrix<MT,SO,false>::maxNonZeros(
size_t n ) noexcept
1684 return ( ( n + 1UL ) * n ) / 2UL;
1696 template<
typename MT
1698 inline void UniUpperMatrix<MT,SO,false>::resetLower()
1701 for(
size_t j=0UL; j<
columns(); ++j )
1702 matrix_.erase( j, matrix_.upperBound( j, j ), matrix_.end( j ) );
1705 for(
size_t i=1UL; i<
rows(); ++i )
1706 matrix_.erase( i, matrix_.begin( i ), matrix_.lowerBound( i, i ) );
1737 template<
typename MT
1746 return Iterator( matrix_.set( i, j, value ), ( SO ? j : i ) );
1769 template<
typename MT
1772 UniUpperMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1778 return Iterator( matrix_.insert( i, j, value ), ( SO ? j : i ) );
1834 template<
typename MT
1836 inline void UniUpperMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1843 matrix_.insert( i, j, value );
1863 template<
typename MT
1865 inline void UniUpperMatrix<MT,SO,false>::finalize(
size_t i )
1893 template<
typename MT
1895 inline void UniUpperMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1901 matrix_.erase( i, j );
1921 template<
typename MT
1924 UniUpperMatrix<MT,SO,false>::erase(
size_t i,
Iterator pos )
1926 if( pos != matrix_.end(i) && pos->index() == i ) {
1930 return Iterator( matrix_.erase( i, pos.base() ), i );
1951 template<
typename MT
1954 UniUpperMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last )
1959 if( ( !SO && first.base() == matrix_.begin(i) ) ||
1960 ( SO && last.base() == matrix_.end(i) ) ) {
1964 return Iterator( matrix_.erase( i, first.base(), last.base() ), i );
1992 template<
typename MT
1994 template<
typename Pred >
1995 inline void UniUpperMatrix<MT,SO,false>::erase( Pred predicate )
1998 for(
size_t j=1UL; j<
columns(); ++j ) {
1999 matrix_.erase( j, matrix_.begin(j), matrix_.find(j,j), predicate );
2003 for(
size_t i=0UL; (i+1UL) <
rows(); ++i ) {
2004 matrix_.erase( i, matrix_.lowerBound(i,i+1UL), matrix_.end(i), predicate );
2042 template<
typename MT
2044 template<
typename Pred >
2045 inline void UniUpperMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last, Pred predicate )
2050 if( ( !SO && first.base() == matrix_.begin(i) && predicate(
ElementType(1) ) ) ||
2051 ( SO && last.base() == matrix_.end(i) && predicate(
ElementType(1) ) ) ) {
2055 matrix_.erase( i, first.base(), last.base(), predicate );
2087 template<
typename MT
2090 UniUpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
2092 return Iterator( matrix_.find( i, j ), ( SO ? j : i ) );
2114 template<
typename MT
2117 UniUpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const 2119 return matrix_.find( i, j );
2141 template<
typename MT
2144 UniUpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
2146 return Iterator( matrix_.lowerBound( i, j ), ( SO ? j : i ) );
2168 template<
typename MT
2171 UniUpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const 2173 return matrix_.lowerBound( i, j );
2195 template<
typename MT
2198 UniUpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
2200 return Iterator( matrix_.upperBound( i, j ), ( SO ? j : i ) );
2222 template<
typename MT
2225 UniUpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const 2227 return matrix_.upperBound( i, j );
2251 template<
typename MT
2282 template<
typename MT
2284 template<
typename Other >
2285 inline bool UniUpperMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2287 return matrix_.canAlias( alias );
2304 template<
typename MT
2306 template<
typename Other >
2307 inline bool UniUpperMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2309 return matrix_.isAliased( alias );
2326 template<
typename MT
2328 inline bool UniUpperMatrix<MT,SO,false>::canSMPAssign() const noexcept
2330 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.
Header file for mathematical functions.
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for the Rows type trait.
Header file for the IsUniUpper type trait.
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:352
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
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:194
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:2935
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:5556
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2928
#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:390
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.
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1802
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2931
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:304
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:238
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.
Header file for the DisableIf class template.
Header file for the IsStrictlyUpper type trait.
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:5635
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5618
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
#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.
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:250
Constraint on the data type.
Header file for the IsLower type trait.
Header file for the UniUpperProxy class.
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:336
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:2932
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:544
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:260
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:2933
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:290
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2937
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 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.
Header file for the UniUpperValue class.
#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
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:1493
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2934
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:2938
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:267
Constraint on the data type.
Header file for the UniUpperElement class.
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
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:320
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2929
#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
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2930
bool isUniUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper unitriangular matrix.
Definition: DenseMatrix.h:1406
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:249
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2936
#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
#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:677
Header file for the IsResizable type trait.
const DMatDMatMultExpr< T1, T2, false, false, false, false > 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:7505
#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
Header file for the implementation of the base template of the UniUpperMatrix.