![]() |
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-value-pair of a sparse vector or sparse matrix. More...
#include <ValueIndexPair.h>
Inherits blaze::SparseElement.
Public Types | |
typedef Type | ValueType |
The value type of the value-index-pair. | |
typedef size_t | IndexType |
The index type of the value-index-pair. | |
typedef Type & | Reference |
Reference return type. | |
typedef const Type & | ConstReference |
Reference-to-const return type. | |
Public Member Functions | |
ValueIndexPair () | |
Default constructor for value-index-pairs. | |
ValueIndexPair (const Type &v, size_t i) | |
Constructor for a direct initialization of value-index-pairs. More... | |
template<typename Other > | |
EnableIf_< IsSparseElement< Other >, ValueIndexPair< Type > & > | operator= (const Other &rhs) |
Assignment operator for different value-index-pair types. More... | |
template<typename Other > | |
DisableIf_< IsSparseElement< Other >, ValueIndexPair< Type > & > | operator= (const Other &v) |
Assignment to the value of the value-index-pair. More... | |
template<typename Other > | |
ValueIndexPair< Type > & | operator+= (const Other &v) |
Addition assignment to the value of the value-index-pair. More... | |
template<typename Other > | |
ValueIndexPair< Type > & | operator-= (const Other &v) |
Subtraction assignment to the value of the value-index-pair. More... | |
template<typename Other > | |
ValueIndexPair< Type > & | operator*= (const Other &v) |
Multiplication assignment to the value of the value-index-pair. More... | |
template<typename Other > | |
ValueIndexPair< Type > & | operator/= (const Other &v) |
Division assignment to the value of the value-index-pair. More... | |
Operators | |
template<typename Other > | |
EnableIf_< IsSparseElement< Other >, ValueIndexPair & > | operator= (const Other &rhs) |
template<typename Other > | |
DisableIf_< IsSparseElement< Other >, ValueIndexPair & > | operator= (const Other &v) |
template<typename Other > | |
ValueIndexPair & | operator+= (const Other &v) |
template<typename Other > | |
ValueIndexPair & | operator-= (const Other &v) |
template<typename Other > | |
ValueIndexPair & | operator*= (const Other &v) |
template<typename Other > | |
ValueIndexPair & | operator/= (const Other &v) |
Access functions | |
Reference | value () |
Access to the current value of the value-index-pair. More... | |
ConstReference | value () const |
Access to the current value of the value-index-pair. More... | |
IndexType | index () const |
Access to the current index of the value-index-pair. More... | |
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.
|
inline |
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. |
|
inline |
Access to the current index of the value-index-pair.
|
inline |
Multiplication assignment to the value of the value-index-pair.
v | The right-hand side value for the multiplication. |
|
inline |
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. |
|
inline |
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. |
|
inline |
Division assignment to the value of the value-index-pair.
v | The right-hand side value for the division |
|
inline |
Assignment operator for different value-index-pair types.
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.
|
inline |
Assignment to the value of the value-index-pair.
v | The new value-index-pair value. |
|
inline |
Access to the current value of the value-index-pair.
|
inline |
Access to the current value of the value-index-pair.