Boost logo

Ublas :

Subject: Re: [ublas] Slicing
From: Ralf Denzer (Ralf.Denzer_at_[hidden])
Date: 2008-11-21 06:55:27


Dear Markus,

I don't think that such a "\setminus" slice is possible in ublas.
If I understood your question correctly, then you have
to set up (in a loop or so) an

ublas::indirect_array<> relevant(len);

containing the relevant indices, i.e. all those *not* belonging to the slice,
and than use

new_vec = ublas::project(vec, relevant);

to get only the relevant values out of vec.

At least I'm doing something similar in my code ...

Ciao

Ralf

> Hi,
>
> I'd like to take a given vector_expression v and get one that contains
> all the entries in it, but not the ones in a range of indices. The docs
> only describe the opposite case it seems. Is it possible to construct a
> vector-slice in my case?
>
> Thanks in advance,
>
> Markus
_________________________________________________________________________
Sensationsangebot nur bis 30.11: WEB.DE FreeDSL - Telefonanschluss + DSL
für nur 16,37 Euro/mtl.!* http://dsl.web.de/?ac=OM.AD.AD008K13805B7069a