35 #ifndef _BLAZE_MATH_ADAPTORS_UPPERMATRIX_SPARSE_H_ 36 #define _BLAZE_MATH_ADAPTORS_UPPERMATRIX_SPARSE_H_ 97 class UpperMatrix<MT,SO,false>
98 :
public SparseMatrix< UpperMatrix<MT,SO,false>, SO >
102 typedef OppositeType_<MT> OT;
103 typedef TransposeType_<MT> TT;
104 typedef ElementType_<MT> ET;
109 typedef UpperMatrix<MT,SO,false>
This;
110 typedef SparseMatrix<This,SO>
BaseType;
126 template<
typename NewType >
129 typedef UpperMatrix< typename MT::template Rebind<NewType>::Other > Other;
136 template<
size_t NewM
140 typedef UpperMatrix< typename MT::template Resize<NewM,NewN>::Other > Other;
146 enum :
bool { smpAssignable =
false };
152 explicit inline UpperMatrix();
153 explicit inline UpperMatrix(
size_t n );
154 explicit inline UpperMatrix(
size_t n,
size_t nonzeros );
155 explicit inline UpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
157 inline UpperMatrix(
const UpperMatrix& m );
158 inline UpperMatrix( UpperMatrix&& m ) noexcept;
160 template<
typename MT2,
bool SO2 >
161 inline UpperMatrix(
const Matrix<MT2,SO2>& m );
172 inline Reference operator()(
size_t i,
size_t j );
173 inline ConstReference operator()(
size_t i,
size_t j )
const;
174 inline Reference at(
size_t i,
size_t j );
175 inline ConstReference at(
size_t i,
size_t j )
const;
176 inline Iterator
begin (
size_t i );
177 inline ConstIterator
begin (
size_t i )
const;
178 inline ConstIterator
cbegin(
size_t i )
const;
179 inline Iterator
end (
size_t i );
180 inline ConstIterator
end (
size_t i )
const;
181 inline ConstIterator
cend (
size_t i )
const;
188 inline UpperMatrix& operator=(
const UpperMatrix& rhs );
189 inline UpperMatrix& operator=( UpperMatrix&& rhs ) noexcept;
191 template<
typename MT2,
bool SO2 >
192 inline DisableIf_< IsComputation<MT2>, UpperMatrix& > operator=(
const Matrix<MT2,SO2>& rhs );
194 template<
typename MT2,
bool SO2 >
195 inline EnableIf_< IsComputation<MT2>, UpperMatrix& > operator=(
const Matrix<MT2,SO2>& rhs );
197 template<
typename MT2,
bool SO2 >
198 inline DisableIf_< IsComputation<MT2>, UpperMatrix& >
operator+=(
const Matrix<MT2,SO2>& rhs );
200 template<
typename MT2,
bool SO2 >
201 inline EnableIf_< IsComputation<MT2>, UpperMatrix& >
operator+=(
const Matrix<MT2,SO2>& rhs );
203 template<
typename MT2,
bool SO2 >
204 inline DisableIf_< IsComputation<MT2>, UpperMatrix& >
operator-=(
const Matrix<MT2,SO2>& rhs );
206 template<
typename MT2,
bool SO2 >
207 inline EnableIf_< IsComputation<MT2>, UpperMatrix& >
operator-=(
const Matrix<MT2,SO2>& rhs );
209 template<
typename MT2,
bool SO2 >
210 inline UpperMatrix&
operator*=(
const Matrix<MT2,SO2>& rhs );
212 template<
typename Other >
213 inline EnableIf_< IsNumeric<Other>, UpperMatrix >&
operator*=( Other rhs );
215 template<
typename Other >
216 inline EnableIf_< IsNumeric<Other>, UpperMatrix >&
operator/=( Other rhs );
223 inline size_t rows() const noexcept;
224 inline
size_t columns() const noexcept;
225 inline
size_t capacity() const noexcept;
226 inline
size_t capacity(
size_t i ) const noexcept;
228 inline
size_t nonZeros(
size_t i ) const;
230 inline
void reset(
size_t i );
232 inline
void resize (
size_t n,
bool preserve=true );
233 inline
void reserve(
size_t nonzeros );
234 inline
void reserve(
size_t i,
size_t nonzeros );
236 inline
void trim(
size_t i );
237 inline
void swap( UpperMatrix& m ) noexcept;
239 static inline constexpr
size_t maxNonZeros() noexcept;
240 static inline constexpr
size_t maxNonZeros(
size_t n ) noexcept;
247 inline Iterator
set(
size_t i,
size_t j, const ElementType& value );
248 inline Iterator insert(
size_t i,
size_t j, const ElementType& value );
249 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
250 inline
void finalize(
size_t i );
257 inline
void erase(
size_t i,
size_t j );
258 inline Iterator erase(
size_t i, Iterator pos );
259 inline Iterator erase(
size_t i, Iterator first, Iterator last );
261 template< typename Pred >
262 inline
void erase( Pred predicate );
264 template< typename Pred >
265 inline
void erase(
size_t i, Iterator first, Iterator last, Pred predicate );
272 inline Iterator find (
size_t i,
size_t j );
273 inline ConstIterator find (
size_t i,
size_t j ) const;
274 inline Iterator lowerBound(
size_t i,
size_t j );
275 inline ConstIterator lowerBound(
size_t i,
size_t j ) const;
276 inline Iterator upperBound(
size_t i,
size_t j );
277 inline ConstIterator upperBound(
size_t i,
size_t j ) const;
284 template< typename Other > inline UpperMatrix& scale( const Other& scalar );
285 template< typename Other > inline UpperMatrix& scaleDiagonal( const Other& scale );
292 inline
bool isIntact() const noexcept;
299 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
300 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
302 inline
bool canSMPAssign() const noexcept;
310 inline
void resetLower();
322 template<
bool RF, typename MT2,
bool SO2,
bool DF2 >
323 friend
bool isDefault( const UpperMatrix<MT2,SO2,DF2>& m );
325 template< typename MT2,
bool SO2,
bool DF2 >
326 friend MT2& derestrict( UpperMatrix<MT2,SO2,DF2>& m );
361 template< typename MT
363 inline UpperMatrix<MT,SO,false>::UpperMatrix()
380 template<
typename MT
382 inline UpperMatrix<MT,SO,false>::UpperMatrix(
size_t n )
402 template<
typename MT
404 inline UpperMatrix<MT,SO,false>::UpperMatrix(
size_t n,
size_t nonzeros )
405 : matrix_( n, n, nonzeros )
426 template<
typename MT
428 inline UpperMatrix<MT,SO,false>::UpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
429 : matrix_( n, n, nonzeros )
445 template<
typename MT
447 inline UpperMatrix<MT,SO,false>::UpperMatrix(
const UpperMatrix& m )
448 : matrix_( m.matrix_ )
463 template<
typename MT
465 inline UpperMatrix<MT,SO,false>::UpperMatrix( UpperMatrix&& m ) noexcept
466 : matrix_( std::move( m.matrix_ ) )
485 template<
typename MT
487 template<
typename MT2
489 inline UpperMatrix<MT,SO,false>::UpperMatrix(
const Matrix<MT2,SO2>& m )
492 if( !IsUpper<MT2>::value && !
isUpper( matrix_ ) ) {
496 if( !IsUpper<MT2>::value )
530 template<
typename MT
533 UpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
560 template<
typename MT
563 UpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const 591 template<
typename MT
594 UpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
625 template<
typename MT
628 UpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const 654 template<
typename MT
659 return matrix_.begin(i);
677 template<
typename MT
682 return matrix_.begin(i);
700 template<
typename MT
705 return matrix_.cbegin(i);
723 template<
typename MT
728 return matrix_.end(i);
746 template<
typename MT
751 return matrix_.end(i);
769 template<
typename MT
774 return matrix_.cend(i);
798 template<
typename MT
800 inline UpperMatrix<MT,SO,false>&
801 UpperMatrix<MT,SO,false>::operator=(
const UpperMatrix& rhs )
803 matrix_ = rhs.matrix_;
821 template<
typename MT
823 inline UpperMatrix<MT,SO,false>&
824 UpperMatrix<MT,SO,false>::operator=( UpperMatrix&& rhs ) noexcept
826 matrix_ = std::move( rhs.matrix_ );
850 template<
typename MT
852 template<
typename MT2
854 inline DisableIf_< IsComputation<MT2>, UpperMatrix<MT,SO,false>& >
855 UpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
857 if( !IsUpper<MT2>::value && !
isUpper( ~rhs ) ) {
863 if( !IsUpper<MT2>::value )
888 template<
typename MT
890 template<
typename MT2
892 inline EnableIf_< IsComputation<MT2>, UpperMatrix<MT,SO,false>& >
893 UpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
895 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
899 if( IsUpper<MT2>::value ) {
909 matrix_ = std::move( tmp );
912 if( !IsUpper<MT2>::value )
937 template<
typename MT
939 template<
typename MT2
941 inline DisableIf_< IsComputation<MT2>, UpperMatrix<MT,SO,false>& >
944 if( !IsUpper<MT2>::value && !
isUpper( ~rhs ) ) {
950 if( !IsUpper<MT2>::value )
975 template<
typename MT
977 template<
typename MT2
979 inline EnableIf_< IsComputation<MT2>, UpperMatrix<MT,SO,false>& >
982 if( IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
986 if( IsUpper<MT2>::value ) {
990 const ResultType_<MT2> tmp( ~rhs );
999 if( !IsUpper<MT2>::value )
1024 template<
typename MT
1026 template<
typename MT2
1028 inline DisableIf_< IsComputation<MT2>, UpperMatrix<MT,SO,false>& >
1031 if( !IsUpper<MT2>::value && !
isUpper( ~rhs ) ) {
1037 if( !IsUpper<MT2>::value )
1062 template<
typename MT
1064 template<
typename MT2
1066 inline EnableIf_< IsComputation<MT2>, UpperMatrix<MT,SO,false>& >
1069 if( !IsSquare<MT2>::value && !
isSquare( ~rhs ) ) {
1073 if( IsUpper<MT2>::value ) {
1077 const ResultType_<MT2> tmp( ~rhs );
1086 if( !IsUpper<MT2>::value )
1110 template<
typename MT
1112 template<
typename MT2
1114 inline UpperMatrix<MT,SO,false>&
1117 if( matrix_.rows() != (~rhs).
columns() ) {
1121 MT tmp( matrix_ * ~rhs );
1127 matrix_ = std::move( tmp );
1129 if( !IsUpper<MT2>::value )
1149 template<
typename MT
1151 template<
typename Other >
1152 inline EnableIf_< IsNumeric<Other>, UpperMatrix<MT,SO,false> >&
1169 template<
typename MT
1171 template<
typename Other >
1172 inline EnableIf_< IsNumeric<Other>, UpperMatrix<MT,SO,false> >&
1198 template<
typename MT
1202 return matrix_.rows();
1214 template<
typename MT
1218 return matrix_.columns();
1230 template<
typename MT
1234 return matrix_.capacity();
1252 template<
typename MT
1256 return matrix_.capacity(i);
1268 template<
typename MT
1272 return matrix_.nonZeros();
1290 template<
typename MT
1294 return matrix_.nonZeros(i);
1306 template<
typename MT
1329 template<
typename MT
1347 template<
typename MT
1374 template<
typename MT
1382 matrix_.resize( n, n, preserve );
1399 template<
typename MT
1401 inline void UpperMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1403 matrix_.reserve( nonzeros );
1423 template<
typename MT
1425 inline void UpperMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1427 matrix_.reserve( i, nonzeros );
1444 template<
typename MT
1446 inline void UpperMatrix<MT,SO,false>::trim()
1466 template<
typename MT
1468 inline void UpperMatrix<MT,SO,false>::trim(
size_t i )
1483 template<
typename MT
1489 swap( matrix_, m.matrix_ );
1506 template<
typename MT
1508 inline constexpr
size_t UpperMatrix<MT,SO,false>::maxNonZeros() noexcept
1512 return maxNonZeros( Rows<MT>::value );
1528 template<
typename MT
1530 inline constexpr
size_t UpperMatrix<MT,SO,false>::maxNonZeros(
size_t n ) noexcept
1532 return ( ( n + 1UL ) * n ) / 2UL;
1544 template<
typename MT
1546 inline void UpperMatrix<MT,SO,false>::resetLower()
1549 for(
size_t j=0UL; j<
columns(); ++j )
1550 matrix_.erase( j, matrix_.upperBound( j, j ), matrix_.end( j ) );
1553 for(
size_t i=1UL; i<
rows(); ++i )
1554 matrix_.erase( i, matrix_.begin( i ), matrix_.lowerBound( i, i ) );
1585 template<
typename MT
1594 return matrix_.set( i, j, value );
1617 template<
typename MT
1620 UpperMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1626 return matrix_.insert( i, j, value );
1682 template<
typename MT
1684 inline void UpperMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1690 matrix_.append( i, j, value, check );
1710 template<
typename MT
1712 inline void UpperMatrix<MT,SO,false>::finalize(
size_t i )
1714 matrix_.finalize( i );
1738 template<
typename MT
1740 inline void UpperMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1742 matrix_.erase( i, j );
1760 template<
typename MT
1763 UpperMatrix<MT,SO,false>::erase(
size_t i, Iterator pos )
1765 return matrix_.erase( i, pos );
1784 template<
typename MT
1787 UpperMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last )
1789 return matrix_.erase( i, first, last );
1817 template<
typename MT
1819 template<
typename Pred >
1820 inline void UpperMatrix<MT,SO,false>::erase( Pred predicate )
1822 matrix_.erase( predicate );
1858 template<
typename MT
1860 template<
typename Pred >
1861 inline void UpperMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last, Pred predicate )
1863 matrix_.erase( i, first, last, predicate );
1895 template<
typename MT
1898 UpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
1900 return matrix_.find( i, j );
1922 template<
typename MT
1925 UpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const 1927 return matrix_.find( i, j );
1949 template<
typename MT
1952 UpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
1954 return matrix_.lowerBound( i, j );
1976 template<
typename MT
1979 UpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const 1981 return matrix_.lowerBound( i, j );
2003 template<
typename MT
2006 UpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
2008 return matrix_.upperBound( i, j );
2030 template<
typename MT
2033 UpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const 2035 return matrix_.upperBound( i, j );
2056 template<
typename MT
2058 template<
typename Other >
2059 inline UpperMatrix<MT,SO,false>&
2060 UpperMatrix<MT,SO,false>::scale(
const Other& scalar )
2062 matrix_.scale( scalar );
2076 template<
typename MT
2078 template<
typename Other >
2079 inline UpperMatrix<MT,SO,false>&
2080 UpperMatrix<MT,SO,false>::scaleDiagonal(
const Other& scalar )
2082 matrix_.scaleDiagonal( scalar );
2107 template<
typename MT
2138 template<
typename MT
2140 template<
typename Other >
2141 inline bool UpperMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2143 return matrix_.canAlias( alias );
2160 template<
typename MT
2162 template<
typename Other >
2163 inline bool UpperMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2165 return matrix_.isAliased( alias );
2182 template<
typename MT
2184 inline bool UpperMatrix<MT,SO,false>::canSMPAssign() const noexcept
2186 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.
bool isUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper triangular matrix.
Definition: DenseMatrix.h:1321
#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.
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
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.
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
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.
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 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.
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:336
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
Header file for the UpperProxy class.
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.
#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: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_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.
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 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
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
Header file for the implementation of the base template of the UpperMatrix.
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:677
#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