Hi, I am new to this and am confused by the (sub)matrix operations and also not up on the math nomenclature this group is using such as slices and strides. I am trying a reasonably simple operation of assigning a vector v(2) to a submatrix (3,3). For example, in matlab notation: m = 0 1 2 3 4 5 6 7 8 v = 15 16 m(2, 1:2) = v resulting in: m = 0 1 2 15 16 5 6 7 8 What is the best way to do this with ublas? I suppose I need to convert the vector into another type first, but which one - a slice, a range? I tried both with no success. Thanks a lot, Julian
cerenoc wrote:
I am trying a reasonably simple operation of assigning a vector v(2) to a submatrix (3,3). For example, in matlab notation: m = 0 1 2 3 4 5 6 7 8 v = 15 16
m(2, 1:2) = v
resulting in: m =
0 1 2 15 16 5 6 7 8
What is the best way to do this with ublas? [...]
========================================
#include <iostream>
#include
participants (2)
-
cerenoc
-
Kresimir Fresl