Support for more general ranges

gsermaid <[email protected]>
Newsgroups gmane.comp.lib.boost.ublas
Message-ID <[email protected]>
Hi all,

I would like to ask if there is any way to create a vector proxy based on a general range of indices. For example, if I have
a vector

vector<unsigned> x(4);
x <<= 1,2,3,4;

and a vector of indices 

vector<size_t> k(2);
k <<= 0,3;

I would like to be able to create a vector proxy as follows

vector_proxy<unsigned> mysubvector(x, k);

with the property that

mysubvector[i] = x[k[i]].

I know I can create a simple new class which provides this functionality but ideally I also want to have
all the useful iterator functionality and mathematical operations supported by a typical ublas vector. Is this currently supported? If not, is there an easy way to 
implement it and have all the functionality that ublas offer? Finally, do you think something like this could be included in future versions?

Regards,
Giorgos

_______________________________________________
ublas mailing list
[email protected]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.