|
Blaze 3.9
|
Index-value-pair for sparse vectors and matrices. More...
#include <ValueIndexPair.h>
Inherits blaze::SparseElement.
Public Types | |
| using | ValueType = Type |
| The value type of the value-index-pair. | |
| using | IndexType = size_t |
| The index type of the value-index-pair. | |
| using | Reference = Type& |
| Reference return type. | |
| using | ConstReference = const Type& |
| Reference-to-const return type. | |
Public Member Functions | |
| template<typename Other> | |
| constexpr ValueIndexPair< Type > & | operator+= (const Other &v) |
| Addition assignment to the value of the value-index-pair. | |
| template<typename Other> | |
| constexpr ValueIndexPair< Type > & | operator-= (const Other &v) |
| Subtraction assignment to the value of the value-index-pair. | |
| template<typename Other> | |
| constexpr ValueIndexPair< Type > & | operator*= (const Other &v) |
| Multiplication assignment to the value of the value-index-pair. | |
| template<typename Other> | |
| constexpr ValueIndexPair< Type > & | operator/= (const Other &v) |
| Division assignment to the value of the value-index-pair. | |
Constructors | |
| constexpr | ValueIndexPair () |
| Default constructor for value-index-pairs. | |
| constexpr | ValueIndexPair (const Type &v, size_t i) |
| Constructor for a direct initialization of value-index-pairs. | |
| ValueIndexPair (const ValueIndexPair &)=default | |
| ValueIndexPair (ValueIndexPair &&)=default | |
Destructor | |
Assignment operators | |
| ValueIndexPair & | operator= (const ValueIndexPair &)=default |
| ValueIndexPair & | operator= (ValueIndexPair &&)=default |
| template<typename Other> | |
| constexpr auto | operator= (const Other &rhs) -> EnableIf_t< IsSparseElement_v< Other >, ValueIndexPair & > |
| Assignment operator for different value-index-pair types. | |
| template<typename Other> | |
| constexpr auto | operator= (Other &&rhs) -> EnableIf_t< IsSparseElement_v< RemoveReference_t< Other > > &&IsRValueReference_v< Other && >, ValueIndexPair & > |
| Assignment operator for different value-index-pair types. | |
| template<typename Other> | |
| constexpr auto | operator= (const Other &v) -> EnableIf_t< !IsSparseElement_v< Other >, ValueIndexPair & > |
| template<typename Other> | |
| constexpr auto | operator= (Other &&v) -> EnableIf_t< !IsSparseElement_v< RemoveReference_t< Other > > &&IsRValueReference_v< Other && >, ValueIndexPair & > |
| template<typename Other> | |
| constexpr ValueIndexPair & | operator+= (const Other &v) |
| template<typename Other> | |
| constexpr ValueIndexPair & | operator-= (const Other &v) |
| template<typename Other> | |
| constexpr ValueIndexPair & | operator*= (const Other &v) |
| template<typename Other> | |
| constexpr ValueIndexPair & | operator/= (const Other &v) |
Access functions | |
| constexpr Reference | value () noexcept |
| Access to the current value of the value-index-pair. | |
| constexpr ConstReference | value () const noexcept |
| Access to the current value of the value-index-pair. | |
| constexpr IndexType | index () const noexcept |
| Access to the current index of the value-index-pair. | |
Protected Attributes | |
Member variables | |
| Type | value_ |
| Value of the value-index-pair. | |
| size_t | index_ |
| Index of the value-index-pair. | |
Index-value-pair for sparse vectors and matrices.
The ValueIndexPair class represents a single index-value-pair of a sparse vector or sparse matrix.
|
constexpr |
Constructor for a direct initialization of value-index-pairs.
| v | The value of the value-index-pair. |
| i | The index of the value-index-pair. |
|
constexprnoexcept |
Access to the current index of the value-index-pair.
|
constexpr |
Multiplication assignment to the value of the value-index-pair.
| v | The right-hand side value for the multiplication. |
|
constexpr |
Addition assignment to the value of the value-index-pair.
| v | The right-hand side value to be added to the value-index-pair value. |
|
constexpr |
Subtraction assignment to the value of the value-index-pair.
| v | The right-hand side value to be subtracted from the value-index-pair value. |
|
constexpr |
Division assignment to the value of the value-index-pair.
| v | The right-hand side value for the division |
|
constexpr |
Assignment operator for different value-index-pair types.
Assignment to the value of the value-index-pair.
| rhs | Value-index-pair to be copied. |
This assignment operator enables the assignment of other value-index-pair types. The given Other data type qualifies as value-index-pair type in case it provides a value() and an index() member function.
| v | The new value-index-pair value. |
|
constexpr |
Assignment operator for different value-index-pair types.
Assignment to the value of the value-index-pair.
| rhs | Value-index-pair to be moved. |
This assignment operator enables the assignment of other value-index-pair types. The given Other data type qualifies as value-index-pair type in case it provides a value() and an index() member function.
| v | The new value-index-pair value. |
|
constexprnoexcept |
Access to the current value of the value-index-pair.
|
constexprnoexcept |
Access to the current value of the value-index-pair.