Blaze  3.6
Vector/Vector Division


Componentwise Division


Dividing a vector by a dense vector with the same transpose flag (i.e. either blaze::columnVector or blaze::rowVector) via the division operator results in a componentwise division:

CompressedVector<int,columnVector> v1( 17UL );
DynamicVector<int,columnVector> v2( 17UL );
StaticVector<double,10UL,rowVector> v3;
DynamicVector<double,rowVector> v4( 10UL );
// ... Initialization of the vectors
CompressedVector<int,columnVector> v5( v1 / v2 ); // Componentwise division of a sparse and a
// dense column vector. The result is a sparse
// column vector.
DynamicVector<double,rowVector> v6( v3 / v4 ); // Componentwise division of two dense row
// vectors. The result is a dense row vector.

Note that all values of the divisor must be non-zero and that no checks are performed to assert this precondition!


Previous: Vector/Vector Multiplication     Next: Matrix/Vector Multiplication