Classes | Functions

Classes

class  blaze::ZeroVector< Type, TF >
 Efficient implementation of an arbitrary sized zero vector.The ZeroVector class template is the representation of an immutable, arbitrary sized zero vector with N elements of arbitrary type. The type of the elements and the transpose flag of the vector can be specified via the two template parameters: More...
 

Functions

template<typename VT , bool TF>
ZeroVector< ElementType_t< VT >, TF > blaze::declzero (const Vector< VT, TF > &v)
 Declares the given vector expression v as zero vector. More...
 

ZeroVector operators

template<typename Type , bool TF>
constexpr void blaze::reset (ZeroVector< Type, TF > &v) noexcept
 Resetting the given zero vector. More...
 
template<typename Type , bool TF>
constexpr void blaze::clear (ZeroVector< Type, TF > &v) noexcept
 Clearing the given zero vector. More...
 
template<bool RF, typename Type , bool TF>
constexpr bool blaze::isDefault (const ZeroVector< Type, TF > &v) noexcept
 Returns whether the given zero vector is in default state. More...
 
template<typename Type , bool TF>
constexpr bool blaze::isIntact (const ZeroVector< Type, TF > &v) noexcept
 Returns whether the invariants of the given zero vector are intact. More...
 
template<typename Type , bool TF>
constexpr void blaze::swap (ZeroVector< Type, TF > &a, ZeroVector< Type, TF > &b) noexcept
 Swapping the contents of two zero vectors. More...
 

Detailed Description

Function Documentation

◆ clear()

template<typename Type , bool TF>
constexpr void blaze::clear ( ZeroVector< Type, TF > &  v)
inlinenoexcept

Clearing the given zero vector.

Parameters
vThe zero vector to be cleared.
Returns
void

◆ declzero()

template<typename VT , bool TF>
ZeroVector<ElementType_t<VT>,TF> blaze::declzero ( const Vector< VT, TF > &  v)
inline

Declares the given vector expression v as zero vector.

Parameters
vThe input vector.
Returns
The redeclared vector.

The declzero function declares the given dense or sparse vector expression m as zero vector. The following example demonstrates the use of the declzero function:

// ... Resizing and initialization
b = declzero( a );

◆ isDefault()

template<bool RF, typename Type , bool TF>
constexpr bool blaze::isDefault ( const ZeroVector< Type, TF > &  v)
inlinenoexcept

Returns whether the given zero vector is in default state.

Parameters
vThe zero vector to be tested for its default state.
Returns
true in case the given vector's size is zero, false otherwise.

This function checks whether the zero vector is in default (constructed) state, i.e. if it's size 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( z ) ) { ... }

Optionally, it is possible to switch between strict semantics (blaze::strict) and relaxed semantics (blaze::relaxed):

if( isDefault<relaxed>( z ) ) { ... }

◆ isIntact()

template<typename Type , bool TF>
constexpr bool blaze::isIntact ( const ZeroVector< Type, TF > &  v)
inlinenoexcept

Returns whether the invariants of the given zero vector are intact.

Parameters
vThe zero vector to be tested.
Returns
true in case the given vector's invariants are intact, false otherwise.

This function checks whether the invariants of the zero vector 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( z ) ) { ... }

◆ reset()

template<typename Type , bool TF>
constexpr void blaze::reset ( ZeroVector< Type, TF > &  v)
inlinenoexcept

Resetting the given zero vector.

Parameters
vThe zero vector to be resetted.
Returns
void

◆ swap()

template<typename Type , bool TF>
constexpr void blaze::swap ( ZeroVector< Type, TF > &  a,
ZeroVector< Type, TF > &  b 
)
inlinenoexcept

Swapping the contents of two zero vectors.

Parameters
aThe first zero vector to be swapped.
bThe second zero vector to be swapped.
Returns
void