Blaze 3.9
Classes

Classes

class  blaze::CustomMatrix< Type, AF, PF, SO, Tag, RT >
 Efficient implementation of a customizable matrix. More...
 

CustomMatrix operators

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...
 

Detailed Description

Function Documentation

◆ isDefault()

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)
inline

Returns whether the given custom matrix is in default state.

Parameters
mThe 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:

// ... Resizing and initialization
if( isDefault( A ) ) { ... }
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 ) ) { ... }

◆ isIntact()

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)
inline

Returns whether the invariants of the given custom matrix are intact.

Parameters
mThe custom matrix to be tested.
Returns
true in case the given matrix's invariants are intact, false otherwise.

This function checks whether the invariants of the custom matrix are intact, i.e. if its state is valid. In case the invariants are intact, the function returns true, else it will return false. The following example demonstrates the use of the isIntact() function:

// ... Resizing and initialization
if( isIntact( A ) ) { ... }
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:207

◆ swap()

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 
)
inlinenoexcept

Swapping the contents of two custom matrices.

Parameters
aThe first matrix to be swapped.
bThe second matrix to be swapped.
Returns
void