35#ifndef _BLAZE_MATH_SPARSE_MATRIXACCESSPROXY_H_
36#define _BLAZE_MATH_SPARSE_MATRIXACCESSPROXY_H_
98template<
typename MT >
100 :
public Proxy< MatrixAccessProxy<MT>, ElementType_t<MT> >
105 static constexpr bool rmm = IsRowMajorMatrix_v<MT>;
135 template<
typename T >
138 template<
typename T >
142 template<
typename T >
inline const MatrixAccessProxy& operator+=(
const T& value )
const;
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;
178 void* operator&() const;
206template< typename MT >
213 const size_t index(
rmm ?
i_ :
j_ );
214 if( element ==
sm_.end(index) )
231template<
typename MT >
235 const size_t index(
rmm ?
i_ :
j_ );
236 if( element !=
sm_.end( index ) && isDefault<strict>( element->value() ) )
237 sm_.erase( index, element );
256template<
typename MT >
260 const size_t index(
rmm ?
map.i_ :
map.j_ );
261 const auto& source( element !=
map.sm_.end( index ) ? element->value() :
RepresentedType{} );
275template<
typename VT >
276template<
typename T >
292template<
typename VT >
293template<
typename T >
309template<
typename MT >
310template<
typename T >
325template<
typename MT >
326template<
typename T >
341template<
typename MT >
342template<
typename T >
357template<
typename MT >
358template<
typename T >
373template<
typename MT >
374template<
typename T >
393template<
typename MT >
394template<
typename T >
416template<
typename MT >
420 const size_t index(
rmm ?
i_ :
j_ );
421 if( element ==
sm_.end(index) )
424 return element->value();
434template<
typename MT >
455template<
typename MT >
474template<
typename MT >
477template<
typename MT,
typename T >
480template<
typename T,
typename MT >
494template<
typename MT >
499 swap( a.get(), b.get() );
512template<
typename MT,
typename T >
530template<
typename T,
typename MT >
Header file for auxiliary alias declarations.
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
typename T::Iterator Iterator_t
Alias declaration for nested Iterator type definitions.
Definition: Aliases.h:210
Header file for run time assertion macros.
Header file for the isDefault shim.
Header file for the isOne shim.
Header file for the isReal shim.
Header file for the IsRowMajorMatrix type trait.
Header file for the relaxation flag enumeration.
Access proxy for sparse, matrices.
Definition: MatrixAccessProxy.h:101
static constexpr bool rmm
Compile time flag indicating whether the given matrix type is a row-major matrix.
Definition: MatrixAccessProxy.h:105
MT & sm_
Reference to the accessed sparse matrix.
Definition: MatrixAccessProxy.h:169
~MatrixAccessProxy()
The destructor for MatrixAccessProxy.
Definition: MatrixAccessProxy.h:232
size_t i_
Row-index of the accessed sparse matrix element.
Definition: MatrixAccessProxy.h:170
bool isRestricted() const noexcept
Returns whether the proxy represents a restricted sparse matrix element..
Definition: MatrixAccessProxy.h:435
MatrixAccessProxy(MT &sm, size_t i, size_t j)
Initialization constructor for a MatrixAccessProxy.
Definition: MatrixAccessProxy.h:207
RawReference get() const noexcept
Returning the value of the accessed sparse matrix element.
Definition: MatrixAccessProxy.h:417
ElementType_t< MT > RepresentedType
Type of the represented sparse matrix element.
Definition: MatrixAccessProxy.h:110
const MatrixAccessProxy & operator=(const MatrixAccessProxy &map) const
Copy assignment operator for MatrixAccessProxy.
Definition: MatrixAccessProxy.h:257
RepresentedType & RawReference
Raw reference to the represented element.
Definition: MatrixAccessProxy.h:111
size_t j_
Column-index of the accessed sparse matrix element.
Definition: MatrixAccessProxy.h:171
Proxy base class.
Definition: Proxy.h:169
Constraint on the data type.
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Elementwise evaluation of the given binary operation on each single element of the dense matrices lhs...
Definition: DMatDMatMapExpr.h:1144
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: SparseMatrix.h:61
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101
void swap(T &a, const MatrixAccessProxy< MT > &v) noexcept
Swapping the contents of an access proxy with another element.
Definition: MatrixAccessProxy.h:531
Header file for the extended initializer_list functionality.
Header file for the Proxy class.
Header file for the clear shim.
Header file for the isZero shim.
Header file for basic type definitions.