35 #ifndef _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_HERMITIANPROXY_H_ 36 #define _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_HERMITIANPROXY_H_ 98 template<
typename MT >
100 :
public Proxy< HermitianProxy<MT> >
107 template<
typename T >
108 struct BuiltinType {
using Type = INVALID_TYPE; };
116 template<
typename T >
117 struct ComplexType {
using Type =
typename T::value_type; };
131 , ComplexType<RepresentedType>
132 , BuiltinType<RepresentedType> >::Type;
155 template<
typename T >
inline HermitianProxy& operator+=(
const T& value );
156 template<
typename T >
inline HermitianProxy& operator-=(
const T& value );
157 template<
typename T >
inline HermitianProxy& operator*=(
const T& value );
158 template<
typename T >
inline HermitianProxy& operator/=(
const T& value );
159 template<
typename T >
inline HermitianProxy& operator%=(
const T& value );
174 inline
void reset () const;
175 inline
void clear () const;
176 inline
void invert() const;
246 template< typename MT >
260 template<
typename MT >
287 template<
typename MT >
292 if( IsComplex_v<ET> && diagonal_ && !
isReal( hp.
value1_ ) ) {
298 value2_ =
conj( value1_ );
315 template<
typename MT >
316 template<
typename T >
321 if( IsComplex_v<ET> && diagonal_ && !
isReal( value ) ) {
327 value2_ =
conj( value1_ );
344 template<
typename MT >
345 template<
typename T >
350 if( IsComplex_v<ET> && diagonal_ && !
isReal( value ) ) {
356 value2_ =
conj( value1_ );
373 template<
typename MT >
374 template<
typename T >
379 if( IsComplex_v<ET> && diagonal_ && !
isReal( value ) ) {
385 value2_ =
conj( value1_ );
402 template<
typename MT >
403 template<
typename T >
408 if( IsComplex_v<ET> && diagonal_ && !
isReal( value ) ) {
414 value2_ =
conj( value1_ );
431 template<
typename MT >
432 template<
typename T >
437 if( IsComplex_v<ET> && diagonal_ && !
isReal( value ) ) {
443 value2_ =
conj( value1_ );
460 template<
typename MT >
461 template<
typename T >
466 if( IsComplex_v<ET> && diagonal_ && !
isReal( value ) ) {
472 value2_ =
conj( value1_ );
492 template<
typename MT >
505 template<
typename MT >
528 template<
typename MT >
547 template<
typename MT >
564 template<
typename MT >
571 value2_ =
conj( value1_ );
581 template<
typename MT >
602 template<
typename MT >
626 template<
typename MT >
629 return value1_.real();
642 template<
typename MT >
645 value1_.real( value );
647 value2_.real( value );
660 template<
typename MT >
663 return value1_.imag();
679 template<
typename MT >
682 if( diagonal_ && !
isZero( value ) ) {
686 value1_.imag( value );
688 value2_.imag( -value );
704 template<
typename MT >
707 template<
typename MT >
710 template<
typename MT >
713 template<
bool RF,
typename MT >
716 template<
bool RF,
typename MT >
719 template<
bool RF,
typename MT >
722 template<
bool RF,
typename MT >
725 template<
typename MT >
741 template<
typename MT >
759 template<
typename MT >
774 template<
typename MT >
792 template<
bool RF,
typename MT >
797 return isDefault<RF>( proxy.
get() );
814 template<
bool RF,
typename MT >
819 return isReal<RF>( proxy.
get() );
834 template<
bool RF,
typename MT >
839 return isZero<RF>( proxy.
get() );
854 template<
bool RF,
typename MT >
859 return isOne<RF>( proxy.
get() );
874 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
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
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.
HermitianProxy & operator=(const HermitianProxy &hp)
Copy assignment operator for HermitianProxy.
Definition: HermitianProxy.h:288
Reference value2_
Reference to the second accessed matrix element.
Definition: HermitianProxy.h:204
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
void invert() const
In-place inversion of the represented element.
Definition: HermitianProxy.h:565
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
Access proxy for Hermitian matrices.The HermitianProxy provides controlled access to the elements of ...
Definition: HermitianProxy.h:99
ValueType imag() const
Returns the imaginary part of the represented complex number.
Definition: HermitianProxy.h:661
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.
typename If_t< IsComplex_v< RepresentedType >, ComplexType< RepresentedType >, BuiltinType< RepresentedType > >::Type ValueType
Value type of the represented complex element.
Definition: HermitianProxy.h:132
Header file for the reset shim.
ValueType real() const
Returns the real part of the represented complex number.
Definition: HermitianProxy.h:627
Constraint on the data type.
const bool diagonal_
Flag for the accessed matrix element.
Definition: HermitianProxy.h:205
Pointer operator->() noexcept
Direct access to the represented matrix element.
Definition: HermitianProxy.h:493
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.
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
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.
Constraint on the data type.
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:713
Header file for the exception macros of the math module.
#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
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:611
Header file for the isOne shim.
Header file for the conjugate shim.
HermitianProxy(MT &matrix, size_t row, size_t column)
Initialization constructor for a HermitianProxy.
Definition: HermitianProxy.h:247
#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.
void clear() const
Clearing the represented element.
Definition: HermitianProxy.h:548
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
#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.
ConstReference get() const noexcept
Returning the value of the accessed matrix element.
Definition: HermitianProxy.h:582
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.
void reset() const
Reset the represented element to its default initial value.
Definition: HermitianProxy.h:529
Reference value1_
Reference to the first accessed matrix element.
Definition: HermitianProxy.h:203
Reference_t< MT > Reference
Reference to the represented element.
Definition: HermitianProxy.h:124
ConstReference_t< MT > ConstReference
Reference-to-const to the represented element.
Definition: HermitianProxy.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
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
#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
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatMapExpr.h:1326
Header file for the isReal shim.
ElementType_t< MT > RepresentedType
Type of the represented matrix element.
Definition: HermitianProxy.h:123
Header file for the clear shim.