35 #ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_NUMERICPROXY_H_ 36 #define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_NUMERICPROXY_H_ 99 template<
typename MT >
101 :
public Proxy< NumericProxy<MT> >
108 template<
typename T >
109 struct BuiltinType {
using Type = INVALID_TYPE; };
117 template<
typename T >
118 struct ComplexType {
using Type =
typename T::value_type; };
132 , ComplexType<RepresentedType>
133 , BuiltinType<RepresentedType> >::Type;
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 );
159 template<
typename T >
inline NumericProxy& operator/=(
const T& value );
160 template<
typename T >
inline NumericProxy& operator%=(
const T& value );
175 inline void reset ()
const;
176 inline void clear ()
const;
177 inline void invert()
const;
246 template< typename MT >
260 template<
typename MT >
283 template<
typename MT >
300 template<
typename MT >
301 template<
typename T >
304 matrix_(row_,column_) = value;
305 if( row_ != column_ )
306 matrix_(column_,row_) = value;
319 template<
typename MT >
320 template<
typename T >
323 matrix_(row_,column_) += value;
324 if( row_ != column_ )
325 matrix_(column_,row_) += value;
338 template<
typename MT >
339 template<
typename T >
342 matrix_(row_,column_) -= value;
343 if( row_ != column_ )
344 matrix_(column_,row_) -= value;
357 template<
typename MT >
358 template<
typename T >
361 matrix_(row_,column_) *= value;
362 if( row_ != column_ )
363 matrix_(column_,row_) *= value;
376 template<
typename MT >
377 template<
typename T >
380 matrix_(row_,column_) /= value;
381 if( row_ != column_ )
382 matrix_(column_,row_) /= value;
395 template<
typename MT >
396 template<
typename T >
399 matrix_(row_,column_) %= value;
400 if( row_ != column_ )
401 matrix_(column_,row_) %= value;
421 template<
typename MT >
434 template<
typename MT >
457 template<
typename MT >
462 reset( matrix_(row_,column_) );
463 if( row_ != column_ )
464 reset( matrix_(column_,row_) );
476 template<
typename MT >
481 clear( matrix_(row_,column_) );
482 if( row_ != column_ )
483 clear( matrix_(column_,row_) );
493 template<
typename MT >
498 invert( matrix_(row_,column_) );
499 if( row_ != column_ )
500 matrix_(column_,row_) = matrix_(row_,column_);
510 template<
typename MT >
513 return const_cast<const MT&>( matrix_ )(row_,column_);
531 template<
typename MT >
555 template<
typename MT >
558 return matrix_(row_,column_).real();
571 template<
typename MT >
574 matrix_(row_,column_).real( value );
575 if( row_ != column_ )
576 matrix_(column_,row_).real( value );
589 template<
typename MT >
592 return matrix_(row_,column_).imag();
606 template<
typename MT >
609 matrix_(row_,column_).imag( value );
610 if( row_ != column_ )
611 matrix_(column_,row_).imag( value );
627 template<
typename MT >
630 template<
typename MT >
633 template<
typename MT >
636 template<
bool RF,
typename MT >
639 template<
bool RF,
typename MT >
642 template<
bool RF,
typename MT >
645 template<
bool RF,
typename MT >
648 template<
typename MT >
664 template<
typename MT >
682 template<
typename MT >
697 template<
typename MT >
715 template<
bool RF,
typename MT >
720 return isDefault<RF>( proxy.
get() );
737 template<
bool RF,
typename MT >
742 return isReal<RF>( proxy.
get() );
757 template<
bool RF,
typename MT >
762 return isZero<RF>( proxy.
get() );
777 template<
bool RF,
typename MT >
782 return isOne<RF>( proxy.
get() );
797 template<
typename MT >
bool isReal(const DiagonalProxy< MT > &proxy)
Returns whether the matrix element represents a real number.
Definition: DiagonalProxy.h:657
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSFORMATION_TYPE(T)
Constraint on the data type.In case the given data type T is a transformation expression (i....
Definition: Transformation.h:81
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,...
Definition: Const.h:79
Constraint on the data type.
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.
Constraint on the data type.
size_t row_
Row index of the accessed matrix element.
Definition: NumericProxy.h:205
Header file for basic type definitions.
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
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.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.In case the given data type T is a computational expression (i....
Definition: Computation.h:81
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
ElementType_t< MT > RepresentedType
Type of the represented matrix element.
Definition: NumericProxy.h:124
MT & matrix_
Reference to the adapted matrix.
Definition: NumericProxy.h:204
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type,...
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:494
ConstReference get() const noexcept
Returning the value of the accessed matrix element.
Definition: NumericProxy.h:511
void clear() const
Clearing the represented element.
Definition: NumericProxy.h:477
Constraint on the data type.
ValueType real() const
Returns the real part of the represented complex number.
Definition: NumericProxy.h:556
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:133
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:677
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:779
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Reference_t< MT > Reference
Reference to the represented element.
Definition: NumericProxy.h:125
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:100
Constraint on the data type.
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:717
#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:422
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:615
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,...
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:206
#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,...
Definition: Reference.h:79
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:697
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.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VIEW_TYPE(T)
Constraint on the data type.In case the given data type T is a view type (i.e. a subvector,...
Definition: View.h:81
NumericProxy & operator=(const NumericProxy &sp)
Copy assignment operator for NumericProxy.
Definition: NumericProxy.h:284
void reset() const
Reset the represented element to its default initial value.
Definition: NumericProxy.h:458
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:635
#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,...
Definition: Hermitian.h:79
NumericProxy(MT &matrix, size_t row, size_t column)
Initialization constructor for a NumericProxy.
Definition: NumericProxy.h:247
#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:590
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:126
constexpr Type & get(StaticVector< Type, N, TF > &v) noexcept
Tuple-like index-based access the contents of a static vector.
Definition: StaticVector.h:2704