Returns whether the given lower matrix is in default state.
- Parameters
-
m | The lower matrix to be tested for its default state. |
- Returns
- true in case the given matrix is component-wise zero, false otherwise.
This function checks whether the matrix is in default state. For instance, in case the matrix is instantiated for a built-in integral or floating point data type, the function returns true in case all matrix elements are 0 and false in case any matrix element is not 0. The following example demonstrates the use of the isDefault function:
Efficient implementation of a dynamic matrix.
Definition: DynamicMatrix.h:242
Matrix adapter for lower triangular matrices.
Definition: BaseTemplate.h:558
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition: DiagonalMatrix.h:169
Optionally, it is possible to switch between strict semantics (blaze::strict) and relaxed semantics (blaze::relaxed):
if( isDefault<relaxed>( A ) ) { ... }