35#ifndef _BLAZE_MATH_ADAPTORS_UPPERMATRIX_SPARSE_H_
36#define _BLAZE_MATH_ADAPTORS_UPPERMATRIX_SPARSE_H_
103 using OT = OppositeType_t<MT>;
104 using TT = TransposeType_t<MT>;
105 using ET = ElementType_t<MT>;
110 using This = UpperMatrix<MT,SO,false>;
111 using BaseType = SparseMatrix<This,SO>;
112 using ResultType = This;
113 using OppositeType = UpperMatrix<OT,!SO,false>;
114 using TransposeType = LowerMatrix<TT,!SO,false>;
115 using ElementType = ET;
116 using TagType = TagType_t<MT>;
117 using ReturnType = ReturnType_t<MT>;
118 using CompositeType =
const This&;
119 using Reference = UpperProxy<MT>;
120 using ConstReference = ConstReference_t<MT>;
121 using Iterator = Iterator_t<MT>;
122 using ConstIterator = ConstIterator_t<MT>;
128 template<
typename NewType >
131 using Other = UpperMatrix< typename MT::template Rebind<NewType>::Other >;
138 template<
size_t NewM
142 using Other = UpperMatrix< typename MT::template Resize<NewM,NewN>::Other >;
148 static constexpr bool smpAssignable =
false;
154 inline UpperMatrix();
155 explicit inline UpperMatrix(
size_t n );
156 inline UpperMatrix(
size_t n,
size_t nonzeros );
157 inline UpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
158 inline UpperMatrix( initializer_list< initializer_list<ElementType> > list );
160 inline UpperMatrix(
const UpperMatrix& m );
161 inline UpperMatrix( UpperMatrix&& m )
noexcept;
163 template<
typename MT2,
bool SO2 >
164 inline UpperMatrix(
const Matrix<MT2,SO2>& m );
171 ~UpperMatrix() =
default;
178 inline Reference operator()(
size_t i,
size_t j );
179 inline ConstReference operator()(
size_t i,
size_t j )
const;
180 inline Reference at(
size_t i,
size_t j );
181 inline ConstReference at(
size_t i,
size_t j )
const;
182 inline Iterator
begin (
size_t i );
183 inline ConstIterator
begin (
size_t i )
const;
184 inline ConstIterator
cbegin(
size_t i )
const;
185 inline Iterator
end (
size_t i );
186 inline ConstIterator
end (
size_t i )
const;
187 inline ConstIterator
cend (
size_t i )
const;
194 inline UpperMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
196 inline UpperMatrix& operator=(
const UpperMatrix& rhs );
197 inline UpperMatrix& operator=( UpperMatrix&& rhs )
noexcept;
199 template<
typename MT2,
bool SO2 >
200 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
203 template<
typename MT2,
bool SO2 >
204 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
207 template<
typename MT2,
bool SO2 >
208 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
211 template<
typename MT2,
bool SO2 >
212 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
215 template<
typename MT2,
bool SO2 >
216 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
219 template<
typename MT2,
bool SO2 >
220 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
223 template<
typename MT2,
bool SO2 >
224 inline auto operator%=(
const Matrix<MT2,SO2>& rhs ) -> UpperMatrix&;
231 inline size_t rows() const noexcept;
232 inline
size_t columns() const noexcept;
233 inline
size_t capacity() const noexcept;
234 inline
size_t capacity(
size_t i ) const noexcept;
236 inline
size_t nonZeros(
size_t i ) const;
238 inline
void reset(
size_t i );
240 inline
void resize (
size_t n,
bool preserve=true );
241 inline
void reserve(
size_t nonzeros );
242 inline
void reserve(
size_t i,
size_t nonzeros );
244 inline
void trim(
size_t i );
246 inline
void swap( UpperMatrix& m ) noexcept;
248 static constexpr
size_t maxNonZeros() noexcept;
249 static constexpr
size_t maxNonZeros(
size_t n ) noexcept;
256 inline Iterator
set(
size_t i,
size_t j, const ElementType& value );
257 inline Iterator insert(
size_t i,
size_t j, const ElementType& value );
258 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
259 inline
void finalize(
size_t i );
266 inline
void erase(
size_t i,
size_t j );
267 inline Iterator erase(
size_t i, Iterator pos );
268 inline Iterator erase(
size_t i, Iterator first, Iterator last );
270 template< typename Pred >
271 inline
void erase( Pred predicate );
273 template< typename Pred >
274 inline
void erase(
size_t i, Iterator first, Iterator last, Pred predicate );
281 inline Iterator
find (
size_t i,
size_t j );
282 inline ConstIterator
find (
size_t i,
size_t j ) const;
283 inline Iterator
lowerBound(
size_t i,
size_t j );
284 inline ConstIterator
lowerBound(
size_t i,
size_t j ) const;
285 inline Iterator
upperBound(
size_t i,
size_t j );
286 inline ConstIterator
upperBound(
size_t i,
size_t j ) const;
293 template< typename Other > inline UpperMatrix& scale( const Other& scalar );
300 inline
bool isIntact() const noexcept;
307 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
308 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
310 inline
bool canSMPAssign() const noexcept;
318 inline
void resetLower();
330 template< typename MT2,
bool SO2,
bool DF2 >
331 friend MT2& derestrict( UpperMatrix<MT2,SO2,DF2>& m );
370inline UpperMatrix<MT,SO,false>::UpperMatrix()
389inline UpperMatrix<MT,SO,false>::UpperMatrix(
size_t n )
411inline UpperMatrix<MT,SO,false>::UpperMatrix(
size_t n,
size_t nonzeros )
412 : matrix_( n, n, nonzeros )
435inline UpperMatrix<MT,SO,false>::UpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
436 : matrix_( n, n, nonzeros )
493inline UpperMatrix<MT,SO,false>::UpperMatrix(
const UpperMatrix& m )
494 : matrix_( m.matrix_ )
511inline UpperMatrix<MT,SO,false>::UpperMatrix( UpperMatrix&& m ) noexcept
512 : matrix_( std::move( m.matrix_ ) )
533template<
typename MT2
535inline UpperMatrix<MT,SO,false>::UpperMatrix(
const Matrix<MT2,SO2>& m )
538 if( !IsUpper_v<MT2> && !
isUpper( matrix_ ) ) {
542 if( !IsUpper_v<MT2> )
578inline typename UpperMatrix<MT,SO,false>::Reference
579 UpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
584 return Reference( matrix_, i, j );
608inline typename UpperMatrix<MT,SO,false>::ConstReference
609 UpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const
639inline typename UpperMatrix<MT,SO,false>::Reference
640 UpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
673inline typename UpperMatrix<MT,SO,false>::ConstReference
674 UpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const
702inline typename UpperMatrix<MT,SO,false>::Iterator
703 UpperMatrix<MT,SO,false>::begin(
size_t i )
705 return matrix_.begin(i);
725inline typename UpperMatrix<MT,SO,false>::ConstIterator
726 UpperMatrix<MT,SO,false>::begin(
size_t i )
const
728 return matrix_.begin(i);
748inline typename UpperMatrix<MT,SO,false>::ConstIterator
749 UpperMatrix<MT,SO,false>::cbegin(
size_t i )
const
751 return matrix_.cbegin(i);
771inline typename UpperMatrix<MT,SO,false>::Iterator
772 UpperMatrix<MT,SO,false>::end(
size_t i )
774 return matrix_.end(i);
794inline typename UpperMatrix<MT,SO,false>::ConstIterator
795 UpperMatrix<MT,SO,false>::end(
size_t i )
const
797 return matrix_.end(i);
817inline typename UpperMatrix<MT,SO,false>::ConstIterator
818 UpperMatrix<MT,SO,false>::cend(
size_t i )
const
820 return matrix_.cend(i);
861inline UpperMatrix<MT,SO,false>&
864 const InitializerMatrix<ElementType> tmp( list, list.size() );
893inline UpperMatrix<MT,SO,false>&
894 UpperMatrix<MT,SO,false>::operator=(
const UpperMatrix& rhs )
896 matrix_ = rhs.matrix_;
916inline UpperMatrix<MT,SO,false>&
917 UpperMatrix<MT,SO,false>::operator=( UpperMatrix&& rhs )
noexcept
919 matrix_ = std::move( rhs.matrix_ );
945template<
typename MT2
947inline auto UpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
948 -> DisableIf_t< IsComputation_v<MT2>, UpperMatrix& >
950 if( !IsUpper_v<MT2> && !
isUpper( *rhs ) ) {
956 if( !IsUpper_v<MT2> )
983template<
typename MT2
985inline auto UpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
986 -> EnableIf_t< IsComputation_v<MT2>, UpperMatrix& >
988 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
992 if( IsUpper_v<MT2> ) {
1002 matrix_ = std::move( tmp );
1005 if( !IsUpper_v<MT2> )
1030template<
typename MT
1032template<
typename MT2
1034inline auto UpperMatrix<MT,SO,false>::operator+=(
const Matrix<MT2,SO2>& rhs )
1035 -> DisableIf_t< IsComputation_v<MT2>, UpperMatrix& >
1037 if( !IsUpper_v<MT2> && !
isUpper( *rhs ) ) {
1043 if( !IsUpper_v<MT2> )
1068template<
typename MT
1070template<
typename MT2
1072inline auto UpperMatrix<MT,SO,false>::operator+=(
const Matrix<MT2,SO2>& rhs )
1073 -> EnableIf_t< IsComputation_v<MT2>, UpperMatrix& >
1075 if( IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1079 if( IsUpper_v<MT2> ) {
1083 const ResultType_t<MT2> tmp( *rhs );
1092 if( !IsUpper_v<MT2> )
1117template<
typename MT
1119template<
typename MT2
1121inline auto UpperMatrix<MT,SO,false>::operator-=(
const Matrix<MT2,SO2>& rhs )
1122 -> DisableIf_t< IsComputation_v<MT2>, UpperMatrix& >
1124 if( !IsUpper_v<MT2> && !
isUpper( *rhs ) ) {
1130 if( !IsUpper_v<MT2> )
1155template<
typename MT
1157template<
typename MT2
1159inline auto UpperMatrix<MT,SO,false>::operator-=(
const Matrix<MT2,SO2>& rhs )
1160 -> EnableIf_t< IsComputation_v<MT2>, UpperMatrix& >
1162 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1166 if( IsUpper_v<MT2> ) {
1170 const ResultType_t<MT2> tmp( *rhs );
1179 if( !IsUpper_v<MT2> )
1202template<
typename MT
1204template<
typename MT2
1206inline auto UpperMatrix<MT,SO,false>::operator%=(
const Matrix<MT2,SO2>& rhs )
1209 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1215 if( !IsUpper_v<MT2> )
1241template<
typename MT
1243inline size_t UpperMatrix<MT,SO,false>::rows() const noexcept
1245 return matrix_.rows();
1257template<
typename MT
1259inline size_t UpperMatrix<MT,SO,false>::columns() const noexcept
1261 return matrix_.columns();
1273template<
typename MT
1275inline size_t UpperMatrix<MT,SO,false>::capacity() const noexcept
1277 return matrix_.capacity();
1295template<
typename MT
1297inline size_t UpperMatrix<MT,SO,false>::capacity(
size_t i )
const noexcept
1299 return matrix_.capacity(i);
1311template<
typename MT
1313inline size_t UpperMatrix<MT,SO,false>::nonZeros()
const
1315 return matrix_.nonZeros();
1333template<
typename MT
1335inline size_t UpperMatrix<MT,SO,false>::nonZeros(
size_t i )
const
1337 return matrix_.nonZeros(i);
1349template<
typename MT
1351inline void UpperMatrix<MT,SO,false>::reset()
1372template<
typename MT
1374inline void UpperMatrix<MT,SO,false>::reset(
size_t i )
1390template<
typename MT
1392inline void UpperMatrix<MT,SO,false>::clear()
1418template<
typename MT
1420void UpperMatrix<MT,SO,false>::resize(
size_t n,
bool preserve )
1426 matrix_.resize( n, n, preserve );
1443template<
typename MT
1445inline void UpperMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1447 matrix_.reserve( nonzeros );
1467template<
typename MT
1469inline void UpperMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1471 matrix_.reserve( i, nonzeros );
1488template<
typename MT
1490inline void UpperMatrix<MT,SO,false>::trim()
1510template<
typename MT
1512inline void UpperMatrix<MT,SO,false>::trim(
size_t i )
1530template<
typename MT
1532inline void UpperMatrix<MT,SO,false>::shrinkToFit()
1534 matrix_.shrinkToFit();
1547template<
typename MT
1549inline void UpperMatrix<MT,SO,false>::swap( UpperMatrix& m )
noexcept
1553 swap( matrix_, m.matrix_ );
1570template<
typename MT
1572constexpr size_t UpperMatrix<MT,SO,false>::maxNonZeros() noexcept
1576 return maxNonZeros( Size_v<MT,0UL> );
1592template<
typename MT
1594constexpr size_t UpperMatrix<MT,SO,false>::maxNonZeros(
size_t n )
noexcept
1596 return ( ( n + 1UL ) * n ) / 2UL;
1608template<
typename MT
1610inline void UpperMatrix<MT,SO,false>::resetLower()
1615 for(
size_t j=0UL; j<
columns(); ++j )
1616 erase( matrix_, j, matrix_.upperBound( j, j ), matrix_.end( j ) );
1619 for(
size_t i=1UL; i<
rows(); ++i )
1620 erase( matrix_, i, matrix_.begin( i ), matrix_.lowerBound( i, i ) );
1651template<
typename MT
1653inline typename UpperMatrix<MT,SO,false>::Iterator
1654 UpperMatrix<MT,SO,false>::set(
size_t i,
size_t j,
const ElementType& value )
1660 return matrix_.set( i, j, value );
1683template<
typename MT
1685inline typename UpperMatrix<MT,SO,false>::Iterator
1686 UpperMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1692 return matrix_.insert( i, j, value );
1748template<
typename MT
1750inline void UpperMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1756 matrix_.append( i, j, value, check );
1776template<
typename MT
1778inline void UpperMatrix<MT,SO,false>::finalize(
size_t i )
1780 matrix_.finalize( i );
1804template<
typename MT
1806inline void UpperMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1810 erase( matrix_, i, j );
1828template<
typename MT
1830inline typename UpperMatrix<MT,SO,false>::Iterator
1831 UpperMatrix<MT,SO,false>::erase(
size_t i, Iterator pos )
1835 return erase( matrix_, i, pos );
1854template<
typename MT
1856inline typename UpperMatrix<MT,SO,false>::Iterator
1857 UpperMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last )
1861 return erase( matrix_, i, first, last );
1889template<
typename MT
1891template<
typename Pred >
1892inline void UpperMatrix<MT,SO,false>::erase( Pred predicate )
1896 erase( matrix_, predicate );
1932template<
typename MT
1934template<
typename Pred >
1935inline void UpperMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last, Pred predicate )
1939 erase( matrix_, i, first, last, predicate );
1971template<
typename MT
1973inline typename UpperMatrix<MT,SO,false>::Iterator
1974 UpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
1976 return matrix_.find( i, j );
1998template<
typename MT
2000inline typename UpperMatrix<MT,SO,false>::ConstIterator
2001 UpperMatrix<MT,SO,false>::find(
size_t i,
size_t j )
const
2003 return matrix_.find( i, j );
2025template<
typename MT
2027inline typename UpperMatrix<MT,SO,false>::Iterator
2028 UpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
2030 return matrix_.lowerBound( i, j );
2052template<
typename MT
2054inline typename UpperMatrix<MT,SO,false>::ConstIterator
2055 UpperMatrix<MT,SO,false>::lowerBound(
size_t i,
size_t j )
const
2057 return matrix_.lowerBound( i, j );
2079template<
typename MT
2081inline typename UpperMatrix<MT,SO,false>::Iterator
2082 UpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
2084 return matrix_.upperBound( i, j );
2106template<
typename MT
2108inline typename UpperMatrix<MT,SO,false>::ConstIterator
2109 UpperMatrix<MT,SO,false>::upperBound(
size_t i,
size_t j )
const
2111 return matrix_.upperBound( i, j );
2143template<
typename MT
2145template<
typename Other >
2146inline UpperMatrix<MT,SO,false>&
2147 UpperMatrix<MT,SO,false>::scale(
const Other& scalar )
2149 matrix_.scale( scalar );
2174template<
typename MT
2176inline bool UpperMatrix<MT,SO,false>::isIntact() const noexcept
2205template<
typename MT
2207template<
typename Other >
2208inline bool UpperMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2210 return matrix_.canAlias( alias );
2227template<
typename MT
2229template<
typename Other >
2230inline bool UpperMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2232 return matrix_.isAliased( alias );
2249template<
typename MT
2251inline bool UpperMatrix<MT,SO,false>::canSMPAssign() const noexcept
2253 return matrix_.canSMPAssign();
Header file for auxiliary alias declarations.
Header file for run time assertion macros.
Constraint on the data type.
Header file for the EnableIf class template.
Constraint on the data type.
Header file for the IsComputation type trait class.
Header file for the isDefault shim.
Header file for the IsSquare type trait.
Header file for the IsUpper type trait.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the UpperProxy class.
Constraint on the data type.
Constraint on the data type.
Header file for the implementation of the base template of the UpperMatrix.
Base class for sparse matrices.
Definition SparseMatrix.h:77
Matrix adapter for upper triangular matrices.
Definition BaseTemplate.h:558
Initializer list type of the Blaze library.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the implementation of a matrix representation of an initializer list.
Header file for the SparseMatrix base class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.
Definition Volatile.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.
Definition Pointer.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.
Definition Const.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.
Definition Reference.h:79
auto operator+=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Addition assignment operator for the addition of a dense matrix and a scalar value ( ).
Definition DenseMatrix.h:386
decltype(auto) declupp(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as upper.
Definition DMatDeclUppExpr.h:1004
auto operator-=(DenseMatrix< MT, SO > &mat, ST scalar) -> EnableIf_t< IsScalar_v< ST >, MT & >
Subtraction assignment operator for the subtraction of a dense matrix and a scalar value ( ).
Definition DenseMatrix.h:448
bool isUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper triangular matrix.
Definition DenseMatrix.h:2188
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition DiagonalMatrix.h:207
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition DiagonalMatrix.h:225
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VIEW_TYPE(T)
Constraint on the data type.
Definition View.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.
Definition Hermitian.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.
Definition Upper.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.
Definition Computation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_STATIC_TYPE(T)
Constraint on the data type.
Definition Static.h:61
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition SparseMatrix.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.
Definition Lower.h:81
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE_TYPE(T)
Constraint on the data type.
Definition Resizable.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSFORMATION_TYPE(T)
Constraint on the data type.
Definition Transformation.h:81
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.
Definition StorageOrder.h:63
constexpr ptrdiff_t Size_v
Auxiliary variable template for the Size type trait.
Definition Size.h:176
constexpr void clear(Matrix< MT, SO > &matrix)
Clearing the given matrix.
Definition Matrix.h:960
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:628
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition Matrix.h:644
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition Matrix.h:730
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:562
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition Matrix.h:692
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition Matrix.h:806
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition Matrix.h:660
void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition Matrix.h:1108
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:584
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition Matrix.h:518
void shrinkToFit(Matrix< MT, SO > &matrix)
Requesting the removal of unused capacity.
Definition Matrix.h:1169
bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition Matrix.h:1383
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition Assert.h:117
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
MT::Iterator upperBound(SparseMatrix< MT, SO > &sm, size_t i, size_t j)
Returns an iterator to the first index greater than the given index.
Definition SparseMatrix.h:244
MT::Iterator lowerBound(SparseMatrix< MT, SO > &sm, size_t i, size_t j)
Returns an iterator to the first index not less than the given index.
Definition SparseMatrix.h:194
MT::Iterator find(SparseMatrix< MT, SO > &sm, size_t i, size_t j)
Searches for a specific matrix element.
Definition SparseMatrix.h:144
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition StaticAssert.h:112
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:138
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition Exception.h:331
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition Exception.h:235
typename EnableIf<!Condition, T >::Type DisableIf_t
Auxiliary type for the EnableIf class template.
Definition EnableIf.h:175
Header file for the exception macros of the math module.
Header file for the extended initializer_list functionality.
Header file for all adaptor forward declarations.
Constraints on the storage order of matrix types.
Header file for the Size type trait.
Header file for utility functions for sparse matrices.
Header file for basic type definitions.