35 #ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_SYMMETRICVALUE_H_ 36 #define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_SYMMETRICVALUE_H_ 114 template<
typename MT >
116 :
public Proxy< SymmetricValue<MT> >
127 template<
typename T >
128 struct BuiltinType {
using Type = INVALID_TYPE; };
136 template<
typename T >
137 struct ComplexType {
using Type =
typename T::value_type; };
147 , ComplexType<RepresentedType>
148 , BuiltinType<RepresentedType> >::Type;
165 template<
typename T >
inline SymmetricValue& operator+=(
const T& value );
166 template<
typename T >
inline SymmetricValue& operator-=(
const T& value );
167 template<
typename T >
inline SymmetricValue& operator*=(
const T& value );
168 template<
typename T >
inline SymmetricValue& operator/=(
const T& value );
175 inline void reset ()
const;
176 inline void clear ()
const;
177 inline void invert()
const;
204 inline
void sync() const;
250 template< typename MT >
273 template<
typename MT >
289 template<
typename MT >
290 template<
typename T >
293 pos_->value() = value;
307 template<
typename MT >
308 template<
typename T >
311 pos_->value() += value;
324 template<
typename MT >
325 template<
typename T >
328 pos_->value() -= value;
341 template<
typename MT >
342 template<
typename T >
345 pos_->value() *= value;
358 template<
typename MT >
359 template<
typename T >
362 pos_->value() /= value;
384 template<
typename MT >
393 const size_t row ( ( IsRowMajorMatrix_v<MT> )?(
pos_->index() ):(
index_ ) );
394 const size_t column( ( IsRowMajorMatrix_v<MT> )?(
index_ ):(
pos_->index() ) );
397 reset( pos2->value() );
410 template<
typename MT >
419 const size_t row ( ( IsRowMajorMatrix_v<MT> )?(
pos_->index() ):(
index_ ) );
420 const size_t column( ( IsRowMajorMatrix_v<MT> )?(
index_ ):(
pos_->index() ) );
423 clear( pos2->value() );
434 template<
typename MT >
443 const size_t row ( ( IsRowMajorMatrix_v<MT> )?(
pos_->index() ):(
index_ ) );
444 const size_t column( ( IsRowMajorMatrix_v<MT> )?(
index_ ):(
pos_->index() ) );
447 pos2->value() =
pos_->value();
458 template<
typename MT >
461 return pos_->value();
471 template<
typename MT >
477 const size_t row ( ( IsRowMajorMatrix_v<MT> )?(
pos_->index() ):(
index_ ) );
478 const size_t column( ( IsRowMajorMatrix_v<MT> )?(
index_ ):(
pos_->index() ) );
498 template<
typename MT >
501 return pos_->value();
522 template<
typename MT >
525 return pos_->value().real();
539 template<
typename MT >
542 pos_->value().real() = value;
556 template<
typename MT >
559 return pos_->value.imag();
573 template<
typename MT >
576 pos_->value().imag( value );
593 template<
typename MT >
596 template<
typename MT >
599 template<
typename MT >
602 template<
bool RF,
typename MT >
605 template<
bool RF,
typename MT >
608 template<
bool RF,
typename MT >
611 template<
bool RF,
typename MT >
614 template<
typename MT >
629 template<
typename MT >
646 template<
typename MT >
661 template<
typename MT >
679 template<
bool RF,
typename MT >
684 return isDefault<RF>( value.
get() );
701 template<
bool RF,
typename MT >
706 return isReal<RF>( value.
get() );
721 template<
bool RF,
typename MT >
726 return isZero<RF>( value.
get() );
741 template<
bool RF,
typename MT >
746 return isOne<RF>( value.
get() );
761 template<
typename MT >
bool isReal(const DiagonalProxy< MT > &proxy)
Returns whether the matrix element represents a real number.
Definition: DiagonalProxy.h:657
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRANSFORMATION_TYPE(T)
Constraint on the data type.In case the given data type T is a transformation expression (i....
Definition: Transformation.h:81
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,...
Definition: Const.h:79
Constraint on the data type.
Header file for auxiliary alias declarations.
typename MT::Iterator IteratorType
Type of the underlying sparse matrix iterators.
Definition: SymmetricValue.h:120
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.
Constraint on the data type.
void sync() const
Synchronization of the current sparse element to the according paired element.
Definition: SymmetricValue.h:472
Header file for basic type definitions.
typename If_t< IsComplex_v< RepresentedType >, ComplexType< RepresentedType >, BuiltinType< RepresentedType > >::Type ValueType
Value type of the represented complex element.
Definition: SymmetricValue.h:148
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
Definition: If.h:109
Proxy base class.The Proxy class is a base class for all proxy classes within the Blaze library that ...
Definition: Forward.h:51
Header file for the isZero shim.
SymmetricValue & operator=(const SymmetricValue &sv)
Copy assignment operator for SymmetricValue.
Definition: SymmetricValue.h:274
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.In case the given data type T is a computational expression (i....
Definition: Computation.h:81
MT * matrix_
The sparse matrix containing the iterator.
Definition: SymmetricValue.h:210
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type,...
Definition: Volatile.h:79
Header file for the invert shim.
Header file for the reset shim.
Constraint on the data type.
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.
IteratorType pos_
Iterator to the current sparse symmetric matrix element.
Definition: SymmetricValue.h:209
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:677
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:779
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.
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:717
#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
RepresentedType get() const noexcept
Access to the represented value.
Definition: SymmetricValue.h:459
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:615
Header file for the isOne shim.
size_t index_
The row/column index of the iterator.
Definition: SymmetricValue.h:211
ElementType_t< MT > RepresentedType
Type of the represented matrix element.
Definition: SymmetricValue.h:143
ValueType value_type
Value type of the represented complex element.
Definition: SymmetricValue.h:150
#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,...
Definition: Symmetric.h:79
Utility type for generic codes.
Constraint on the data type.
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
Representation of two synchronized values within a sparse symmetric matrix.The SymmetricValue class r...
Definition: SymmetricValue.h:115
#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,...
Definition: Reference.h:79
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:697
Header file for the isDefault shim.
Constraint on the data type.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VIEW_TYPE(T)
Constraint on the data type.In case the given data type T is a view type (i.e. a subvector,...
Definition: View.h:81
void clear() const
Clearing the symmetric value.
Definition: SymmetricValue.h:411
void reset() const
Reset the symmetric value to its default initial value.
Definition: SymmetricValue.h:385
void invert() const
In-place inversion of the symmetric value.
Definition: SymmetricValue.h:435
SymmetricValue(IteratorType pos, MT *matrix, size_t index)
Constructor for the SymmetricValue class.
Definition: SymmetricValue.h:251
Header file for the IsRowMajorMatrix type trait.
ValueType real() const
Returns the real part of the represented complex number.
Definition: SymmetricValue.h:523
ValueType imag() const
Returns the imaginary part of the represented complex number.
Definition: SymmetricValue.h:557
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:635
#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,...
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
Header file for the clear shim.