All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
blaze::SparseElement< Type > Class Template Reference

Index-value-pair for the sparse vectors and matrices.The SparseElement class represents a single index-value-pair of a sparse vector or sparse matrix. More...

#include <SparseElement.h>

Public Types

typedef Type ValueType
 The value type of the sparse element.
 
typedef size_t IndexType
 The index type of the sparse element.
 

Public Member Functions

 SparseElement ()
 Default constructor for sparse elements.
 
 SparseElement (const Type &v, size_t i)
 Constructor for a direct initialization of sparse elements. More...
 
template<typename Other >
SparseElement< Type > & operator= (const SparseElement< Other > &rhs)
 Assignment operator for different SparseElement instances. More...
 
Operators
template<typename Other >
SparseElementoperator= (const SparseElement< Other > &rhs)
 
SparseElementoperator= (const Type &v)
 Assignment to the value of the sparse element. More...
 
SparseElementoperator+= (const Type &v)
 Addition assignment to the value of the sparse element. More...
 
SparseElementoperator-= (const Type &v)
 Subtraction assignment to the value of the sparse element. More...
 
SparseElementoperator*= (const Type &v)
 Multiplication assignment to the value of the sparse element. More...
 
SparseElementoperator/= (const Type &v)
 Division assignment to the value of the sparse element. More...
 
Access functions
Type & value ()
 Access to the current value of the sparse element. More...
 
const Type & value () const
 Access to the current value of the sparse element. More...
 
size_t index () const
 Access to the current index of the sparse element. More...
 

Protected Attributes

Member variables
Type value_
 Value of the sparse element.
 
size_t index_
 Index of the sparse element.
 

Detailed Description

template<typename Type>
class blaze::SparseElement< Type >

Index-value-pair for the sparse vectors and matrices.

The SparseElement class represents a single index-value-pair of a sparse vector or sparse matrix.

Constructor & Destructor Documentation

template<typename Type >
blaze::SparseElement< Type >::SparseElement ( const Type &  v,
size_t  i 
)
inline

Constructor for a direct initialization of sparse elements.

Parameters
vThe value of the sparse element.
iThe index of the sparse element.

Member Function Documentation

template<typename Type >
size_t blaze::SparseElement< Type >::index ( ) const
inline

Access to the current index of the sparse element.

Returns
The current index of the sparse element.
template<typename Type >
SparseElement< Type > & blaze::SparseElement< Type >::operator*= ( const Type &  v)
inline

Multiplication assignment to the value of the sparse element.

Parameters
vThe right-hand side value for the multiplication.
Returns
Reference to the assigned sparse element.
template<typename Type >
SparseElement< Type > & blaze::SparseElement< Type >::operator+= ( const Type &  v)
inline

Addition assignment to the value of the sparse element.

Parameters
vThe right-hand side value to be added to the sparse element value.
Returns
Reference to the assigned sparse element.
template<typename Type >
SparseElement< Type > & blaze::SparseElement< Type >::operator-= ( const Type &  v)
inline

Subtraction assignment to the value of the sparse element.

Parameters
vThe right-hand side value to be subtracted from the sparse element value.
Returns
Reference to the assigned sparse element.
template<typename Type >
SparseElement< Type > & blaze::SparseElement< Type >::operator/= ( const Type &  v)
inline

Division assignment to the value of the sparse element.

Parameters
vThe right-hand side value for the division
Returns
Reference to the assigned sparse element.
template<typename Type >
SparseElement< Type > & blaze::SparseElement< Type >::operator= ( const Type &  v)
inline

Assignment to the value of the sparse element.

Parameters
vThe new sparse element value.
Returns
Reference to the assigned sparse element.
template<typename Type>
template<typename Other >
SparseElement<Type>& blaze::SparseElement< Type >::operator= ( const SparseElement< Other > &  rhs)
inline

Assignment operator for different SparseElement instances.

Parameters
rhsSparse element to be copied.
Returns
Reference to the assigned sparse element.
template<typename Type >
Type & blaze::SparseElement< Type >::value ( )
inline

Access to the current value of the sparse element.

Returns
The current value of the sparse element.
template<typename Type >
const Type & blaze::SparseElement< Type >::value ( ) const
inline

Access to the current value of the sparse element.

Returns
The current value of the sparse element.

The documentation for this class was generated from the following file: