Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-05-24 04:42:16


On Thursday 24 May 2007 05:00, Markus Weimer wrote:
> Hi,
>
> is there a nice way of getting the data inside a dense vector / dense
> matrix as a plain C array without copying it out? I need that to interface
> with code that is written in plain C.

Scan the documentation, the mailing list and the sources for "array_adaptor".
However using external storage is a little tricky and a simple copy is most
time better than complicated access patters ...

Access to the plain storage can always be done by
&(m(0,0)) or &(m.data()[0]) // for dense types

mfg
Gunter