|
Ublas : |
Subject: [ublas] interpreting ublas::vector as a matrix?
From: Oswin Krause (Oswin.Krause_at_[hidden])
Date: 2011-12-08 07:25:47
Hi list,
is there an easy way to interpret the contents of a vector as a matrix?
e.g. like that for a 10 times 10 matrix and a vector with 100 elements:
first row = v(0)...v(9)
second row = v(11)...v(19)
...
nth row = v(90)...v(99)
I would like not to copy the vector into a matrix since the call to new plus
copying of the elements into a matrix could easily exceed the runtime of
the whole function.
Is there maybe an adaptor I could use? Or could I just change a tiny bit
of another adaptor to make this work?
Greetings,
Oswin