Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2008-05-28 17:03:18


Hongzheng Wang schrieb:
> Hi,
>
> I have some questions. Since they may not be related each other, such
> a title is used. I'm sorry for its oversimplification.
>
> First, is there some circular shift operation been defined for
> uBLAS::vector (even matrix)?
This operation is not implemented. An efficient implementation would be
to create a new vector_proxy (similar to vector_range and vector_slice)
that does the index calculation.
> Secondly, what's the purpose of the compose function of basic_range
> and basic_slice? Is it just an internally used helper method, or
> something which the users could reliably use?
>
When you create a range from a range then the resulting type should
simply be a range and not a range_of_range. Thus ranges have to be
"composed". (like the function f(g(x)) is the composition of f and g)

> Thirdly, is there any easy and efficient way to construct
> vector/matrix from other data object, e.g. C array, tr1::array,
> valarray or something else? I think there would be one, but I cannot
> find it yet. I googled array_adaptor, shallow_array_adaptor, and they
> are probably the answer, but I'm not sure.
>
These adaptors are the answer, however the code is still experimental.
This means the documentation is very sparse and the use can lead to
unexpected surprises.

maybe this thread helps:
http://lists.boost.org/MailArchives/ublas/2007/06/2148.php

mfg
Gunter