35#ifndef _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_SPARSE_H_
36#define _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_SPARSE_H_
101class StrictlyLowerMatrix<MT,SO,false>
102 :
public SparseMatrix< StrictlyLowerMatrix<MT,SO,false>, SO >
106 using OT = OppositeType_t<MT>;
107 using TT = TransposeType_t<MT>;
108 using ET = ElementType_t<MT>;
113 using This = StrictlyLowerMatrix<MT,SO,false>;
114 using BaseType = SparseMatrix<This,SO>;
115 using ResultType = This;
116 using OppositeType = StrictlyLowerMatrix<OT,!SO,false>;
117 using TransposeType = StrictlyUpperMatrix<TT,!SO,false>;
118 using ElementType = ET;
119 using TagType = TagType_t<MT>;
120 using ReturnType = ReturnType_t<MT>;
121 using CompositeType =
const This&;
122 using Reference = StrictlyLowerProxy<MT>;
123 using ConstReference = ConstReference_t<MT>;
124 using Iterator = Iterator_t<MT>;
125 using ConstIterator = ConstIterator_t<MT>;
131 template<
typename NewType >
134 using Other = StrictlyLowerMatrix< typename MT::template Rebind<NewType>::Other >;
141 template<
size_t NewM
145 using Other = StrictlyLowerMatrix< typename MT::template Resize<NewM,NewN>::Other >;
151 static constexpr bool smpAssignable =
false;
157 inline StrictlyLowerMatrix();
158 explicit inline StrictlyLowerMatrix(
size_t n );
159 inline StrictlyLowerMatrix(
size_t n,
size_t nonzeros );
160 inline StrictlyLowerMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
163 inline StrictlyLowerMatrix(
const StrictlyLowerMatrix& m );
164 inline StrictlyLowerMatrix( StrictlyLowerMatrix&& m )
noexcept;
166 template<
typename MT2,
bool SO2 >
167 inline StrictlyLowerMatrix(
const Matrix<MT2,SO2>& m );
174 ~StrictlyLowerMatrix() =
default;
181 inline Reference operator()(
size_t i,
size_t j );
182 inline ConstReference operator()(
size_t i,
size_t j )
const;
183 inline Reference at(
size_t i,
size_t j );
184 inline ConstReference at(
size_t i,
size_t j )
const;
185 inline Iterator
begin (
size_t i );
186 inline ConstIterator
begin (
size_t i )
const;
187 inline ConstIterator
cbegin(
size_t i )
const;
188 inline Iterator
end (
size_t i );
189 inline ConstIterator
end (
size_t i )
const;
190 inline ConstIterator
cend (
size_t i )
const;
199 inline StrictlyLowerMatrix& operator=(
const StrictlyLowerMatrix& rhs );
200 inline StrictlyLowerMatrix& operator=( StrictlyLowerMatrix&& rhs )
noexcept;
202 template<
typename MT2,
bool SO2 >
203 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
204 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >;
206 template<
typename MT2,
bool SO2 >
207 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
208 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >;
210 template<
typename MT2,
bool SO2 >
211 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
212 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >;
214 template<
typename MT2,
bool SO2 >
215 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
216 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >;
218 template<
typename MT2,
bool SO2 >
219 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
220 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >;
222 template<
typename MT2,
bool SO2 >
223 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
224 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >;
226 template<
typename MT2,
bool SO2 >
227 inline auto operator%=(
const Matrix<MT2,SO2>& rhs ) -> StrictlyLowerMatrix&;
234 inline size_t rows() const noexcept;
235 inline
size_t columns() const noexcept;
236 inline
size_t capacity() const noexcept;
237 inline
size_t capacity(
size_t i ) const noexcept;
239 inline
size_t nonZeros(
size_t i ) const;
241 inline
void reset(
size_t i );
243 inline
void resize (
size_t n,
bool preserve=true );
244 inline
void reserve(
size_t nonzeros );
245 inline
void reserve(
size_t i,
size_t nonzeros );
247 inline
void trim(
size_t i );
249 inline
void swap( StrictlyLowerMatrix& m ) noexcept;
251 static constexpr
size_t maxNonZeros() noexcept;
252 static constexpr
size_t maxNonZeros(
size_t n ) noexcept;
259 inline Iterator
set (
size_t i,
size_t j, const ElementType& value );
260 inline Iterator insert (
size_t i,
size_t j, const ElementType& value );
261 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
262 inline
void finalize(
size_t i );
269 inline
void erase(
size_t i,
size_t j );
270 inline Iterator erase(
size_t i, Iterator pos );
271 inline Iterator erase(
size_t i, Iterator first, Iterator last );
273 template< typename Pred >
274 inline
void erase( Pred predicate );
276 template< typename Pred >
277 inline
void erase(
size_t i, Iterator first, Iterator last, Pred predicate );
284 inline Iterator
find (
size_t i,
size_t j );
285 inline ConstIterator
find (
size_t i,
size_t j ) const;
286 inline Iterator
lowerBound(
size_t i,
size_t j );
287 inline ConstIterator
lowerBound(
size_t i,
size_t j ) const;
288 inline Iterator
upperBound(
size_t i,
size_t j );
289 inline ConstIterator
upperBound(
size_t i,
size_t j ) const;
296 template< typename Other > inline StrictlyLowerMatrix& scale( const Other& scalar );
303 inline
bool isIntact() const noexcept;
310 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
311 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
313 inline
bool canSMPAssign() const noexcept;
321 inline
void resetUpper();
333 template< typename MT2,
bool SO2,
bool DF2 >
334 friend MT2& derestrict( StrictlyLowerMatrix<MT2,SO2,DF2>& m );
373inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix()
392inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix(
size_t n )
415inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix(
size_t n,
size_t nonzeros )
416 : matrix_( n, n,
max( nonzeros, n ) )
442inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
443 : matrix_( n, n, nonzeros )
500inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix(
const StrictlyLowerMatrix& m )
501 : matrix_( m.matrix_ )
518inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix( StrictlyLowerMatrix&& m ) noexcept
519 : matrix_( std::move( m.matrix_ ) )
541template<
typename MT2
543inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix(
const Matrix<MT2,SO2>& m )
546 if( IsUniTriangular_v<MT2> ||
551 if( !IsStrictlyLower_v<MT2> )
587inline typename StrictlyLowerMatrix<MT,SO,false>::Reference
588 StrictlyLowerMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
593 return Reference( matrix_, i, j );
617inline typename StrictlyLowerMatrix<MT,SO,false>::ConstReference
618 StrictlyLowerMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const
648inline typename StrictlyLowerMatrix<MT,SO,false>::Reference
649 StrictlyLowerMatrix<MT,SO,false>::at(
size_t i,
size_t j )
682inline typename StrictlyLowerMatrix<MT,SO,false>::ConstReference
683 StrictlyLowerMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const
711inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
714 return matrix_.begin(i);
734inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
737 return matrix_.begin(i);
757inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
760 return matrix_.cbegin(i);
780inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
783 return matrix_.end(i);
803inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
806 return matrix_.end(i);
826inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
829 return matrix_.cend(i);
870inline StrictlyLowerMatrix<MT,SO,false>&
873 const InitializerMatrix<ElementType> tmp( list, list.size() );
902inline StrictlyLowerMatrix<MT,SO,false>&
903 StrictlyLowerMatrix<MT,SO,false>::operator=(
const StrictlyLowerMatrix& rhs )
905 matrix_ = rhs.matrix_;
925inline StrictlyLowerMatrix<MT,SO,false>&
926 StrictlyLowerMatrix<MT,SO,false>::operator=( StrictlyLowerMatrix&& rhs )
noexcept
928 matrix_ = std::move( rhs.matrix_ );
954template<
typename MT2
956inline auto StrictlyLowerMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
957 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
959 if( IsUniTriangular_v<MT2> ||
966 if( !IsStrictlyLower_v<MT2> )
993template<
typename MT2
995inline auto StrictlyLowerMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
996 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
998 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1002 if( IsStrictlyLower_v<MT2> ) {
1012 matrix_ = std::move( tmp );
1015 if( !IsStrictlyLower_v<MT2> )
1040template<
typename MT
1042template<
typename MT2
1045 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1047 if( IsUniTriangular_v<MT2> ||
1054 if( !IsStrictlyLower_v<MT2> )
1079template<
typename MT
1081template<
typename MT2
1084 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1086 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1090 if( IsStrictlyLower_v<MT2> ) {
1094 const ResultType_t<MT2> tmp( *rhs );
1103 if( !IsStrictlyLower_v<MT2> )
1128template<
typename MT
1130template<
typename MT2
1133 -> DisableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1135 if( IsUniTriangular_v<MT2> ||
1142 if( !IsStrictlyLower_v<MT2> )
1167template<
typename MT
1169template<
typename MT2
1172 -> EnableIf_t< IsComputation_v<MT2>, StrictlyLowerMatrix& >
1174 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1178 if( IsStrictlyLower_v<MT2> ) {
1182 const ResultType_t<MT2> tmp( *rhs );
1191 if( !IsStrictlyLower_v<MT2> )
1215template<
typename MT
1217template<
typename MT2
1219inline auto StrictlyLowerMatrix<MT,SO,false>::operator%=(
const Matrix<MT2,SO2>& rhs )
1220 -> StrictlyLowerMatrix&
1222 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1228 if( !IsStrictlyLower_v<MT2> )
1254template<
typename MT
1258 return matrix_.rows();
1270template<
typename MT
1274 return matrix_.columns();
1286template<
typename MT
1290 return matrix_.capacity();
1308template<
typename MT
1312 return matrix_.capacity(i);
1324template<
typename MT
1328 return matrix_.nonZeros();
1346template<
typename MT
1350 return matrix_.nonZeros(i);
1362template<
typename MT
1369 for(
size_t j=0UL; j<
columns(); ++j ) {
1370 erase( matrix_, j, matrix_.lowerBound(j+1UL,j), matrix_.end(j) );
1374 for(
size_t i=1UL; i<
rows(); ++i ) {
1375 erase( matrix_, i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1396template<
typename MT
1403 erase( matrix_, i, matrix_.lowerBound(i+1UL,i), matrix_.end(i) );
1406 erase( matrix_, i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1421template<
typename MT
1449template<
typename MT
1457 matrix_.resize( n, n, preserve );
1474template<
typename MT
1476inline void StrictlyLowerMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1478 matrix_.reserve( nonzeros );
1499template<
typename MT
1501inline void StrictlyLowerMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1503 matrix_.reserve( i, nonzeros );
1520template<
typename MT
1522inline void StrictlyLowerMatrix<MT,SO,false>::trim()
1542template<
typename MT
1544inline void StrictlyLowerMatrix<MT,SO,false>::trim(
size_t i )
1562template<
typename MT
1566 matrix_.shrinkToFit();
1579template<
typename MT
1585 swap( matrix_, m.matrix_ );
1603template<
typename MT
1605constexpr size_t StrictlyLowerMatrix<MT,SO,false>::maxNonZeros() noexcept
1609 return maxNonZeros( Size_v<MT,0UL> );
1625template<
typename MT
1627constexpr size_t StrictlyLowerMatrix<MT,SO,false>::maxNonZeros(
size_t n )
noexcept
1629 return ( ( n - 1UL ) * n ) / 2UL;
1641template<
typename MT
1643inline void StrictlyLowerMatrix<MT,SO,false>::resetUpper()
1648 for(
size_t j=1UL; j<
columns(); ++j )
1649 erase( matrix_, j, matrix_.begin( j ), matrix_.lowerBound( j, j ) );
1652 for(
size_t i=0UL; i<
rows(); ++i )
1653 erase( matrix_, i, matrix_.upperBound( i, i ), matrix_.end( i ) );
1684template<
typename MT
1686inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
1693 return matrix_.set( i, j, value );
1716template<
typename MT
1718inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
1719 StrictlyLowerMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1725 return matrix_.insert( i, j, value );
1781template<
typename MT
1783inline void StrictlyLowerMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1789 matrix_.append( i, j, value, check );
1809template<
typename MT
1811inline void StrictlyLowerMatrix<MT,SO,false>::finalize(
size_t i )
1813 matrix_.finalize( i );
1837template<
typename MT
1839inline void StrictlyLowerMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1843 erase( matrix_, i, j );
1861template<
typename MT
1863inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
1864 StrictlyLowerMatrix<MT,SO,false>::erase(
size_t i, Iterator pos )
1868 return erase( matrix_, i, pos );
1888template<
typename MT
1890inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
1891 StrictlyLowerMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last )
1895 return erase( matrix_, i, first, last );
1923template<
typename MT
1925template<
typename Pred >
1926inline void StrictlyLowerMatrix<MT,SO,false>::erase( Pred predicate )
1930 erase( matrix_, predicate );
1966template<
typename MT
1968template<
typename Pred >
1969inline void StrictlyLowerMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last, Pred predicate )
1973 erase( matrix_, i, first, last, predicate );
2005template<
typename MT
2007inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
2010 return matrix_.find( i, j );
2032template<
typename MT
2034inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
2037 return matrix_.find( i, j );
2059template<
typename MT
2061inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
2064 return matrix_.lowerBound( i, j );
2086template<
typename MT
2088inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
2091 return matrix_.lowerBound( i, j );
2113template<
typename MT
2115inline typename StrictlyLowerMatrix<MT,SO,false>::Iterator
2118 return matrix_.upperBound( i, j );
2140template<
typename MT
2142inline typename StrictlyLowerMatrix<MT,SO,false>::ConstIterator
2145 return matrix_.upperBound( i, j );
2177template<
typename MT
2179template<
typename Other >
2180inline StrictlyLowerMatrix<MT,SO,false>&
2181 StrictlyLowerMatrix<MT,SO,false>::scale(
const Other& scalar )
2183 matrix_.scale( scalar );
2208template<
typename MT
2239template<
typename MT
2241template<
typename Other >
2242inline bool StrictlyLowerMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2244 return matrix_.canAlias( alias );
2261template<
typename MT
2263template<
typename Other >
2264inline bool StrictlyLowerMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2266 return matrix_.isAliased( alias );
2283template<
typename MT
2285inline bool StrictlyLowerMatrix<MT,SO,false>::canSMPAssign() const noexcept
2287 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 IsStrictlyLower type trait.
Header file for the IsUniTriangular 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.
Header file for the StrictlyLowerProxy class.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the implementation of the base template of the StrictlyLowerMatrix.
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
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:2096
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:1375
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) decllow(const DenseMatrix< MT, SO > &dm)
Declares the given dense matrix expression dm as lower.
Definition: DMatDeclLowExpr.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 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
#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
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 the SparseElement base class.
Header file for utility functions for sparse matrices.
Header file for basic type definitions.
Header file for the generic max algorithm.