|
template<RelaxationFlag RF, typename Type , AlignmentFlag AF, PaddingFlag PF, bool SO, typename Tag , typename RT > |
bool | blaze::isDefault (const CustomMatrix< Type, AF, PF, SO, Tag, RT > &m) |
| Returns whether the given custom matrix is in default state. More...
|
|
template<typename Type , AlignmentFlag AF, PaddingFlag PF, bool SO, typename Tag , typename RT > |
bool | blaze::isIntact (const CustomMatrix< Type, AF, PF, SO, Tag, RT > &m) |
| Returns whether the invariants of the given custom matrix are intact. More...
|
|
template<typename Type , AlignmentFlag AF, PaddingFlag PF, bool SO, typename Tag , typename RT > |
void | blaze::swap (CustomMatrix< Type, AF, PF, SO, Tag, RT > &a, CustomMatrix< Type, AF, PF, SO, Tag, RT > &b) noexcept |
| Swapping the contents of two custom matrices. More...
|
|
bool blaze::isDefault |
( |
const CustomMatrix< Type, AF, PF, SO, Tag, RT > & |
m | ) |
|
|
inline |
Returns whether the given custom matrix is in default state.
- Parameters
-
m | The matrix to be tested for its default state. |
- Returns
- true in case the given matrix's rows and columns are zero, false otherwise.
This function checks whether the custom matrix is in default (constructed) state, i.e. if it's number of rows and columns is 0. In case it is in default state, the function returns true, else it will return false. The following example demonstrates the use of the isDefault() function:
Efficient implementation of a customizable matrix.
Definition: CustomMatrix.h:423
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition: DiagonalMatrix.h:169
@ padded
Flag for padded vectors and matrices.
Definition: PaddingFlag.h:79
@ aligned
Flag for aligned vectors and matrices.
Definition: AlignmentFlag.h:65
Optionally, it is possible to switch between strict semantics (blaze::strict) and relaxed semantics (blaze::relaxed):
if( isDefault<relaxed>( A ) ) { ... }