35 #ifndef _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_HERMITIANVALUE_H_ 36 #define _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_HERMITIANVALUE_H_ 115 template<
typename MT >
117 :
public Proxy< HermitianValue<MT> >
128 template<
typename T >
129 struct BuiltinType {
using Type = INVALID_TYPE; };
137 template<
typename T >
138 struct ComplexType {
using Type =
typename T::value_type; };
148 , ComplexType<RepresentedType>
149 , BuiltinType<RepresentedType> >::Type;
176 inline void reset ()
const;
177 inline void clear ()
const;
178 inline void invert()
const;
205 inline
void sync() const;
249 template< typename MT >
273 template<
typename MT >
296 template<
typename MT >
297 template<
typename T >
306 pos_->value() = value;
320 template<
typename MT >
321 template<
typename T >
330 pos_->value() += value;
344 template<
typename MT >
345 template<
typename T >
354 pos_->value() -= value;
368 template<
typename MT >
369 template<
typename T >
378 pos_->value() *= value;
392 template<
typename MT >
393 template<
typename T >
402 pos_->value() /= value;
424 template<
typename MT >
437 reset( pos2->value() );
450 template<
typename MT >
463 clear( pos2->value() );
474 template<
typename MT >
487 pos2->value() =
conj(
pos_->value() );
498 template<
typename MT >
501 return pos_->value();
511 template<
typename MT >
538 template<
typename MT >
541 return pos_->value();
562 template<
typename MT >
565 return pos_->value().real();
579 template<
typename MT >
582 pos_->value().real() = value;
596 template<
typename MT >
599 return pos_->value.imag();
613 template<
typename MT >
616 pos_->value().imag( value );
633 template<
typename MT >
636 template<
typename MT >
639 template<
typename MT >
642 template<
bool RF,
typename MT >
645 template<
bool RF,
typename MT >
648 template<
bool RF,
typename MT >
651 template<
bool RF,
typename MT >
654 template<
typename MT >
669 template<
typename MT >
686 template<
typename MT >
701 template<
typename MT >
719 template<
bool RF,
typename MT >
724 return isDefault<RF>( value.
get() );
741 template<
bool RF,
typename MT >
746 return isReal<RF>( value.
get() );
761 template<
bool RF,
typename MT >
766 return isZero<RF>( value.
get() );
781 template<
bool RF,
typename MT >
786 return isOne<RF>( value.
get() );
801 template<
typename MT >
bool isReal(const DiagonalProxy< MT > &proxy)
Returns whether the matrix element represents a real number.
Definition: DiagonalProxy.h:650
Header file for the isnan shim.
IteratorType pos_
Iterator to the current sparse Hermitian matrix element.
Definition: HermitianValue.h:210
#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.
ElementType_< MT > RepresentedType
Type of the represented matrix element.
Definition: HermitianValue.h:144
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:131
Constraint on the data type.
ValueType imag() const
Returns the imaginary part of the represented complex number.
Definition: HermitianValue.h:597
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
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:588
ValueType value_type
Value type of the represented complex element.
Definition: HermitianValue.h:151
#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.
bool isDiagonal(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is diagonal.
Definition: DenseMatrix.h:1725
size_t index_
The row/column index of the iterator.
Definition: HermitianValue.h:212
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:3084
RepresentedType get() const noexcept
Access to the represented value.
Definition: HermitianValue.h:499
Constraint on the data type.
ValueType real() const
Returns the real part of the represented complex number.
Definition: HermitianValue.h:563
Header file for the Proxy class.
typename MT::Iterator IteratorType
Type of the underlying sparse matrix iterators.
Definition: HermitianValue.h:121
Constraint on the data type.
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:670
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:772
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
Compile time check for row-major matrix types.This type trait tests whether or not the given template...
Definition: IsRowMajorMatrix.h:110
#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
HermitianValue & operator=(const HermitianValue &hv)
Copy assignment operator for HermitianValue.
Definition: HermitianValue.h:274
Header file for the isZero shim.
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Constraint on the data type.
void sync() const
Synchronization of the current sparse element to the according paired element.
Definition: HermitianValue.h:512
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:710
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 invert() const
In-place inversion of the Hermitian value.
Definition: HermitianValue.h:475
void clear() const
Clearing the Hermitian value.
Definition: HermitianValue.h:451
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:608
Representation of two synchronized values within a sparse Hermitian matrix.The HermitianValue class r...
Definition: HermitianValue.h:116
Header file for the isOne shim.
Header file for the conjugate shim.
#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
void reset() const
Reset the Hermitian value to its default initial value.
Definition: HermitianValue.h:425
BLAZE_ALWAYS_INLINE T1 & operator+=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Addition assignment operator for the addition of two SIMD packs.
Definition: BasicTypes.h:1357
Utility type for generic codes.
Constraint on the data type.
Constraint on the data type.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:154
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:131
#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
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: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:690
Header file for the isDefault shim.
Constraint on the data type.
Constraint on the data type.
EnableIf_< IsNumeric< ST >, MT &> operator/=(DenseMatrix< MT, SO > &mat, ST scalar)
Division assignment operator for the division of a dense matrix by a scalar value ( )...
Definition: DenseMatrix.h:655
Compile time check for complex types.This type trait tests whether or not the given template paramete...
Definition: IsComplex.h:76
Header file for the IsRowMajorMatrix type trait.
HermitianValue(IteratorType pos, MT *matrix, size_t index)
Constructor for the HermitianValue class.
Definition: HermitianValue.h:250
#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:628
#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
BLAZE_ALWAYS_INLINE T1 & operator-=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Subtraction assignment operator for the subtraction of two SIMD packs.
Definition: BasicTypes.h:1375
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatMapExpr.h:1321
MT * matrix_
The sparse matrix containing the iterator.
Definition: HermitianValue.h:211
EnableIf_< IsNumeric< ST >, MT &> operator*=(DenseMatrix< MT, SO > &mat, ST scalar)
Multiplication assignment operator for the multiplication of a dense matrix and a scalar value ( )...
Definition: DenseMatrix.h:593
Header file for the isReal shim.
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:61
typename If_< IsComplex< RepresentedType >, ComplexType< RepresentedType >, BuiltinType< RepresentedType > >::Type ValueType
Value type of the represented complex element.
Definition: HermitianValue.h:149