Vector Types

Table of Contents

Previous: Getting Started     Next: Vector Operations


The Blaze library currently offers three dense vector types (StaticVector, DynamicVector and HybridVector) and one sparse vector type (CompressedVector). All vectors can be specified as either column vectors

$\left(\begin{array}{*{1}{c}} 1 \\ 2 \\ 3 \\ \end{array}\right)$

or row vectors

$\left(\begin{array}{*{3}{c}} 1 & 2 & 3 \\ \end{array}\right).$

Per default, all vectors in Blaze are column vectors.


StaticVector


The blaze::StaticVector class template is the representation of a fixed-size vector with statically allocated elements of arbitrary type. It can be included via the header file

The type of the elements, the number of elements, and the transpose flag of the vector can be specified via the three template parameters:

template< typename Type, size_t N, bool TF >
class StaticVector;


DynamicVector


The blaze::DynamicVector class template is the representation of an arbitrary sized vector with dynamically allocated elements of arbitrary type. It can be included via the header file

The type of the elements and the transpose flag of the vector can be specified via the two template parameters:

template< typename Type, bool TF >
class DynamicVector;


HybridVector


The blaze::HybridVector class template combines the advantages of the blaze::StaticVector and the blaze::DynamicVector class templates. It represents a fixed-size vector with statically allocated elements, but still can be dynamically resized (within the bounds of the available memory). It can be included via the header file

The type of the elements, the number of elements, and the transpose flag of the vector can be specified via the three template parameters:

template< typename Type, size_t N, bool TF >
class HybridVector;


CompressedVector


The blaze::CompressedVector class is the representation of an arbitrarily sized sparse vector, which stores only non-zero elements of arbitrary type. It can be included via the header file

The type of the elements and the transpose flag of the vector can be specified via the two template parameters:

template< typename Type, bool TF >
class CompressedVector;


Previous: Getting Started     Next: Vector Operations