![]() |
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
or row vectors
Per default, all vectors in Blaze are column vectors.
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:
Type:
specifies the type of the vector elements. StaticVector can be used with any non-cv-qualified, non-reference, non-pointer element type.N
: specifies the total number of vector elements. It is expected that StaticVector is only used for tiny and small vectors.TF
: specifies whether the vector is a row vector (blaze::rowVector
) or a column vector (blaze::columnVector
). The default value is blaze::columnVector
.
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:
Type:
specifies the type of the vector elements. DynamicVector can be used with any non-cv-qualified, non-reference, non-pointer element type.TF
: specifies whether the vector is a row vector (blaze::rowVector
) or a column vector (blaze::columnVector
). The default value is blaze::columnVector
.
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:
Type:
specifies the type of the vector elements. HybridVector can be used with any non-cv-qualified, non-reference, non-pointer element type.N
: specifies the maximum number of vector elements. It is expected that HybridVector is only used for tiny and small vectors.TF
: specifies whether the vector is a row vector (blaze::rowVector
) or a column vector (blaze::columnVector
). The default value is blaze::columnVector
.
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:
Type:
specifies the type of the vector elements. CompressedVector can be used with any non-cv-qualified, non-reference, non-pointer element type.TF
: specifies whether the vector is a row vector (blaze::rowVector
) or a column vector (blaze::columnVector
). The default value is blaze::columnVector
.