35#ifndef _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_HERMITIANVALUE_H_
36#define _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_HERMITIANVALUE_H_
117template<
typename MT >
119 :
public Proxy< HermitianValue<MT> >
157 template<
typename T >
inline HermitianValue& operator+=(
const T& value );
158 template<
typename T >
inline HermitianValue& operator-=(
const T& value );
159 template<
typename T >
inline HermitianValue& operator*=(
const T& value );
160 template<
typename T >
inline HermitianValue& operator/=(
const T& value );
167 inline void invert()
const;
194 inline
void sync() const;
236 reset( value.pos_->value() );
238 if( value.pos_->index() != value.index_ )
240 const size_t row ( ( IsRowMajorMatrix_v<MT> )?( value.pos_->index() ):( value.index_ ) );
241 const size_t column( ( IsRowMajorMatrix_v<MT> )?( value.index_ ):( value.pos_->index() ) );
244 reset( pos2->value() );
268 const size_t row ( ( IsRowMajorMatrix_v<MT> )?( value.
pos_->index() ):( value.
index_ ) );
269 const size_t column( ( IsRowMajorMatrix_v<MT> )?( value.
index_ ):( value.
pos_->index() ) );
272 clear( pos2->value() );
296template<
typename MT >
320template<
typename MT >
323 const bool isDiagonal( pos_->index() == index_ );
329 pos_->value() = hv.
pos_->value();
343template<
typename MT >
344template<
typename T >
347 const bool isDiagonal( pos_->index() == index_ );
353 pos_->value() = value;
367template<
typename MT >
368template<
typename T >
371 const bool isDiagonal( pos_->index() == index_ );
377 pos_->value() += value;
391template<
typename MT >
392template<
typename T >
395 const bool isDiagonal( pos_->index() == index_ );
401 pos_->value() -= value;
415template<
typename MT >
416template<
typename T >
419 const bool isDiagonal( pos_->index() == index_ );
425 pos_->value() *= value;
439template<
typename MT >
440template<
typename T >
443 const bool isDiagonal( pos_->index() == index_ );
449 pos_->value() /= value;
469template<
typename MT >
476 if( pos_->index() != index_ )
478 const size_t row ( ( IsRowMajorMatrix_v<MT> )?( pos_->index() ):( index_ ) );
479 const size_t column( ( IsRowMajorMatrix_v<MT> )?( index_ ):( pos_->index() ) );
482 pos2->value() =
conj( pos_->value() );
493template<
typename MT >
496 return pos_->value();
506template<
typename MT >
509 if( pos_->index() == index_ ||
isDefault( pos_->value() ) )
512 const size_t row ( ( IsRowMajorMatrix_v<MT> )?( pos_->index() ):( index_ ) );
513 const size_t column( ( IsRowMajorMatrix_v<MT> )?( index_ ):( pos_->index() ) );
533template<
typename MT >
536 return pos_->value();
557template<
typename MT >
560 return pos_->value().real();
574template<
typename MT >
577 pos_->value().real() = value;
591template<
typename MT >
594 return pos_->value.imag();
608template<
typename MT >
611 pos_->value().imag( value );
628template<
typename MT >
641template<
typename MT >
Header file for auxiliary alias declarations.
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
Header file for the conjugate shim.
Constraint on the data type.
Constraint on the data type.
Header file for the If class template.
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.
Header file for the IsRowMajorMatrix type trait.
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.
Representation of two synchronized values within a sparse Hermitian matrix.
Definition: HermitianValue.h:120
HermitianValue & operator=(const HermitianValue &hv)
Copy assignment operator for HermitianValue.
Definition: HermitianValue.h:321
HermitianValue(IteratorType pos, MT *matrix, size_t index)
Constructor for the HermitianValue class.
Definition: HermitianValue.h:297
typename MT::Iterator IteratorType
Type of the underlying sparse matrix iterators.
Definition: HermitianValue.h:123
ElementType_t< MT > RepresentedType
Type of the represented matrix element.
Definition: HermitianValue.h:128
IteratorType pos_
Iterator to the current sparse Hermitian matrix element.
Definition: HermitianValue.h:199
size_t index_
The row/column index of the iterator.
Definition: HermitianValue.h:201
RepresentedType get() const noexcept
Access to the represented value.
Definition: HermitianValue.h:494
ValueType value_type
Value type of the represented complex element.
Definition: HermitianValue.h:133
UnderlyingBuiltin_t< RepresentedType > ValueType
Value type of the represented complex element.
Definition: HermitianValue.h:131
MT * matrix_
The sparse matrix containing the iterator.
Definition: HermitianValue.h:200
void sync() const
Synchronization of the current sparse element to the according paired element.
Definition: HermitianValue.h:507
void invert() const
In-place inversion of the Hermitian value.
Definition: HermitianValue.h:470
ValueType imag() const
Returns the imaginary part of the represented complex number.
Definition: HermitianValue.h:592
ValueType real() const
Returns the real part of the represented complex number.
Definition: HermitianValue.h:558
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 isDiagonal(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is diagonal.
Definition: DenseMatrix.h:2456
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition: DiagonalMatrix.h:169
void invert(const HermitianValue< MT > &value)
In-place inversion of the Hermitian value.
Definition: HermitianValue.h:642
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.
Definition: Symmetric.h:79
#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_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: SparseMatrix.h:61
#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
#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.