Vectors

Table of Contents


General Concepts


The Blaze library currently offers four dense vector types (StaticVector, DynamicVector, HybridVector, and CustomVector) and one sparse vector type (CompressedVector). 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 };

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 );


Previous: Getting Started     Next: Vector Types