35 #ifndef _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_HERMITIANPROXY_H_
36 #define _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_HERMITIANPROXY_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 HermitianProxy& operator+=(
const T& value );
152 template<
typename T >
inline HermitianProxy& operator-=(
const T& value );
153 template<
typename T >
inline HermitianProxy& operator*=(
const T& value );
154 template<
typename T >
inline HermitianProxy& 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;
241 template<
typename MT >
243 : value1_ ( matrix(row,column) )
244 , value2_ ( matrix(column,row) )
245 , diagonal_( row == column )
255 template<
typename MT >
257 : value1_ ( hp.value1_ )
258 , value2_ ( hp.value2_ )
259 , diagonal_( hp.diagonal_ )
282 template<
typename MT >
293 value2_ =
conj( value1_ );
310 template<
typename MT >
311 template<
typename T >
322 value2_ =
conj( value1_ );
339 template<
typename MT >
340 template<
typename T >
351 value2_ =
conj( value1_ );
368 template<
typename MT >
369 template<
typename T >
380 value2_ =
conj( value1_ );
397 template<
typename MT >
398 template<
typename T >
409 value2_ =
conj( value1_ );
426 template<
typename MT >
427 template<
typename T >
438 value2_ =
conj( value1_ );
458 template<
typename MT >
471 template<
typename MT >
494 template<
typename MT >
513 template<
typename MT >
530 template<
typename MT >
537 value2_ =
conj( value1_ );
547 template<
typename MT >
568 template<
typename MT >
592 template<
typename MT >
595 return value1_.real();
608 template<
typename MT >
611 value1_.real( value );
613 value2_.real( value );
626 template<
typename MT >
629 return value1_.imag();
645 template<
typename MT >
648 if( diagonal_ && !
isZero( value ) ) {
652 value1_.imag( value );
654 value2_.imag( -value );
670 template<
typename MT >
674 template<
typename MT >
677 template<
typename MT >
680 template<
typename MT >
683 template<
typename MT >
686 template<
typename MT >
689 template<
typename MT >
692 template<
typename MT >
695 template<
typename MT >
712 template<
typename MT >
718 return conj( (~proxy).
get() );
733 template<
typename MT >
751 template<
typename MT >
766 template<
typename MT >
784 template<
typename MT >
806 template<
typename MT >
826 template<
typename MT >
846 template<
typename MT >
866 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:116
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exceptionThis macro encapsulates the default way of...
Definition: Exception.h:187
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:609
Constraint on the data type.
HermitianProxy & operator=(const HermitianProxy &hp)
Copy assignment operator for HermitianProxy.
Definition: HermitianProxy.h:283
void reset() const
Reset the represented element to its default initial value.
Definition: HermitianProxy.h:495
Reference value2_
Reference to the second accessed matrix element.
Definition: HermitianProxy.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
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:507
Access proxy for Hermitian matrices.The HermitianProxy provides controlled access to the elements of ...
Definition: HermitianProxy.h:99
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.
Constraint on the data type.
const bool diagonal_
Flag for the accessed matrix element.
Definition: HermitianProxy.h:200
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
MT::Reference Reference
Reference to the represented element.
Definition: HermitianProxy.h:123
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:767
void clear() const
Clearing the represented element.
Definition: HermitianProxy.h:514
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
MT::ElementType RepresentedType
Type of the represented matrix element.
Definition: HermitianProxy.h:122
#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.
Header file for the isZero shim.
Constraint on the data type.
Pointer operator->()
Direct access to the represented matrix element.
Definition: HermitianProxy.h:459
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
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
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.
void invert() const
In-place inversion of the represented element.
Definition: HermitianProxy.h:531
HermitianProxy(MT &matrix, size_t row, size_t column)
Initialization constructor for a HermitianProxy.
Definition: HermitianProxy.h:242
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
If< IsComplex< RepresentedType >, ComplexType< RepresentedType >, BuiltinType< RepresentedType > >::Type::Type ValueType
Value type of the represented complex element.
Definition: HermitianProxy.h:131
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.
ValueType real() const
Returns the real part of the represented complex number.
Definition: HermitianProxy.h:593
#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
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.
Constraint on the data type.
Constraint on the data type.
Reference value1_
Reference to the first accessed matrix element.
Definition: HermitianProxy.h:198
ConstReference get() const
Returning the value of the accessed matrix element.
Definition: HermitianProxy.h:548
Compile time check for complex types.This type trait tests whether or not the given template paramete...
Definition: IsComplex.h:76
#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
ValueType imag() const
Returns the imaginary part of the represented complex number.
Definition: HermitianProxy.h:627
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:589
HermitianProxy * Pointer
Pointer to the represented element.
Definition: HermitianProxy.h:125
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
const HermitianProxy * ConstPointer
Pointer-to-const to the represented element.
Definition: HermitianProxy.h:126
#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
Header file for exception macros.
Header file for the ConjExprTrait class template.
Header file for the isReal shim.
MT::ConstReference ConstReference
Reference-to-const to the represented element.
Definition: HermitianProxy.h:124