Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2006-12-07 06:08:42


On Thursday 07 December 2006 10:55, Kresimir Fresl wrote:

> > No, this is not implemented yet, but we are looking for someone who does
> > the job.

Someone already did the job.

> Aren't classes vector_indirect<> and matrix_indirect<> (in
> vector_proxy.hpp and matrix_proxy.hpp) what pinacle is looking for?

    // Vector based indirection class
    // Contributed by Toon Knapen.
    // Extended and optimized by Kresimir Fresl.

You should know better ;-) . I never noticed their existence...

ok. I suggest to try this:

ublas::vector<size_t> index_list(3);
index_list = scalar_vector<size_t>(5,1);
ublas::vector<double> vec(1);
vec(0) = 2.0;
ublas::vector<double> x(3);

x = project(vec, index_list);

(x should be (2.0, 2.0, 2.0) )

mfg
Gunter