All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes
Sparse Subvector

Classes

class  blaze::SparseSubvector< typename, bool, bool >
 View on a specific subvector of a sparse vector.The SparseSubvector template represents a view on a specific subvector of a sparse vector primitive. The type of the sparse vector is specified via the first template parameter: More...
 

SparseSubvector operators

template<typename VT , bool AF, bool TF>
void blaze::reset (SparseSubvector< VT, AF, TF > &sv)
 Resetting the given sparse subvector. More...
 
template<typename VT , bool AF, bool TF>
void blaze::clear (SparseSubvector< VT, AF, TF > &sv)
 Clearing the given sparse subvector. More...
 
template<typename VT , bool AF, bool TF>
bool blaze::isDefault (const SparseSubvector< VT, AF, TF > &sv)
 Returns whether the given sparse subvector is in default state. More...
 

Detailed Description

Function Documentation

template<typename VT , bool AF, bool TF>
void blaze::clear ( SparseSubvector< VT, AF, TF > &  sv)
inline

Clearing the given sparse subvector.

Parameters
svThe sparse subvector to be cleared.
Returns
void

Clearing a sparse subvector is equivalent to resetting it via the reset() function.

template<typename VT , bool AF, bool TF>
bool blaze::isDefault ( const SparseSubvector< VT, AF, TF > &  sv)
inline

Returns whether the given sparse subvector is in default state.

Parameters
svThe sparse subvector to be tested for its default state.
Returns
true in case the given subvector is component-wise zero, false otherwise.

This function checks whether the sparse subvector is in default state. For instance, in case the subvector is instantiated for a vector of built-in integral or floating point data type, the function returns true in case all subvector elements are 0 and false in case any element is not 0. The following example demonstrates the use of the isDefault function:

// ... Resizing and initialization
if( isDefault( subvector( v, 10UL, 20UL ) ) ) { ... }
template<typename VT , bool AF, bool TF>
void blaze::reset ( SparseSubvector< VT, AF, TF > &  sv)
inline

Resetting the given sparse subvector.

Parameters
svThe sparse subvector to be resetted.
Returns
void