From: Dima Sorkin (dsorkin_at_[hidden])
Date: 2007-08-28 04:12:12
"carray_adaptor" was for some time in ublas (I think it was in boost 1.32),
then it was removed.
Consistent definitions for such an adaptor were not found, despite
considerable amount of effort spent on this -
as generally ublas algorithms assume "deep copy" of matrices, there
was always some corner case where such adaptor "breaks" and it's data is
copied. There was huge amount of discussions on this theme in this list,
try to search.
Meanwhile, an older and undocumented adaptor -
"shallow_array_adaptor", can serve you in most cases (but it has
pitfalls too, see discussions in this list, I think month ago).
I use it heavily in my code and it works. Don't forget to define a
BOOST_UBLAS_SHALLOW_ARRAY_ADAPTOR macro before including any ublas
header. It's code is in "storage.hpp", and it is pretty simple.
Quoting Michele De Stefano <micdestefano_at_[hidden]>:
> Into the official documentation of the uBLAS library there is a chapter with
> the title "Array Adaptor" (under "Storage and special containers").
> Into the documentation is explained that there exist a class whose name is
> I've tried to compile the given example but it does not compile because,
> apparently, the carray_adaptor class does not exist !!!
> That class seemed to be the right way to wrap a Boost vector upon an
> ordinary buffer of values (without doing any copy between the buffer
> and the vector).
> Did any of you experienced the same problem ?
> Have you ever found the "carray_adaptor" class ?
> Thank to all of you.