35 #ifndef _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_SPARSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_SPARSE_H_ 108 template<
typename MT
110 class UniUpperMatrix<MT,SO,false>
111 :
public SparseMatrix< UniUpperMatrix<MT,SO,false>, SO >
115 using OT = OppositeType_t<MT>;
116 using TT = TransposeType_t<MT>;
117 using ET = ElementType_t<MT>;
122 using This = UniUpperMatrix<MT,SO,false>;
123 using BaseType = SparseMatrix<This,SO>;
138 template<
typename NewType >
141 using Other = UniUpperMatrix< typename MT::template Rebind<NewType>::Other >;
148 template<
size_t NewM
152 using Other = UniUpperMatrix< typename MT::template Resize<NewM,NewN>::Other >;
163 using IteratorType = Iterator_t<MT>;
165 using IteratorCategory = std::forward_iterator_tag;
166 using ValueType = UniUpperElement<MT>;
167 using PointerType = ValueType;
168 using ReferenceType = ValueType;
169 using DifferenceType = ptrdiff_t;
172 using iterator_category = IteratorCategory;
173 using value_type = ValueType;
174 using pointer = PointerType;
175 using reference = ReferenceType;
176 using difference_type = DifferenceType;
194 inline Iterator( IteratorType pos,
size_t index )
216 inline const Iterator operator++(
int ) {
229 return ReferenceType( pos_, pos_->index() == index_ );
238 inline PointerType operator->()
const {
239 return PointerType( pos_, pos_->index() == index_ );
260 return pos_ == rhs.pos_;
271 return !( *
this == rhs );
282 return pos_ - rhs.pos_;
291 inline IteratorType base()
const {
312 explicit inline UniUpperMatrix();
313 explicit inline UniUpperMatrix(
size_t n );
314 explicit inline UniUpperMatrix(
size_t n,
size_t nonzeros );
315 explicit inline UniUpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
316 explicit inline UniUpperMatrix( initializer_list< initializer_list<ElementType> > list );
318 inline UniUpperMatrix(
const UniUpperMatrix& m );
319 inline UniUpperMatrix( UniUpperMatrix&& m ) noexcept;
321 template<
typename MT2,
bool SO2 >
322 inline UniUpperMatrix(
const Matrix<MT2,SO2>& m );
329 ~UniUpperMatrix() =
default;
336 inline Reference operator()(
size_t i,
size_t j );
338 inline Reference at(
size_t i,
size_t j );
352 inline UniUpperMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
354 inline UniUpperMatrix& operator=(
const UniUpperMatrix& rhs );
355 inline UniUpperMatrix& operator=( UniUpperMatrix&& rhs ) noexcept;
357 template<
typename MT2,
bool SO2 >
358 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
359 -> DisableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >;
361 template<
typename MT2,
bool SO2 >
362 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
363 -> EnableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >;
365 template<
typename MT2,
bool SO2 >
366 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
367 -> DisableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >;
369 template<
typename MT2,
bool SO2 >
370 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
371 -> EnableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >;
373 template<
typename MT2,
bool SO2 >
374 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
375 -> DisableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >;
377 template<
typename MT2,
bool SO2 >
378 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
379 -> EnableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >;
381 template<
typename MT2,
bool SO2 >
382 inline auto operator%=(
const Matrix<MT2,SO2>& rhs ) -> UniUpperMatrix&;
389 inline size_t rows() const noexcept;
390 inline
size_t columns() const noexcept;
391 inline
size_t capacity() const noexcept;
392 inline
size_t capacity(
size_t i ) const noexcept;
394 inline
size_t nonZeros(
size_t i ) const;
396 inline
void reset(
size_t i );
398 inline
void resize (
size_t n,
bool preserve=true );
399 inline
void reserve(
size_t nonzeros );
400 inline
void reserve(
size_t i,
size_t nonzeros );
402 inline
void trim(
size_t i );
404 inline
void swap( UniUpperMatrix& m ) noexcept;
406 static inline constexpr
size_t maxNonZeros() noexcept;
407 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
416 inline
void append (
size_t i,
size_t j, const
ElementType& value,
bool check=false );
417 inline
void finalize(
size_t i );
424 inline
void erase(
size_t i,
size_t j );
428 template< typename Pred >
429 inline
void erase( Pred predicate );
431 template< typename Pred >
432 inline
void erase(
size_t i,
Iterator first,
Iterator last, Pred predicate );
439 inline
Iterator find (
size_t i,
size_t j );
441 inline
Iterator lowerBound(
size_t i,
size_t j );
443 inline
Iterator upperBound(
size_t i,
size_t j );
451 inline
bool isIntact() const noexcept;
458 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
459 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
461 inline
bool canSMPAssign() const noexcept;
469 inline
void resetLower();
481 template< typename MT2,
bool SO2,
bool DF2 >
482 friend MT2& derestrict( UniUpperMatrix<MT2,SO2,DF2>& m );
519 template< typename MT
521 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix()
538 template<
typename MT
540 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
size_t n )
545 for(
size_t i=0UL; i<n; ++i ) {
547 matrix_.finalize( i );
566 template<
typename MT
568 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
size_t n,
size_t nonzeros )
569 : matrix_( n, n,
max( nonzeros, n ) )
573 for(
size_t i=0UL; i<n; ++i ) {
575 matrix_.finalize( i );
598 template<
typename MT
600 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
601 : matrix_( n, n, nonzeros )
605 for(
size_t i=0UL; i<n; ++i )
607 if( nonzeros[i] == 0UL ) {
612 matrix_.finalize( i );
645 template<
typename MT
647 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix( initializer_list< initializer_list<ElementType> > list )
666 template<
typename MT
668 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
const UniUpperMatrix& m )
669 : matrix_( m.matrix_ )
684 template<
typename MT
686 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix( UniUpperMatrix&& m ) noexcept
687 : matrix_( std::move( m.matrix_ ) )
706 template<
typename MT
708 template<
typename MT2
710 inline UniUpperMatrix<MT,SO,false>::UniUpperMatrix(
const Matrix<MT2,SO2>& m )
713 if( !IsUniUpper_v<MT2> && !
isUniUpper( matrix_ ) ) {
717 if( !IsUniUpper_v<MT2> )
751 template<
typename MT
754 UniUpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
781 template<
typename MT
784 UniUpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const 812 template<
typename MT
815 UniUpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
846 template<
typename MT
849 UniUpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const 875 template<
typename MT
880 return Iterator( matrix_.begin(i), i );
898 template<
typename MT
903 return matrix_.begin(i);
921 template<
typename MT
926 return matrix_.cbegin(i);
944 template<
typename MT
949 return Iterator( matrix_.end(i), i );
967 template<
typename MT
972 return matrix_.end(i);
990 template<
typename MT
995 return matrix_.cend(i);
1034 template<
typename MT
1036 inline UniUpperMatrix<MT,SO,false>&
1037 UniUpperMatrix<MT,SO,false>::operator=( initializer_list< initializer_list<ElementType> > list )
1039 const InitializerMatrix<ElementType> tmp( list, list.size() );
1066 template<
typename MT
1068 inline UniUpperMatrix<MT,SO,false>&
1069 UniUpperMatrix<MT,SO,false>::operator=(
const UniUpperMatrix& rhs )
1071 matrix_ = rhs.matrix_;
1089 template<
typename MT
1091 inline UniUpperMatrix<MT,SO,false>&
1092 UniUpperMatrix<MT,SO,false>::operator=( UniUpperMatrix&& rhs ) noexcept
1094 matrix_ = std::move( rhs.matrix_ );
1118 template<
typename MT
1120 template<
typename MT2
1122 inline auto UniUpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
1123 -> DisableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >
1125 if( IsStrictlyTriangular_v<MT2> || ( !IsUniUpper_v<MT2> && !
isUniUpper( ~rhs ) ) ) {
1131 if( !IsUniUpper_v<MT2> )
1156 template<
typename MT
1158 template<
typename MT2
1160 inline auto UniUpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
1161 -> EnableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >
1163 if( IsStrictlyTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1167 if( IsUniUpper_v<MT2> ) {
1177 matrix_ = std::move( tmp );
1180 if( !IsUniUpper_v<MT2> )
1205 template<
typename MT
1207 template<
typename MT2
1210 -> DisableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >
1212 if( IsLower_v<MT2> || IsUniTriangular_v<MT2> ||
1219 if( !IsStrictlyUpper_v<MT2> )
1244 template<
typename MT
1246 template<
typename MT2
1249 -> EnableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >
1251 if( IsLower_v<MT2> || IsUniTriangular_v<MT2> ||
1252 ( IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1256 if( IsStrictlyUpper_v<MT2> ) {
1260 const ResultType_t<MT2> tmp( ~rhs );
1269 if( !IsStrictlyUpper_v<MT2> )
1294 template<
typename MT
1296 template<
typename MT2
1299 -> DisableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >
1301 if( IsLower_v<MT2> || IsUniTriangular_v<MT2> ||
1308 if( !IsStrictlyUpper_v<MT2> )
1333 template<
typename MT
1335 template<
typename MT2
1338 -> EnableIf_t< IsComputation_v<MT2>, UniUpperMatrix& >
1340 if( IsLower_v<MT2> || IsUniTriangular_v<MT2> ||
1341 ( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) ) {
1345 if( IsStrictlyUpper_v<MT2> ) {
1349 const ResultType_t<MT2> tmp( ~rhs );
1358 if( !IsStrictlyUpper_v<MT2> )
1383 template<
typename MT
1385 template<
typename MT2
1387 inline auto UniUpperMatrix<MT,SO,false>::operator%=(
const Matrix<MT2,SO2>& rhs )
1390 if( !IsSquare_v<MT2> && !
isSquare( ~rhs ) ) {
1394 If_t< IsComputation_v<MT2>, ResultType_t<MT2>,
const MT2& > tmp( ~rhs );
1396 for(
size_t i=0UL; i<(~rhs).
rows(); ++i ) {
1397 if( !
isOne( tmp(i,i) ) ) {
1404 if( !IsUniUpper_v<MT2> )
1430 template<
typename MT
1434 return matrix_.rows();
1446 template<
typename MT
1450 return matrix_.columns();
1462 template<
typename MT
1466 return matrix_.capacity();
1484 template<
typename MT
1488 return matrix_.capacity(i);
1500 template<
typename MT
1504 return matrix_.nonZeros();
1522 template<
typename MT
1526 return matrix_.nonZeros(i);
1538 template<
typename MT
1543 for(
size_t j=1UL; j<
columns(); ++j ) {
1544 matrix_.erase( j, matrix_.begin(j), matrix_.lowerBound(j,j) );
1548 for(
size_t i=0UL; i<
rows(); ++i ) {
1549 matrix_.erase( i, matrix_.lowerBound(i,i+1UL), matrix_.end(i) );
1570 template<
typename MT
1575 matrix_.erase( i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1578 matrix_.erase( i, matrix_.lowerBound(i,i+1UL), matrix_.end(i) );
1593 template<
typename MT
1599 if( IsResizable_v<MT> ) {
1625 template<
typename MT
1633 const size_t oldsize( matrix_.rows() );
1635 matrix_.resize( n, n, preserve );
1638 for(
size_t i=oldsize; i<n; ++i )
1657 template<
typename MT
1659 inline void UniUpperMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1661 matrix_.reserve( nonzeros );
1681 template<
typename MT
1683 inline void UniUpperMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1685 matrix_.reserve( i, nonzeros );
1702 template<
typename MT
1704 inline void UniUpperMatrix<MT,SO,false>::trim()
1724 template<
typename MT
1726 inline void UniUpperMatrix<MT,SO,false>::trim(
size_t i )
1744 template<
typename MT
1748 matrix_.shrinkToFit();
1761 template<
typename MT
1767 swap( matrix_, m.matrix_ );
1784 template<
typename MT
1786 inline constexpr
size_t UniUpperMatrix<MT,SO,false>::maxNonZeros() noexcept
1790 return maxNonZeros( Size_v<MT,0UL> );
1806 template<
typename MT
1808 inline constexpr
size_t UniUpperMatrix<MT,SO,false>::maxNonZeros(
size_t n ) noexcept
1810 return ( ( n + 1UL ) * n ) / 2UL;
1822 template<
typename MT
1824 inline void UniUpperMatrix<MT,SO,false>::resetLower()
1827 for(
size_t j=0UL; j<
columns(); ++j )
1828 matrix_.erase( j, matrix_.upperBound( j, j ), matrix_.end( j ) );
1831 for(
size_t i=1UL; i<
rows(); ++i )
1832 matrix_.erase( i, matrix_.begin( i ), matrix_.lowerBound( i, i ) );
1863 template<
typename MT
1872 return Iterator( matrix_.set( i, j, value ), ( SO ? j : i ) );
1895 template<
typename MT
1898 UniUpperMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1904 return Iterator( matrix_.insert( i, j, value ), ( SO ? j : i ) );
1960 template<
typename MT
1962 inline void UniUpperMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1968 if( !check || !isDefault<strict>( value ) )
1969 matrix_.insert( i, j, value );
1989 template<
typename MT
1991 inline void UniUpperMatrix<MT,SO,false>::finalize(
size_t i )
2019 template<
typename MT
2021 inline void UniUpperMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
2027 matrix_.erase( i, j );
2047 template<
typename MT
2050 UniUpperMatrix<MT,SO,false>::erase(
size_t i,
Iterator pos )
2052 if( pos != matrix_.end(i) && pos->index() == i ) {
2056 return Iterator( matrix_.erase( i, pos.base() ), i );
2077 template<
typename MT
2080 UniUpperMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last )
2085 if( ( !SO && first.base() == matrix_.begin(i) ) ||
2086 ( SO && last.base() == matrix_.end(i) ) ) {
2090 return Iterator( matrix_.erase( i, first.base(), last.base() ), i );
2118 template<
typename MT
2120 template<
typename Pred >
2121 inline void UniUpperMatrix<MT,SO,false>::erase( Pred predicate )
2124 for(
size_t j=1UL; j<
columns(); ++j ) {
2125 matrix_.erase( j, matrix_.begin(j), matrix_.find(j,j), predicate );
2129 for(
size_t i=0UL; (i+1UL) <
rows(); ++i ) {
2130 matrix_.erase( i, matrix_.lowerBound(i,i+1UL), matrix_.end(i), predicate );
2168 template<
typename MT
2170 template<
typename Pred >
2171 inline void UniUpperMatrix<MT,SO,false>::erase(
size_t i,
Iterator first,
Iterator last, Pred predicate )
2176 if( ( !SO && first.base() == matrix_.begin(i) && predicate(
ElementType(1) ) ) ||
2177 ( SO && last.base() == matrix_.end(i) && predicate(
ElementType(1) ) ) ) {
2181 matrix_.erase( i, first.base(), last.base(), predicate );
2213 template<
typename MT
2216 UniUpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
2218 return Iterator( matrix_.find( i, j ), ( SO ? j : i ) );
2240 template<
typename MT
2243 UniUpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const 2245 return matrix_.find( i, j );
2267 template<
typename MT
2270 UniUpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
2272 return Iterator( matrix_.lowerBound( i, j ), ( SO ? j : i ) );
2294 template<
typename MT
2297 UniUpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const 2299 return matrix_.lowerBound( i, j );
2321 template<
typename MT
2324 UniUpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
2326 return Iterator( matrix_.upperBound( i, j ), ( SO ? j : i ) );
2348 template<
typename MT
2351 UniUpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const 2353 return matrix_.upperBound( i, j );
2377 template<
typename MT
2408 template<
typename MT
2410 template<
typename Other >
2411 inline bool UniUpperMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2413 return matrix_.canAlias( alias );
2430 template<
typename MT
2432 template<
typename Other >
2433 inline bool UniUpperMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2435 return matrix_.isAliased( alias );
2452 template<
typename MT
2454 inline bool UniUpperMatrix<MT,SO,false>::canSMPAssign() const noexcept
2456 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.
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:3078
#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 IsUniUpper type trait.
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:546
Header file for basic type definitions.
constexpr 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:750
#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.
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:3077
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3075
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:591
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: CompressedMatrix.h:3113
void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition: Matrix.h:799
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:5828
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:3079
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:3084
decltype(auto) declupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as upper.
Definition: DMatDeclUppExpr.h:1002
#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
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:584
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:3085
Header file for the extended initializer_list functionality.
Constraint on the data type.
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
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:482
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:416
Constraint on the data type.
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 implementation of a matrix representation of an initializer list.
Headerfile for the generic max algorithm.
Header file for the DisableIf class template.
Header file for the IsStrictlyUpper type trait.
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:3083
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_CONSTRAINT_MUST_BE_STATIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a static data type, i.e. a vector or matrix with dimensions fixed at compile time, a compilation error is created.
Definition: Static.h:61
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5907
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5890
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:3076
#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
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:3080
#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
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3086
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:253
Constraint on the data type.
Header file for the IsLower type trait.
Header file for the UniUpperProxy class.
Header file for the IsUniTriangular type trait.
Header file for the IsStrictlyTriangular type trait.
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
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1179
void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:738
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:438
decltype(auto) operator*(const DenseMatrix< MT1, false > &lhs, const DenseMatrix< MT2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:8908
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:293
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:611
Header file for the isOne shim.
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:1446
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:1357
Header file for run time assertion macros.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNIFORM_TYPE(T)
Constraint on the data type.In case the given data type T is a uniform vector or matrix type...
Definition: Uniform.h:81
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
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:693
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:281
BLAZE_ALWAYS_INLINE const EnableIf_t< IsIntegral_v< T > &&HasSize_v< T, 1UL >, If_t< IsSigned_v< T >, SIMDint8, SIMDuint8 > > set(T value) noexcept
Sets all values in the vector to the given 1-byte integral value.
Definition: Set.h:75
Constraint on the data type.
Header file for the UniUpperElement class.
Constraint on the data type.
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3081
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE_TYPE(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.
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:3082
#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 isUniUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper unitriangular matrix.
Definition: DenseMatrix.h:1359
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:263
#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:1375
#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
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:951
Header file for the IsResizable type trait.
Header file for the Size 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
Header file for the implementation of the base template of the UniUpperMatrix.
constexpr ptrdiff_t Size_v
Auxiliary variable template for the Size type trait.The Size_v variable template provides a convenien...
Definition: Size.h:176
Header file for the clear shim.