Classes | Enumerations
DenseRow

Classes

class  blaze::DenseRow< MT, SO, SF >
 Reference to a specific row of a dense matrix.The DenseRow template represents a reference to a specific row of a dense matrix primitive. The type of the dense matrix is specified via the first template parameter: More...
 

Enumerations

enum  { useConst = IsConst<MT>::value }
 Compilation switch for the non-const reference and iterator types. More...
 
enum  { vectorizable = MT::vectorizable }
 Compilation switch for the expression template evaluation strategy.
 
enum  { smpAssignable = MT::smpAssignable }
 Compilation switch for the expression template assignment strategy.
 

DenseRow operators

template<typename MT , bool SO, bool SF>
void blaze::reset (DenseRow< MT, SO, SF > &row)
 Resetting the given dense row. More...
 
template<typename MT , bool SO, bool SF>
void blaze::clear (DenseRow< MT, SO, SF > &row)
 Clearing the given dense row. More...
 
template<typename MT , bool SO, bool SF>
bool blaze::isDefault (const DenseRow< MT, SO, SF > &row)
 Returns whether the given dense row is in default state. More...
 
template<typename MT , bool SO, bool SF>
bool blaze::isSame (const DenseRow< MT, SO, SF > &a, const DenseRow< MT, SO, SF > &b)
 Returns whether the two given dense rows represent the same observable state. More...
 

Detailed Description

Enumeration Type Documentation

template<typename MT, bool SO = IsRowMajorMatrix<MT>::value, bool SF = IsSymmetric<MT>::value>
anonymous enum
private

Compilation switch for the non-const reference and iterator types.

The useConst compile time constant expression represents a compilation switch for the non-const reference and iterator types. In case the given dense matrix of type MT is const qualified, useConst will be set to 1 and the dense row will return references and iterators to const. Otherwise useConst will be set to 0 and the dense row will offer write access to the dense matrix elements both via the subscript operator and iterators.

Function Documentation

template<typename MT , bool SO, bool SF>
void blaze::clear ( DenseRow< MT, SO, SF > &  row)
inline

Clearing the given dense row.

Parameters
rowThe dense row to be cleared.
Returns
void

Clearing a dense row is equivalent to resetting it via the reset() function.

template<typename MT , bool SO, bool SF>
bool blaze::isDefault ( const DenseRow< MT, SO, SF > &  row)
inline

Returns whether the given dense row is in default state.

Parameters
rowThe dense row to be tested for its default state.
Returns
true in case the given dense row is component-wise zero, false otherwise.

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

// ... Resizing and initialization
if( isDefault( row( A, 0UL ) ) ) { ... }
template<typename MT , bool SO, bool SF>
bool blaze::isSame ( const DenseRow< MT, SO, SF > &  a,
const DenseRow< MT, SO, SF > &  b 
)
inline

Returns whether the two given dense rows represent the same observable state.

Parameters
aThe first dense row to be tested for its state.
bThe second dense row to be tested for its state.
Returns
true in case the two rows share a state, false otherwise.

This overload of the isSame function tests if the two given dense rows refer to exactly the same range of the same dense matrix. In case both rows represent the same observable state, the function returns true, otherwise it returns false.

template<typename MT , bool SO, bool SF>
void blaze::reset ( DenseRow< MT, SO, SF > &  row)
inline

Resetting the given dense row.

Parameters
rowThe dense row to be resetted.
Returns
void