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

Classes

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

SparseSubmatrix operators

template<typename MT , bool SO>
void reset (SparseSubmatrix< MT, SO > &sm)
 Resetting the given sparse submatrix. More...
 
template<typename MT , bool SO>
void clear (SparseSubmatrix< MT, SO > &sm)
 Clearing the given sparse matrix. More...
 
template<typename MT , bool SO>
bool isDefault (const SparseSubmatrix< MT, SO > &sm)
 Returns whether the given sparse submatrix is in default state. More...
 

Detailed Description

Function Documentation

template<typename MT , bool SO>
void clear ( SparseSubmatrix< MT, SO > &  sm)
inlineprivate

Clearing the given sparse matrix.

Parameters
smThe sparse matrix to be cleared.
Returns
void

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

template<typename MT , bool SO>
bool isDefault ( const SparseSubmatrix< MT, SO > &  sm)
inlineprivate

Returns whether the given sparse submatrix is in default state.

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

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

// ... Resizing and initialization
if( isDefault( submatrix( A, 12UL, 13UL, 22UL, 33UL ) ) ) { ... }
template<typename MT , bool SO>
void reset ( SparseSubmatrix< MT, SO > &  sm)
inlineprivate

Resetting the given sparse submatrix.

Parameters
smThe sparse submatrix to be resetted.
Returns
void