35#ifndef _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_HERMITIANPROXY_H_
36#define _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_HERMITIANPROXY_H_
99template<
typename MT >
101 :
public Proxy< HermitianProxy<MT> >
139 template<
typename T >
inline HermitianProxy& operator+=(
const T& value );
140 template<
typename T >
inline HermitianProxy& operator-=(
const T& value );
141 template<
typename T >
inline HermitianProxy& operator*=(
const T& value );
142 template<
typename T >
inline HermitianProxy& operator/=(
const T& value );
143 template<
typename T >
inline HermitianProxy& operator%=(
const T& value );
158 inline
void invert() const;
227 reset( proxy.value1_ );
228 if( !proxy.diagonal_ ) {
229 reset( proxy.value2_ );
273template<
typename MT >
300template<
typename MT >
305 if( IsComplex_v<ET> && diagonal_ && !
isReal( hp.
value1_ ) ) {
311 value2_ =
conj( value1_ );
328template<
typename MT >
329template<
typename T >
334 if( IsComplex_v<ET> && diagonal_ && !
isReal( value ) ) {
340 value2_ =
conj( value1_ );
357template<
typename MT >
358template<
typename T >
363 if( IsComplex_v<ET> && diagonal_ && !
isReal( value ) ) {
369 value2_ =
conj( value1_ );
386template<
typename MT >
387template<
typename T >
392 if( IsComplex_v<ET> && diagonal_ && !
isReal( value ) ) {
398 value2_ =
conj( value1_ );
415template<
typename MT >
416template<
typename T >
421 if( IsComplex_v<ET> && diagonal_ && !
isReal( value ) ) {
427 value2_ =
conj( value1_ );
444template<
typename MT >
445template<
typename T >
450 if( IsComplex_v<ET> && diagonal_ && !
isReal( value ) ) {
456 value2_ =
conj( value1_ );
473template<
typename MT >
474template<
typename T >
479 if( IsComplex_v<ET> && diagonal_ && !
isReal( value ) ) {
485 value2_ =
conj( value1_ );
505template<
typename MT >
518template<
typename MT >
539template<
typename MT >
546 value2_ =
conj( value1_ );
556template<
typename MT >
577template<
typename MT >
601template<
typename MT >
604 return value1_.real();
617template<
typename MT >
620 value1_.real( value );
622 value2_.real( value );
635template<
typename MT >
638 return value1_.imag();
654template<
typename MT >
657 if( diagonal_ && !
isZero( value ) ) {
661 value1_.imag( value );
663 value2_.imag( -value );
679template<
typename MT >
692template<
typename MT >
Header file for auxiliary alias declarations.
typename T::ConstReference ConstReference_t
Alias declaration for nested ConstReference type definitions.
Definition: Aliases.h:170
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
typename T::Reference Reference_t
Alias declaration for nested Reference type definitions.
Definition: Aliases.h:390
Header file for the conjugate shim.
Constraint on the data type.
Constraint on the data type.
Header file for the invert shim.
Header file for the IsComplex type trait.
Header file for the isDefault shim.
Header file for the isOne shim.
Header file for the isReal shim.
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
Header file for the relaxation flag enumeration.
Constraint on the data type.
Constraint on the data type.
Header file for the UnderlyingBuiltin type trait.
Constraint on the data type.
Constraint on the data type.
Access proxy for Hermitian matrices.
Definition: HermitianProxy.h:102
HermitianProxy & operator=(const HermitianProxy &hp)
Copy assignment operator for HermitianProxy.
Definition: HermitianProxy.h:301
Reference value2_
Reference to the second accessed matrix element.
Definition: HermitianProxy.h:186
UnderlyingBuiltin_t< RepresentedType > ValueType
Value type of the represented complex element.
Definition: HermitianProxy.h:112
void invert() const
In-place inversion of the represented element.
Definition: HermitianProxy.h:540
ElementType_t< MT > RepresentedType
Type of the represented matrix element.
Definition: HermitianProxy.h:105
ValueType real() const
Returns the real part of the represented complex number.
Definition: HermitianProxy.h:602
ConstReference_t< MT > ConstReference
Reference-to-const to the represented element.
Definition: HermitianProxy.h:107
ValueType value_type
Value type of the represented complex element.
Definition: HermitianProxy.h:115
HermitianProxy(MT &matrix, size_t row, size_t column)
Initialization constructor for a HermitianProxy.
Definition: HermitianProxy.h:274
Reference_t< MT > Reference
Reference to the represented element.
Definition: HermitianProxy.h:106
const bool diagonal_
Flag for the accessed matrix element.
Definition: HermitianProxy.h:187
Pointer operator->() noexcept
Direct access to the represented matrix element.
Definition: HermitianProxy.h:506
ValueType imag() const
Returns the imaginary part of the represented complex number.
Definition: HermitianProxy.h:636
ConstReference get() const noexcept
Returning the value of the accessed matrix element.
Definition: HermitianProxy.h:557
Reference value1_
Reference to the first accessed matrix element.
Definition: HermitianProxy.h:185
Proxy base class.
Definition: Proxy.h:169
Constraint on the data type.
Constraint on the data type.
Constraint on the data type.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:137
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.
Definition: Volatile.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.
Definition: Pointer.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.
Definition: Const.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.
Definition: Reference.h:79
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatMapExpr.h:1464
bool isZero(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a zero matrix.
Definition: DenseMatrix.h:1819
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:693
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Symmetric.h:79
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Matrix.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VIEW_TYPE(T)
Constraint on the data type.
Definition: View.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Hermitian.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Upper.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.
Definition: Computation.h:81
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Lower.h:81
#define BLAZE_CONSTRAINT_MUST_BE_SCALAR_TYPE(T)
Constraint on the data type.
Definition: Scalar.h:61
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSFORMATION_TYPE(T)
Constraint on the data type.
Definition: Transformation.h:81
typename UnderlyingBuiltin< T >::Type UnderlyingBuiltin_t
Auxiliary alias declaration for the UnderlyingBuiltin type trait.
Definition: UnderlyingBuiltin.h:117
bool isReal(const Proxy< PT, RT > &proxy)
Returns whether the element represents a real number.
Definition: Proxy.h:2297
constexpr void clear(Matrix< MT, SO > &matrix)
Clearing the given matrix.
Definition: Matrix.h:960
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition: Matrix.h:806
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:137
constexpr Type & get(StaticVector< Type, N, TF, AF, PF, Tag > &v) noexcept
Tuple-like index-based access the contents of a static vector.
Definition: StaticVector.h:3052
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition: Exception.h:235
Header file for the exception macros of the math module.
Header file for the Proxy class.
Header file for the clear shim.
Header file for the isZero shim.
Header file for the reset shim.
Header file for basic type definitions.