|
template<typename Type , bool TF> |
void | blaze::reset (CompressedVector< Type, TF > &v) |
| Resetting the given compressed vector. More...
|
|
template<typename Type , bool TF> |
void | blaze::clear (CompressedVector< Type, TF > &v) |
| Clearing the given compressed vector. More...
|
|
template<typename Type , bool TF> |
bool | blaze::isDefault (const CompressedVector< Type, TF > &v) |
| Returns whether the given compressed vector is in default state. More...
|
|
template<typename Type , bool TF> |
void | blaze::swap (CompressedVector< Type, TF > &a, CompressedVector< Type, TF > &b) |
| Swapping the contents of two compressed vectors. More...
|
|
template<typename Type , bool TF>
bool blaze::isDefault |
( |
const CompressedVector< Type, TF > & |
v | ) |
|
|
inline |
Returns whether the given compressed vector is in default state.
- Parameters
-
v | The compressed vector to be tested for its default state. |
- Returns
- true in case the given vector is component-wise zero, false otherwise.
This function checks whether the N-dimensional compressed vector is in default state. For instance, in case the vector is instantiated for a built-in integral or floating point data type, the function returns true in case all vector elements are 0 and false in case any vector element is not 0. The following example demonstrates the use of the isDefault function: