35 #ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_NUMERICPROXY_H_
36 #define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_NUMERICPROXY_H_
97 template<
typename MT >
105 template<
typename T >
106 struct BuiltinType {
typedef INVALID_TYPE Type; };
114 template<
typename T >
115 struct ComplexType {
typedef typename T::value_type Type; };
129 , ComplexType<RepresentedType>
150 template<
typename T >
inline NumericProxy& operator+=(
const T& value );
151 template<
typename T >
inline NumericProxy& operator-=(
const T& value );
152 template<
typename T >
inline NumericProxy& operator*=(
const T& value );
153 template<
typename T >
inline NumericProxy& operator/=(
const T& value );
168 inline void reset ()
const;
169 inline void clear ()
const;
170 inline void invert()
const;
172 inline ConstReference
get()
const noexcept;
186 inline ValueType
real() const;
187 inline
void real( ValueType value ) const;
188 inline ValueType
imag() const;
189 inline
void imag( ValueType value ) const;
237 template< typename MT >
251 template<
typename MT >
274 template<
typename MT >
291 template<
typename MT >
292 template<
typename T >
295 matrix_(row_,column_) = value;
296 if( row_ != column_ )
297 matrix_(column_,row_) = value;
310 template<
typename MT >
311 template<
typename T >
314 matrix_(row_,column_) += value;
315 if( row_ != column_ )
316 matrix_(column_,row_) += value;
329 template<
typename MT >
330 template<
typename T >
333 matrix_(row_,column_) -= value;
334 if( row_ != column_ )
335 matrix_(column_,row_) -= value;
348 template<
typename MT >
349 template<
typename T >
352 matrix_(row_,column_) *= value;
353 if( row_ != column_ )
354 matrix_(column_,row_) *= value;
367 template<
typename MT >
368 template<
typename T >
371 matrix_(row_,column_) /= value;
372 if( row_ != column_ )
373 matrix_(column_,row_) /= value;
393 template<
typename MT >
406 template<
typename MT >
429 template<
typename MT >
434 reset( matrix_(row_,column_) );
435 if( row_ != column_ )
436 reset( matrix_(column_,row_) );
448 template<
typename MT >
453 clear( matrix_(row_,column_) );
454 if( row_ != column_ )
455 clear( matrix_(column_,row_) );
465 template<
typename MT >
470 invert( matrix_(row_,column_) );
471 if( row_ != column_ )
472 matrix_(column_,row_) = matrix_(row_,column_);
482 template<
typename MT >
485 return const_cast<const MT&
>( matrix_ )(row_,column_);
503 template<
typename MT >
527 template<
typename MT >
530 return matrix_(row_,column_).real();
543 template<
typename MT >
546 matrix_(row_,column_).real( value );
547 if( row_ != column_ )
548 matrix_(column_,row_).real( value );
561 template<
typename MT >
564 return matrix_(row_,column_).imag();
578 template<
typename MT >
581 matrix_(row_,column_).imag( value );
582 if( row_ != column_ )
583 matrix_(column_,row_).imag( value );
599 template<
typename MT >
602 template<
typename MT >
605 template<
typename MT >
608 template<
typename MT >
611 template<
typename MT >
614 template<
typename MT >
617 template<
typename MT >
620 template<
typename MT >
636 template<
typename MT >
654 template<
typename MT >
669 template<
typename MT >
687 template<
typename MT >
709 template<
typename MT >
729 template<
typename MT >
749 template<
typename MT >
769 template<
typename MT >
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
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:635
Header file for auxiliary alias declarations.
Constraint on the data type.
size_t row_
Row index of the accessed matrix element.
Definition: NumericProxy.h:198
Header file for basic type definitions.
ElementType_< MT > RepresentedType
Type of the represented matrix element.
Definition: NumericProxy.h:121
Proxy base class.The Proxy class is a base class for all proxy classes within the Blaze library that ...
Definition: Forward.h:51
bool isReal(const DiagonalProxy< MT > &proxy)
Returns whether the matrix element represents a real number.
Definition: DiagonalProxy.h:595
NumericProxy * Pointer
Pointer to the represented element.
Definition: NumericProxy.h:124
Constraint on the data type.
If_< IsComplex< RepresentedType >, ComplexType< RepresentedType >, BuiltinType< RepresentedType > >::Type ValueType
Value type of the represented complex element.
Definition: NumericProxy.h:130
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
MT & matrix_
Reference to the adapted matrix.
Definition: NumericProxy.h:197
#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.
ValueType imag() const
Returns the imaginary part of the represented complex number.
Definition: NumericProxy.h:562
Constraint on the data type.
void reset() const
Reset the represented element to its default initial value.
Definition: NumericProxy.h:430
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:126
Header file for the Proxy class.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
Constraint on the data type.
Constraint on the data type.
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:741
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
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
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
ValueType real() const
Returns the real part of the represented complex number.
Definition: NumericProxy.h:528
Constraint on the data type.
void invert() const
In-place inversion of the represented element.
Definition: NumericProxy.h:466
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:655
#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:394
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2645
ConstReference get() const noexcept
Returning the value of the accessed matrix element.
Definition: NumericProxy.h:483
typename T::Reference Reference_
Alias declaration for nested Reference type definitions.The Reference_ alias declaration provides a c...
Definition: Aliases.h:283
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
Header file for the isOne shim.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:126
#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.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:160
#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:199
Header file for the reset shim.
#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
Header file for the isDefault shim.
Constraint on the data type.
Constraint on the data type.
NumericProxy & operator=(const NumericProxy &sp)
Copy assignment operator for NumericProxy.
Definition: NumericProxy.h:275
typename T::ConstReference ConstReference_
Alias declaration for nested ConstReference type definitions.The ConstReference_ alias declaration pr...
Definition: Aliases.h:143
const NumericProxy * ConstPointer
Pointer-to-const to the represented element.
Definition: NumericProxy.h:125
#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
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:615
Header file for the IsComplex type trait.
#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:238
ConstReference_< MT > ConstReference
Reference-to-const to the represented element.
Definition: NumericProxy.h:123
#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
void clear() const
Clearing the represented element.
Definition: NumericProxy.h:449
Header file for the isReal shim.
Reference_< MT > Reference
Reference to the represented element.
Definition: NumericProxy.h:122