35 #ifndef _BLAZE_MATH_SPARSE_MATRIXACCESSPROXY_H_ 36 #define _BLAZE_MATH_SPARSE_MATRIXACCESSPROXY_H_ 100 template<
typename 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;
152 inline RawReference
get()
const noexcept;
160 inline operator RawReference() const noexcept;
177 void* operator&() const;
205 template< typename MT >
212 const size_t index( rmm ? i_ : j_ );
213 if( element == sm_.end(index) )
214 sm_.insert( i_, j_, RepresentedType() );
224 template<
typename MT >
246 template<
typename MT >
250 const size_t index( rmm ?
i_ :
j_ );
251 if( element !=
sm_.end( index ) && isDefault<strict>( element->value() ) )
252 sm_.erase( index, element );
271 template<
typename MT >
286 template<
typename VT >
287 template<
typename T >
303 template<
typename VT >
304 template<
typename T >
320 template<
typename MT >
321 template<
typename T >
336 template<
typename MT >
337 template<
typename T >
352 template<
typename MT >
353 template<
typename T >
368 template<
typename MT >
369 template<
typename T >
384 template<
typename MT >
385 template<
typename T >
407 template<
typename MT >
412 return element->value();
422 template<
typename MT >
443 template<
typename MT >
462 template<
typename MT >
465 template<
typename MT >
468 template<
bool RF,
typename MT >
471 template<
bool RF,
typename MT >
474 template<
bool RF,
typename MT >
477 template<
bool RF,
typename MT >
480 template<
typename MT >
483 template<
typename MT >
486 template<
typename MT,
typename T >
489 template<
typename T,
typename MT >
507 template<
typename MT >
528 template<
typename MT >
548 template<
bool RF,
typename MT >
553 return isDefault<RF>( proxy.
get() );
570 template<
bool RF,
typename MT >
575 return isReal<RF>( proxy.
get() );
590 template<
bool RF,
typename MT >
595 return isZero<RF>( proxy.
get() );
610 template<
bool RF,
typename MT >
615 return isOne<RF>( proxy.
get() );
630 template<
typename MT >
648 template<
typename MT >
653 swap( a.get(), b.get() );
666 template<
typename MT,
typename T >
684 template<
typename T,
typename MT >
bool isReal(const DiagonalProxy< MT > &proxy)
Returns whether the matrix element represents a real number.
Definition: DiagonalProxy.h:595
Header file for the isnan shim.
size_t i_
Row-index of the accessed sparse matrix element.
Definition: MatrixAccessProxy.h:169
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
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
RawReference get() const noexcept
Returning the value of the accessed sparse matrix element.
Definition: MatrixAccessProxy.h:408
Access proxy for sparse, matrices.The MatrixAccessProxy provides safe access to the elements of a no...
Definition: MatrixAccessProxy.h:101
Header file for the Proxy class.
Header file for the std::initializer_list aliases.
Constraint on the data type.
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:615
const MatrixAccessProxy & operator=(const MatrixAccessProxy &map) const
Copy assignment operator for MatrixAccessProxy.
Definition: MatrixAccessProxy.h:272
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5635
Compile time check for row-major matrix types.This type trait tests whether or not the given template...
Definition: IsRowMajorMatrix.h:83
Header file for the isZero shim.
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
MatrixAccessProxy(MT &sm, size_t i, size_t j)
Initialization constructor for a MatrixAccessProxy.
Definition: MatrixAccessProxy.h:206
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:655
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
Header file for the isOne shim.
ElementType_< MT > RepresentedType
Type of the represented sparse matrix element.
Definition: MatrixAccessProxy.h:111
~MatrixAccessProxy()
The destructor for MatrixAccessProxy.
Definition: MatrixAccessProxy.h:247
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:168
bool isRestricted() const noexcept
Returns whether the proxy represents a restricted sparse matrix element..
Definition: MatrixAccessProxy.h:423
Header file for the reset shim.
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:635
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:267
typename T::Iterator Iterator_
Alias declaration for nested Iterator type definitions.The Iterator_ alias declaration provides a con...
Definition: Aliases.h:183
size_t j_
Column-index of the accessed sparse matrix element.
Definition: MatrixAccessProxy.h:170
Header file for the IsRowMajorMatrix type trait.
Initializer list type of the Blaze library.
RepresentedType & RawReference
Raw reference to the represented element.
Definition: MatrixAccessProxy.h:112
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
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