@matan you copy! them to the subvectors of your matrix
but you also can read them directly into the matrix using entry!
might be native-float, but also cublas-float, or clblast-float, or whatever else you implement
row gets the raw access to the memory of the row elements of the matrix. then you can use copy! or entry! to set those elements. alter! is when you change those elements by applying a function to the old values.
in a general, I think that multiplication with a sparse matrix for the setup of its elements would be extremely ineficient.
I usually set up elements using entry!, or If my data is in another structure (seqs, clojure vectors, etc.) by providing them as constructor argument(s). Most of the time I am not setting elements explicitly, but by applying linear algebra operations, or calling functions that work with the whole structure in bulk.
if you just want to initialize all elements to one constant value, use something like (entry! m 1.0)
.
and yes, if you already have a matrix and need to transfer data to it, use transfer!
if there is not an implementation to transfer from/to the particular structure you have, write a specialized implementation of transfer! for it