35 #ifndef _BLAZE_MATH_SPARSE_MATRIXACCESSPROXY_H_ 36 #define _BLAZE_MATH_SPARSE_MATRIXACCESSPROXY_H_ 100 template<
typename MT >
102 :
public Proxy< MatrixAccessProxy<MT>, ElementType_t<MT> >
107 static constexpr
bool rmm = IsRowMajorMatrix_v<MT>;
136 template<
typename T >
139 template<
typename T >
143 template<
typename T >
inline const MatrixAccessProxy& operator+=(
const T& value )
const;
144 template<
typename T >
inline const MatrixAccessProxy& operator-=(
const T& value )
const;
145 template<
typename T >
inline const MatrixAccessProxy& operator*=(
const T& value )
const;
146 template<
typename T >
inline const MatrixAccessProxy& operator/=(
const T& value )
const;
147 template<
typename T >
inline const MatrixAccessProxy& operator%=(
const T& value )
const;
179 void* operator&() const;
207 template< typename MT >
214 const size_t index(
rmm ?
i_ :
j_ );
215 if( element ==
sm_.end(index) )
226 template<
typename MT >
248 template<
typename MT >
252 const size_t index( rmm ? i_ : j_ );
253 if( element != sm_.end( index ) && isDefault<strict>( element->value() ) )
254 sm_.erase( index, element );
273 template<
typename MT >
288 template<
typename VT >
289 template<
typename T >
305 template<
typename VT >
306 template<
typename T >
322 template<
typename MT >
323 template<
typename T >
338 template<
typename MT >
339 template<
typename T >
354 template<
typename MT >
355 template<
typename T >
370 template<
typename MT >
371 template<
typename T >
386 template<
typename MT >
387 template<
typename T >
406 template<
typename MT >
407 template<
typename T >
429 template<
typename MT >
434 return element->value();
444 template<
typename MT >
465 template<
typename MT >
484 template<
typename MT >
487 template<
typename MT >
490 template<
bool RF,
typename MT >
493 template<
bool RF,
typename MT >
496 template<
bool RF,
typename MT >
499 template<
bool RF,
typename MT >
502 template<
typename MT >
505 template<
typename MT >
508 template<
typename MT,
typename T >
511 template<
typename T,
typename MT >
529 template<
typename MT >
550 template<
typename MT >
570 template<
bool RF,
typename MT >
575 return isDefault<RF>( proxy.
get() );
592 template<
bool RF,
typename MT >
597 return isReal<RF>( proxy.
get() );
612 template<
bool RF,
typename MT >
617 return isZero<RF>( proxy.
get() );
632 template<
bool RF,
typename MT >
637 return isOne<RF>( proxy.
get() );
652 template<
typename MT >
670 template<
typename MT >
675 swap( a.get(), b.get() );
688 template<
typename MT,
typename T >
706 template<
typename T,
typename MT >
bool isReal(const DiagonalProxy< MT > &proxy)
Returns whether the matrix element represents a real number.
Definition: DiagonalProxy.h:653
Header file for the isnan shim.
size_t i_
Row-index of the accessed sparse matrix element.
Definition: MatrixAccessProxy.h:171
Header file for auxiliary alias declarations.
Header file for basic type definitions.
Proxy base class.The Proxy class is a base class for all proxy classes within the Blaze library that ...
Definition: Forward.h:51
Header file for the isZero shim.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:591
RawReference get() const noexcept
Returning the value of the accessed sparse matrix element.
Definition: MatrixAccessProxy.h:430
Access proxy for sparse, matrices.The MatrixAccessProxy provides safe access to the elements of a no...
Definition: MatrixAccessProxy.h:101
ElementType_t< MT > RepresentedType
Type of the represented sparse matrix element.
Definition: MatrixAccessProxy.h:112
Header file for the reset shim.
Header file for the extended initializer_list functionality.
Header file for the Proxy class.
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
Constraint on the data type.
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:673
const MatrixAccessProxy & operator=(const MatrixAccessProxy &map) const
Copy assignment operator for MatrixAccessProxy.
Definition: MatrixAccessProxy.h:274
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5907
MatrixAccessProxy(MT &sm, size_t i, size_t j)
Initialization constructor for a MatrixAccessProxy.
Definition: MatrixAccessProxy.h:208
static constexpr bool rmm
Compile time flag indicating whether the given matrix type is a row-major matrix. ...
Definition: MatrixAccessProxy.h:107
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:713
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:611
Header file for the isOne shim.
~MatrixAccessProxy()
The destructor for MatrixAccessProxy.
Definition: MatrixAccessProxy.h:249
typename T::Iterator Iterator_t
Alias declaration for nested Iterator type definitions.The Iterator_t alias declaration provides a co...
Definition: Aliases.h:190
Header file for run time assertion macros.
Header file for the relaxation flag types.
MT & sm_
Reference to the accessed sparse matrix.
Definition: MatrixAccessProxy.h:170
bool isRestricted() const noexcept
Returns whether the proxy represents a restricted sparse matrix element..
Definition: MatrixAccessProxy.h:445
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
RepresentedType & RawReference
Raw reference to the represented element.
Definition: MatrixAccessProxy.h:113
size_t j_
Column-index of the accessed sparse matrix element.
Definition: MatrixAccessProxy.h:172
Header file for the IsRowMajorMatrix type trait.
Initializer list type of the Blaze library.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:631
Header file for the isReal shim.
#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 clear shim.
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Evaluates the given binary operation on each single element of the dense matrices lhs and rhs...
Definition: DMatDMatMapExpr.h:1110