35 #ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_NUMERICPROXY_H_
36 #define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_NUMERICPROXY_H_
98 template<
typename MT >
106 template<
typename T >
107 struct BuiltinType {
typedef INVALID_TYPE Type; };
115 template<
typename T >
116 struct ComplexType {
typedef typename T::value_type Type; };
130 , ComplexType<RepresentedType>
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 );
154 template<
typename T >
inline NumericProxy& operator/=(
const T& value );
169 inline void reset ()
const;
170 inline void clear ()
const;
171 inline void invert()
const;
173 inline ConstReference
get()
const;
187 inline ValueType
real()
const;
188 inline void real( ValueType value )
const;
189 inline ValueType
imag()
const;
190 inline void imag( ValueType value )
const;
238 template<
typename MT >
252 template<
typename MT >
254 : matrix_( np.matrix_ )
256 , column_( np.column_ )
275 template<
typename MT >
292 template<
typename MT >
293 template<
typename T >
296 matrix_(row_,column_) = value;
297 if( row_ != column_ )
298 matrix_(column_,row_) = value;
311 template<
typename MT >
312 template<
typename T >
315 matrix_(row_,column_) += value;
316 if( row_ != column_ )
317 matrix_(column_,row_) += value;
330 template<
typename MT >
331 template<
typename T >
334 matrix_(row_,column_) -= value;
335 if( row_ != column_ )
336 matrix_(column_,row_) -= value;
349 template<
typename MT >
350 template<
typename T >
353 matrix_(row_,column_) *= value;
354 if( row_ != column_ )
355 matrix_(column_,row_) *= value;
368 template<
typename MT >
369 template<
typename T >
372 matrix_(row_,column_) /= value;
373 if( row_ != column_ )
374 matrix_(column_,row_) /= value;
394 template<
typename MT >
407 template<
typename MT >
430 template<
typename MT >
435 reset( matrix_(row_,column_) );
436 if( row_ != column_ )
437 reset( matrix_(column_,row_) );
449 template<
typename MT >
454 clear( matrix_(row_,column_) );
455 if( row_ != column_ )
456 clear( matrix_(column_,row_) );
466 template<
typename MT >
471 invert( matrix_(row_,column_) );
472 if( row_ != column_ )
473 matrix_(column_,row_) = matrix_(row_,column_);
483 template<
typename MT >
486 return const_cast<const MT&
>( matrix_ )(row_,column_);
504 template<
typename MT >
528 template<
typename MT >
531 return matrix_(row_,column_).real();
544 template<
typename MT >
547 matrix_(row_,column_).real( value );
548 if( row_ != column_ )
549 matrix_(column_,row_).real( value );
562 template<
typename MT >
565 return matrix_(row_,column_).imag();
579 template<
typename MT >
582 matrix_(row_,column_).imag( value );
583 if( row_ != column_ )
584 matrix_(column_,row_).imag( value );
600 template<
typename MT >
604 template<
typename MT >
607 template<
typename MT >
610 template<
typename MT >
613 template<
typename MT >
616 template<
typename MT >
619 template<
typename MT >
622 template<
typename MT >
625 template<
typename MT >
642 template<
typename MT >
648 return conj( (~proxy).
get() );
663 template<
typename MT >
681 template<
typename MT >
696 template<
typename MT >
714 template<
typename MT >
736 template<
typename MT >
756 template<
typename MT >
776 template<
typename MT >
796 template<
typename MT >
MT::ElementType RepresentedType
Type of the represented matrix element.
Definition: NumericProxy.h:122
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:116
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:609
Constraint on the data type.
size_t row_
Row index of the accessed matrix element.
Definition: NumericProxy.h:199
Compile time type selection.The If class template selects one of the two given types T2 and T3 depend...
Definition: If.h:112
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
bool isReal(const DiagonalProxy< MT > &proxy)
Returns whether the matrix element represents a real number.
Definition: DiagonalProxy.h:569
NumericProxy * Pointer
Pointer to the represented element.
Definition: NumericProxy.h:125
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:507
MT & matrix_
Reference to the adapted matrix.
Definition: NumericProxy.h:198
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename ColumnExprTrait< MT >::Type >::Type column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:107
#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:116
Header file for the invert shim.
ValueType imag() const
Returns the imaginary part of the represented complex number.
Definition: NumericProxy.h:563
Constraint on the data type.
ConstReference get() const
Returning the value of the accessed matrix element.
Definition: NumericProxy.h:484
void reset() const
Reset the represented element to its default initial value.
Definition: NumericProxy.h:431
Header file for the Proxy class.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:547
Constraint on the data type.
Constraint on the data type.
ConjExprTrait< typename DiagonalProxy< MT >::RepresentedType >::Type conj(const DiagonalProxy< MT > &proxy)
Computing the complex conjugate of the represented element.
Definition: DiagonalProxy.h:487
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:767
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:116
Constraint on the data type.
Access proxy for symmetric, square matrices with numeric element types.The NumericProxy provides cont...
Definition: NumericProxy.h:99
Header file for the isZero shim.
ValueType real() const
Returns the real part of the represented complex number.
Definition: NumericProxy.h:529
Constraint on the data type.
void invert() const
In-place inversion of the represented element.
Definition: NumericProxy.h:467
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:629
#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:118
Pointer operator->()
Direct access to the represented matrix element.
Definition: NumericProxy.h:395
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2586
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2590
MT::Reference Reference
Reference to the represented element.
Definition: NumericProxy.h:123
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:527
Header file for the isOne shim.
Header file for the conjugate shim.
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename RowExprTrait< MT >::Type >::Type row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:107
Evaluation of the return type of a complex conjugate expression.Via this type trait it is possible to...
Definition: ConjExprTrait.h:87
#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:116
Utility type for generic codes.
Constraint on the data type.
Constraint on the data type.
#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:79
size_t column_
Column index of the accessed matrix element.
Definition: NumericProxy.h:200
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:118
#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:116
Header file for the isDefault shim.
If< IsComplex< RepresentedType >, ComplexType< RepresentedType >, BuiltinType< RepresentedType > >::Type::Type ValueType
Value type of the represented complex element.
Definition: NumericProxy.h:131
Constraint on the data type.
Constraint on the data type.
NumericProxy & operator=(const NumericProxy &sp)
Copy assignment operator for NumericProxy.
Definition: NumericProxy.h:276
MT::ConstReference ConstReference
Reference-to-const to the represented element.
Definition: NumericProxy.h:124
const NumericProxy * ConstPointer
Pointer-to-const to the represented element.
Definition: NumericProxy.h:126
#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:118
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:589
Header file for the IsComplex type trait.
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2589
#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:116
NumericProxy(MT &matrix, size_t row, size_t column)
Initialization constructor for a NumericProxy.
Definition: NumericProxy.h:239
#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:79
void clear() const
Clearing the represented element.
Definition: NumericProxy.h:450
Header file for the ConjExprTrait class template.
Header file for the isReal shim.