All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 Member Functions

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

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 >
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 >
SparseElement< Type > & blaze::SparseElement< Type >::operator= ( const Type &  v)
inline

Assignment operator for the value of the sparse element.

Parameters
vThe new sparse element value.
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: