35 #ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_NUMERICPROXY_H_ 36 #define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_NUMERICPROXY_H_ 97 template<
typename MT >
99 :
public Proxy< NumericProxy<MT> >
106 template<
typename T >
107 struct BuiltinType {
using Type = INVALID_TYPE; };
115 template<
typename T >
116 struct ComplexType {
using Type =
typename T::value_type; };
130 , ComplexType<RepresentedType>
131 , BuiltinType<RepresentedType> >::Type;
154 template<
typename T >
inline NumericProxy& operator+=(
const T& value );
155 template<
typename T >
inline NumericProxy& operator-=(
const T& value );
156 template<
typename T >
inline NumericProxy& operator*=(
const T& value );
157 template<
typename T >
inline NumericProxy& operator/=(
const T& value );
158 template<
typename T >
inline NumericProxy& operator%=(
const T& value );
173 inline void reset ()
const;
174 inline void clear ()
const;
175 inline void invert()
const;
242 template< typename MT >
256 template<
typename MT >
279 template<
typename MT >
296 template<
typename MT >
297 template<
typename T >
300 matrix_(row_,column_) = value;
301 if( row_ != column_ )
302 matrix_(column_,row_) = value;
315 template<
typename MT >
316 template<
typename T >
319 matrix_(row_,column_) += value;
320 if( row_ != column_ )
321 matrix_(column_,row_) += value;
334 template<
typename MT >
335 template<
typename T >
338 matrix_(row_,column_) -= value;
339 if( row_ != column_ )
340 matrix_(column_,row_) -= value;
353 template<
typename MT >
354 template<
typename T >
357 matrix_(row_,column_) *= value;
358 if( row_ != column_ )
359 matrix_(column_,row_) *= value;
372 template<
typename MT >
373 template<
typename T >
376 matrix_(row_,column_) /= value;
377 if( row_ != column_ )
378 matrix_(column_,row_) /= value;
391 template<
typename MT >
392 template<
typename T >
395 matrix_(row_,column_) %= value;
396 if( row_ != column_ )
397 matrix_(column_,row_) %= value;
417 template<
typename MT >
430 template<
typename MT >
453 template<
typename MT >
458 reset( matrix_(row_,column_) );
459 if( row_ != column_ )
460 reset( matrix_(column_,row_) );
472 template<
typename MT >
477 clear( matrix_(row_,column_) );
478 if( row_ != column_ )
479 clear( matrix_(column_,row_) );
489 template<
typename MT >
494 invert( matrix_(row_,column_) );
495 if( row_ != column_ )
496 matrix_(column_,row_) = matrix_(row_,column_);
506 template<
typename MT >
509 return const_cast<const MT&
>( matrix_ )(row_,column_);
527 template<
typename MT >
551 template<
typename MT >
554 return matrix_(row_,column_).real();
567 template<
typename MT >
570 matrix_(row_,column_).real( value );
571 if( row_ != column_ )
572 matrix_(column_,row_).real( value );
585 template<
typename MT >
588 return matrix_(row_,column_).imag();
602 template<
typename MT >
605 matrix_(row_,column_).imag( value );
606 if( row_ != column_ )
607 matrix_(column_,row_).imag( value );
623 template<
typename MT >
626 template<
typename MT >
629 template<
typename MT >
632 template<
bool RF,
typename MT >
635 template<
bool RF,
typename MT >
638 template<
bool RF,
typename MT >
641 template<
bool RF,
typename MT >
644 template<
typename MT >
660 template<
typename MT >
678 template<
typename MT >
693 template<
typename MT >
711 template<
bool RF,
typename MT >
716 return isDefault<RF>( proxy.
get() );
733 template<
bool RF,
typename MT >
738 return isReal<RF>( proxy.
get() );
753 template<
bool RF,
typename MT >
758 return isZero<RF>( proxy.
get() );
773 template<
bool RF,
typename MT >
778 return isOne<RF>( proxy.
get() );
793 template<
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.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type, a compilation error is created.
Definition: Const.h:79
Header file for auxiliary alias declarations.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:133
Constraint on the data type.
size_t row_
Row index of the accessed matrix element.
Definition: NumericProxy.h:203
Header file for basic type definitions.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias declaration for the If class template.The If_t alias declaration provides a convenien...
Definition: If.h:109
Proxy base class.The Proxy class is a base class for all proxy classes within the Blaze library that ...
Definition: Forward.h:51
typename T::Reference Reference_t
Alias declaration for nested Reference type definitions.The Reference_t alias declaration provides a ...
Definition: Aliases.h:330
Header file for the isZero shim.
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:591
ElementType_t< MT > RepresentedType
Type of the represented matrix element.
Definition: NumericProxy.h:122
MT & matrix_
Reference to the adapted matrix.
Definition: NumericProxy.h:202
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:3084
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type, a compilation error is created.
Definition: Volatile.h:79
Header file for the invert shim.
Header file for the reset shim.
void invert() const
In-place inversion of the represented element.
Definition: NumericProxy.h:490
ConstReference get() const noexcept
Returning the value of the accessed matrix element.
Definition: NumericProxy.h:507
void clear() const
Clearing the represented element.
Definition: NumericProxy.h:473
Constraint on the data type.
ValueType real() const
Returns the real part of the represented complex number.
Definition: NumericProxy.h:552
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.
Constraint on the data type.
typename If_t< IsComplex_v< RepresentedType >, ComplexType< RepresentedType >, BuiltinType< RepresentedType > >::Type ValueType
Value type of the represented complex element.
Definition: NumericProxy.h:131
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:673
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:775
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Reference_t< MT > Reference
Reference to the represented element.
Definition: NumericProxy.h:123
Header file for the If class template.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:79
Constraint on the data type.
Access proxy for symmetric, square matrices with numeric element types.The NumericProxy provides cont...
Definition: NumericProxy.h:98
Constraint on the data type.
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:713
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a upper triangular matrix type...
Definition: Upper.h:81
Pointer operator->()
Direct access to the represented matrix element.
Definition: NumericProxy.h:418
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:611
Header file for the isOne shim.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:79
Utility type for generic codes.
Constraint on the data type.
Constraint on the data type.
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:133
#define BLAZE_CONSTRAINT_MUST_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:61
size_t column_
Column index of the accessed matrix element.
Definition: NumericProxy.h:204
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower triangular matrix type...
Definition: Lower.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:79
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:693
Header file for the isDefault shim.
Constraint on the data type.
typename T::ConstReference ConstReference_t
Alias declaration for nested ConstReference type definitions.The ConstReference_t alias declaration p...
Definition: Aliases.h:150
Constraint on the data type.
NumericProxy & operator=(const NumericProxy &sp)
Copy assignment operator for NumericProxy.
Definition: NumericProxy.h:280
void reset() const
Reset the represented element to its default initial value.
Definition: NumericProxy.h:454
#define BLAZE_CONSTRAINT_MUST_NOT_BE_EXPRESSION_TYPE(T)
Constraint on the data type.In case the given data type T is an expression (i.e. a type derived from ...
Definition: Expression.h:81
Header file for the IsComplex type trait.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:631
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is an Hermitian matrix type, a compilation error is created.
Definition: Hermitian.h:79
NumericProxy(MT &matrix, size_t row, size_t column)
Initialization constructor for a NumericProxy.
Definition: NumericProxy.h:243
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a N-dimensional matrix type...
Definition: Matrix.h:61
ValueType imag() const
Returns the imaginary part of the represented complex number.
Definition: NumericProxy.h:586
Header file for the isReal shim.
Header file for the clear shim.
ConstReference_t< MT > ConstReference
Reference-to-const to the represented element.
Definition: NumericProxy.h:124