Blaze 3.9
Loading...
Searching...
No Matches
Vectors


General Concepts


The Blaze library currently offers five dense vector types (StaticVector, DynamicVector, HybridVector, CustomVector, and UniformVector) and two sparse vector types (CompressedVector and ZeroVector). All vectors can be specified as either column vectors or row vectors:

// Setup of the 3-dimensional dense column vector
//
// ( 1 )
// ( 2 )
// ( 3 )
//
DynamicVector<int,columnVector> a{ 1, 2, 3 };
// Setup of the 3-dimensional dense row vector
//
// ( 4 5 6 )
//
DynamicVector<int,rowVector> b{ 4, 5, 6 };
Efficient implementation of an arbitrary sized vector.
Definition DynamicVector.h:223
constexpr bool columnVector
Transpose flag for column vectors.
Definition TransposeFlag.h:58
constexpr bool rowVector
Transpose flag for row vectors.
Definition TransposeFlag.h:73

Per default, all vectors in Blaze are column vectors:

// Instantiation of a 3-dimensional column vector


Vector Details



Examples


StaticVector<int,6UL> a; // Instantiation of a 6-dimensional static column vector
CompressedVector<int,rowVector> b; // Instantiation of a compressed row vector
DynamicVector<int,columnVector> c; // Instantiation of a dynamic column vector
// ... Resizing and initialization
c = a + trans( b );
Efficient implementation of an arbitrary sized sparse vector.
Definition CompressedVector.h:220
Efficient implementation of a fixed-sized vector.
Definition StaticVector.h:230


Previous: Getting Started     Next: Vector Types