35 #ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_SYMMETRICVALUE_H_
36 #define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_SYMMETRICVALUE_H_
112 template<
typename MT >
124 template<
typename T >
125 struct BuiltinType {
typedef INVALID_TYPE Type; };
133 template<
typename T >
134 struct ComplexType {
typedef typename T::value_type Type; };
144 , ComplexType<RepresentedType>
153 inline SymmetricValue( IteratorType pos, MT* matrix,
size_t index );
162 template<
typename T >
inline SymmetricValue& operator+=(
const T& value );
163 template<
typename T >
inline SymmetricValue& operator-=(
const T& value );
164 template<
typename T >
inline SymmetricValue& operator*=(
const T& value );
165 template<
typename T >
inline SymmetricValue& operator/=(
const T& value );
172 inline void reset ()
const;
173 inline void clear ()
const;
174 inline void invert()
const;
176 inline RepresentedType
get()
const noexcept;
190 inline ValueType
real() const;
191 inline
void real( ValueType value ) const;
192 inline ValueType
imag() const;
193 inline
void imag( ValueType value ) const;
201 inline
void sync() const;
245 template< typename MT >
268 template<
typename MT >
284 template<
typename MT >
285 template<
typename T >
288 pos_->value() = value;
302 template<
typename MT >
303 template<
typename T >
306 pos_->value() += value;
319 template<
typename MT >
320 template<
typename T >
323 pos_->value() -= value;
336 template<
typename MT >
337 template<
typename T >
340 pos_->value() *= value;
353 template<
typename MT >
354 template<
typename T >
357 pos_->value() /= value;
379 template<
typename MT >
390 const IteratorType pos2(
matrix_->find(
row, column ) );
392 reset( pos2->value() );
405 template<
typename MT >
416 const IteratorType pos2(
matrix_->find(
row, column ) );
418 clear( pos2->value() );
429 template<
typename MT >
440 const IteratorType pos2(
matrix_->find(
row, column ) );
442 pos2->value() =
pos_->value();
453 template<
typename MT >
456 return pos_->value();
466 template<
typename MT >
493 template<
typename MT >
496 return pos_->value();
517 template<
typename MT >
520 return pos_->value().real();
534 template<
typename MT >
537 pos_->value().real() = value;
551 template<
typename MT >
554 return pos_->value.imag();
568 template<
typename MT >
571 pos_->value().imag( value );
588 template<
typename MT >
591 template<
typename MT >
594 template<
typename MT >
597 template<
typename MT >
600 template<
typename MT >
603 template<
typename MT >
606 template<
typename MT >
609 template<
typename MT >
624 template<
typename MT >
641 template<
typename MT >
656 template<
typename MT >
674 template<
typename MT >
696 template<
typename MT >
716 template<
typename MT >
736 template<
typename MT >
756 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:79
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:635
Header file for auxiliary alias declarations.
Constraint on the data type.
void invert() const
In-place inversion of the symmetric value.
Definition: SymmetricValue.h:430
void clear() const
Clearing the symmetric value.
Definition: SymmetricValue.h:406
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:595
SymmetricValue & operator=(const SymmetricValue &sv)
Copy assignment operator for SymmetricValue.
Definition: SymmetricValue.h:269
MT * matrix_
The sparse matrix containing the iterator.
Definition: SymmetricValue.h:207
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
#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.
ValueType imag() const
Returns the imaginary part of the represented complex number.
Definition: SymmetricValue.h:552
Constraint on the data type.
ValueType real() const
Returns the real part of the represented complex number.
Definition: SymmetricValue.h:518
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:126
Header file for the Proxy class.
RepresentedType get() const noexcept
Access to the represented value.
Definition: SymmetricValue.h:454
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
Constraint on the data type.
IteratorType pos_
Iterator to the current sparse symmetric matrix element.
Definition: SymmetricValue.h:206
Constraint on the data type.
Constraint on the data type.
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:741
MT::Iterator IteratorType
Type of the underlying sparse matrix iterators.
Definition: SymmetricValue.h:117
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
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:83
#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
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.
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:655
#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
If_< IsComplex< RepresentedType >, ComplexType< RepresentedType >, BuiltinType< RepresentedType > >::Type ValueType
Value type of the represented complex element.
Definition: SymmetricValue.h:145
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
Header file for the isOne shim.
size_t index_
The row/column index of the iterator.
Definition: SymmetricValue.h:208
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:126
ValueType value_type
Value type of the represented complex element.
Definition: SymmetricValue.h:147
void sync() const
Synchronization of the current sparse element to the according paired element.
Definition: SymmetricValue.h:467
#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.
ElementType_< MT > RepresentedType
Type of the represented matrix element.
Definition: SymmetricValue.h:140
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:160
#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
Representation of two synchronized values within a sparse symmetric matrix.The SymmetricValue class r...
Definition: SymmetricValue.h:113
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
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2646
Header file for the isDefault shim.
Constraint on the data type.
Constraint on the data type.
SymmetricValue(IteratorType pos, MT *matrix, size_t index)
Constructor for the SymmetricValue class.
Definition: SymmetricValue.h:246
Header file for the IsRowMajorMatrix type trait.
void reset() const
Reset the symmetric value to its default initial value.
Definition: SymmetricValue.h:380
#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
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:615
Header file for the IsComplex type trait.
#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
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