35#ifndef _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_SPARSE_H_
36#define _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_SPARSE_H_
100class StrictlyUpperMatrix<MT,SO,false>
101 :
public SparseMatrix< StrictlyUpperMatrix<MT,SO,false>, SO >
105 using OT = OppositeType_t<MT>;
106 using TT = TransposeType_t<MT>;
107 using ET = ElementType_t<MT>;
112 using This = StrictlyUpperMatrix<MT,SO,false>;
113 using BaseType = SparseMatrix<This,SO>;
114 using ResultType = This;
115 using OppositeType = StrictlyUpperMatrix<OT,!SO,false>;
116 using TransposeType = StrictlyLowerMatrix<TT,!SO,false>;
117 using ElementType = ET;
118 using TagType = TagType_t<MT>;
119 using ReturnType = ReturnType_t<MT>;
120 using CompositeType =
const This&;
121 using Reference = StrictlyUpperProxy<MT>;
122 using ConstReference = ConstReference_t<MT>;
123 using Iterator = Iterator_t<MT>;
124 using ConstIterator = ConstIterator_t<MT>;
130 template<
typename NewType >
133 using Other = StrictlyUpperMatrix< typename MT::template Rebind<NewType>::Other >;
140 template<
size_t NewM
144 using Other = StrictlyUpperMatrix< typename MT::template Resize<NewM,NewN>::Other >;
150 static constexpr bool smpAssignable =
false;
156 inline StrictlyUpperMatrix();
157 explicit inline StrictlyUpperMatrix(
size_t n );
158 inline StrictlyUpperMatrix(
size_t n,
size_t nonzeros );
159 inline StrictlyUpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros );
162 inline StrictlyUpperMatrix(
const StrictlyUpperMatrix& m );
163 inline StrictlyUpperMatrix( StrictlyUpperMatrix&& m )
noexcept;
165 template<
typename MT2,
bool SO2 >
166 inline StrictlyUpperMatrix(
const Matrix<MT2,SO2>& m );
173 ~StrictlyUpperMatrix() =
default;
180 inline Reference operator()(
size_t i,
size_t j );
181 inline ConstReference operator()(
size_t i,
size_t j )
const;
182 inline Reference at(
size_t i,
size_t j );
183 inline ConstReference at(
size_t i,
size_t j )
const;
184 inline Iterator
begin (
size_t i );
185 inline ConstIterator
begin (
size_t i )
const;
186 inline ConstIterator
cbegin(
size_t i )
const;
187 inline Iterator
end (
size_t i );
188 inline ConstIterator
end (
size_t i )
const;
189 inline ConstIterator
cend (
size_t i )
const;
198 inline StrictlyUpperMatrix& operator=(
const StrictlyUpperMatrix& rhs );
199 inline StrictlyUpperMatrix& operator=( StrictlyUpperMatrix&& rhs )
noexcept;
201 template<
typename MT2,
bool SO2 >
202 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
203 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >;
205 template<
typename MT2,
bool SO2 >
206 inline auto operator=(
const Matrix<MT2,SO2>& rhs )
207 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >;
209 template<
typename MT2,
bool SO2 >
210 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
211 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >;
213 template<
typename MT2,
bool SO2 >
214 inline auto operator+=(
const Matrix<MT2,SO2>& rhs )
215 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >;
217 template<
typename MT2,
bool SO2 >
218 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
219 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >;
221 template<
typename MT2,
bool SO2 >
222 inline auto operator-=(
const Matrix<MT2,SO2>& rhs )
223 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >;
225 template<
typename MT2,
bool SO2 >
226 inline auto operator%=(
const Matrix<MT2,SO2>& rhs ) -> StrictlyUpperMatrix&;
233 inline size_t rows() const noexcept;
234 inline
size_t columns() const noexcept;
235 inline
size_t capacity() const noexcept;
236 inline
size_t capacity(
size_t i ) const noexcept;
238 inline
size_t nonZeros(
size_t i ) const;
240 inline
void reset(
size_t i );
242 inline
void resize (
size_t n,
bool preserve=true );
243 inline
void reserve(
size_t nonzeros );
244 inline
void reserve(
size_t i,
size_t nonzeros );
246 inline
void trim(
size_t i );
248 inline
void swap( StrictlyUpperMatrix& m ) noexcept;
250 static constexpr
size_t maxNonZeros() noexcept;
251 static constexpr
size_t maxNonZeros(
size_t n ) noexcept;
258 inline Iterator
set (
size_t i,
size_t j, const ElementType& value );
259 inline Iterator insert (
size_t i,
size_t j, const ElementType& value );
260 inline
void append (
size_t i,
size_t j, const ElementType& value,
bool check=false );
261 inline
void finalize(
size_t i );
268 inline
void erase(
size_t i,
size_t j );
269 inline Iterator erase(
size_t i, Iterator pos );
270 inline Iterator erase(
size_t i, Iterator first, Iterator last );
272 template< typename Pred >
273 inline
void erase( Pred predicate );
275 template< typename Pred >
276 inline
void erase(
size_t i, Iterator first, Iterator last, Pred predicate );
283 inline Iterator
find (
size_t i,
size_t j );
284 inline ConstIterator
find (
size_t i,
size_t j ) const;
285 inline Iterator
lowerBound(
size_t i,
size_t j );
286 inline ConstIterator
lowerBound(
size_t i,
size_t j ) const;
287 inline Iterator
upperBound(
size_t i,
size_t j );
288 inline ConstIterator
upperBound(
size_t i,
size_t j ) const;
295 template< typename Other > inline StrictlyUpperMatrix& scale( const Other& scalar );
302 inline
bool isIntact() const noexcept;
309 template< typename Other > inline
bool canAlias ( const Other* alias ) const noexcept;
310 template< typename Other > inline
bool isAliased( const Other* alias ) const noexcept;
312 inline
bool canSMPAssign() const noexcept;
320 inline
void resetLower();
332 template< typename MT2,
bool SO2,
bool DF2 >
333 friend MT2& derestrict( StrictlyUpperMatrix<MT2,SO2,DF2>& m );
372inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix()
391inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix(
size_t n )
414inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix(
size_t n,
size_t nonzeros )
415 : matrix_( n, n,
max( nonzeros, n ) )
441inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix(
size_t n,
const std::vector<size_t>& nonzeros )
442 : matrix_( n, n, nonzeros )
499inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix(
const StrictlyUpperMatrix& m )
500 : matrix_( m.matrix_ )
517inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix( StrictlyUpperMatrix&& m ) noexcept
518 : matrix_( std::move( m.matrix_ ) )
540template<
typename MT2
542inline StrictlyUpperMatrix<MT,SO,false>::StrictlyUpperMatrix(
const Matrix<MT2,SO2>& m )
545 if( IsUniTriangular_v<MT2> ||
550 if( !IsStrictlyUpper_v<MT2> )
586inline typename StrictlyUpperMatrix<MT,SO,false>::Reference
587 StrictlyUpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
592 return Reference( matrix_, i, j );
616inline typename StrictlyUpperMatrix<MT,SO,false>::ConstReference
617 StrictlyUpperMatrix<MT,SO,false>::operator()(
size_t i,
size_t j )
const
647inline typename StrictlyUpperMatrix<MT,SO,false>::Reference
648 StrictlyUpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
681inline typename StrictlyUpperMatrix<MT,SO,false>::ConstReference
682 StrictlyUpperMatrix<MT,SO,false>::at(
size_t i,
size_t j )
const
710inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
713 return matrix_.begin(i);
733inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
736 return matrix_.begin(i);
756inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
759 return matrix_.cbegin(i);
779inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
782 return matrix_.end(i);
802inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
805 return matrix_.end(i);
825inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
828 return matrix_.cend(i);
869inline StrictlyUpperMatrix<MT,SO,false>&
872 const InitializerMatrix<ElementType> tmp( list, list.size() );
901inline StrictlyUpperMatrix<MT,SO,false>&
902 StrictlyUpperMatrix<MT,SO,false>::operator=(
const StrictlyUpperMatrix& rhs )
904 matrix_ = rhs.matrix_;
924inline StrictlyUpperMatrix<MT,SO,false>&
925 StrictlyUpperMatrix<MT,SO,false>::operator=( StrictlyUpperMatrix&& rhs )
noexcept
927 matrix_ = std::move( rhs.matrix_ );
953template<
typename MT2
955inline auto StrictlyUpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
956 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
958 if( IsUniTriangular_v<MT2> ||
965 if( !IsStrictlyUpper_v<MT2> )
992template<
typename MT2
994inline auto StrictlyUpperMatrix<MT,SO,false>::operator=(
const Matrix<MT2,SO2>& rhs )
995 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
997 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1001 if( IsStrictlyUpper_v<MT2> ) {
1011 matrix_ = std::move( tmp );
1014 if( !IsStrictlyUpper_v<MT2> )
1039template<
typename MT
1041template<
typename MT2
1044 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1046 if( IsUniTriangular_v<MT2> ||
1053 if( !IsStrictlyUpper_v<MT2> )
1078template<
typename MT
1080template<
typename MT2
1083 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1085 if( IsUniTriangular_v<MT2> || ( IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1089 if( IsStrictlyUpper_v<MT2> ) {
1093 const ResultType_t<MT2> tmp( *rhs );
1102 if( !IsStrictlyUpper_v<MT2> )
1127template<
typename MT
1129template<
typename MT2
1132 -> DisableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1134 if( IsUniTriangular_v<MT2> ||
1141 if( !IsStrictlyUpper_v<MT2> )
1166template<
typename MT
1168template<
typename MT2
1171 -> EnableIf_t< IsComputation_v<MT2>, StrictlyUpperMatrix& >
1173 if( IsUniTriangular_v<MT2> || ( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) ) {
1177 if( IsStrictlyUpper_v<MT2> ) {
1181 const ResultType_t<MT2> tmp( *rhs );
1190 if( !IsStrictlyUpper_v<MT2> )
1213template<
typename MT
1215template<
typename MT2
1217inline auto StrictlyUpperMatrix<MT,SO,false>::operator%=(
const Matrix<MT2,SO2>& rhs )
1218 -> StrictlyUpperMatrix&
1220 if( !IsSquare_v<MT2> && !
isSquare( *rhs ) ) {
1226 if( !IsStrictlyUpper_v<MT2> )
1252template<
typename MT
1256 return matrix_.rows();
1268template<
typename MT
1272 return matrix_.columns();
1284template<
typename MT
1288 return matrix_.capacity();
1306template<
typename MT
1310 return matrix_.capacity(i);
1322template<
typename MT
1326 return matrix_.nonZeros();
1344template<
typename MT
1348 return matrix_.nonZeros(i);
1360template<
typename MT
1367 for(
size_t j=1UL; j<
columns(); ++j ) {
1368 erase( matrix_, j, matrix_.begin(j), matrix_.lowerBound(j,j) );
1372 for(
size_t i=0UL; i<
rows(); ++i ) {
1373 erase( matrix_, i, matrix_.lowerBound(i,i+1UL), matrix_.end(i) );
1394template<
typename MT
1401 erase( matrix_, i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1404 erase( matrix_, i, matrix_.lowerBound(i,i+1UL), matrix_.end(i) );
1419template<
typename MT
1447template<
typename MT
1455 matrix_.resize( n, n, preserve );
1472template<
typename MT
1474inline void StrictlyUpperMatrix<MT,SO,false>::reserve(
size_t nonzeros )
1476 matrix_.reserve( nonzeros );
1497template<
typename MT
1499inline void StrictlyUpperMatrix<MT,SO,false>::reserve(
size_t i,
size_t nonzeros )
1501 matrix_.reserve( i, nonzeros );
1518template<
typename MT
1520inline void StrictlyUpperMatrix<MT,SO,false>::trim()
1540template<
typename MT
1542inline void StrictlyUpperMatrix<MT,SO,false>::trim(
size_t i )
1560template<
typename MT
1564 matrix_.shrinkToFit();
1577template<
typename MT
1583 swap( matrix_, m.matrix_ );
1601template<
typename MT
1603constexpr size_t StrictlyUpperMatrix<MT,SO,false>::maxNonZeros() noexcept
1607 return maxNonZeros( Size_v<MT,0UL> );
1623template<
typename MT
1625constexpr size_t StrictlyUpperMatrix<MT,SO,false>::maxNonZeros(
size_t n )
noexcept
1627 return ( ( n - 1UL ) * n ) / 2UL;
1639template<
typename MT
1641inline void StrictlyUpperMatrix<MT,SO,false>::resetLower()
1646 for(
size_t j=0UL; j<
columns(); ++j )
1647 erase( matrix_, j, matrix_.upperBound( j, j ), matrix_.end( j ) );
1650 for(
size_t i=1UL; i<
rows(); ++i )
1651 erase( matrix_, i, matrix_.begin( i ), matrix_.lowerBound( i, i ) );
1682template<
typename MT
1684inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
1691 return matrix_.set( i, j, value );
1714template<
typename MT
1716inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
1717 StrictlyUpperMatrix<MT,SO,false>::insert(
size_t i,
size_t j,
const ElementType& value )
1723 return matrix_.insert( i, j, value );
1779template<
typename MT
1781inline void StrictlyUpperMatrix<MT,SO,false>::append(
size_t i,
size_t j,
const ElementType& value,
bool check )
1787 matrix_.append( i, j, value, check );
1807template<
typename MT
1809inline void StrictlyUpperMatrix<MT,SO,false>::finalize(
size_t i )
1811 matrix_.finalize( i );
1835template<
typename MT
1837inline void StrictlyUpperMatrix<MT,SO,false>::erase(
size_t i,
size_t j )
1841 erase( matrix_, i, j );
1859template<
typename MT
1861inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
1862 StrictlyUpperMatrix<MT,SO,false>::erase(
size_t i, Iterator pos )
1866 return erase( matrix_, i, pos );
1886template<
typename MT
1888inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
1889 StrictlyUpperMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last )
1893 return erase( matrix_, i, first, last );
1921template<
typename MT
1923template<
typename Pred >
1924inline void StrictlyUpperMatrix<MT,SO,false>::erase( Pred predicate )
1928 erase( matrix_, predicate );
1964template<
typename MT
1966template<
typename Pred >
1967inline void StrictlyUpperMatrix<MT,SO,false>::erase(
size_t i, Iterator first, Iterator last, Pred predicate )
1971 erase( matrix_, i, first, last, predicate );
2003template<
typename MT
2005inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
2008 return matrix_.find( i, j );
2030template<
typename MT
2032inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
2035 return matrix_.find( i, j );
2057template<
typename MT
2059inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
2062 return matrix_.lowerBound( i, j );
2084template<
typename MT
2086inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
2089 return matrix_.lowerBound( i, j );
2111template<
typename MT
2113inline typename StrictlyUpperMatrix<MT,SO,false>::Iterator
2116 return matrix_.upperBound( i, j );
2138template<
typename MT
2140inline typename StrictlyUpperMatrix<MT,SO,false>::ConstIterator
2143 return matrix_.upperBound( i, j );
2175template<
typename MT
2177template<
typename Other >
2178inline StrictlyUpperMatrix<MT,SO,false>&
2179 StrictlyUpperMatrix<MT,SO,false>::scale(
const Other& scalar )
2181 matrix_.scale( scalar );
2206template<
typename MT
2237template<
typename MT
2239template<
typename Other >
2240inline bool StrictlyUpperMatrix<MT,SO,false>::canAlias(
const Other* alias )
const noexcept
2242 return matrix_.canAlias( alias );
2259template<
typename MT
2261template<
typename Other >
2262inline bool StrictlyUpperMatrix<MT,SO,false>::isAliased(
const Other* alias )
const noexcept
2264 return matrix_.isAliased( alias );
2281template<
typename MT
2283inline bool StrictlyUpperMatrix<MT,SO,false>::canSMPAssign() const noexcept
2285 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 IsStrictlyUpper 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 StrictlyUpperProxy 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 StrictlyUpperMatrix.
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
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
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:2363
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 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 utility functions for sparse matrices.
Header file for basic type definitions.
Header file for the generic max algorithm.