Boost logo

Ublas :

Subject: Re: [ublas] Matrix view over a bunch of ublas::vector's
From: Jesse Manning (manning.jesse_at_[hidden])
Date: 2010-06-24 08:40:54


I'm not sure the exact layout of your code but as an alternative you could
store your vectors as a matrix instead of individual vectors. This will
allow you to work on the matrix as a whole easily and you could use
matrix_row/matrix_column view classes to operate on the individual vectors
inside the matrix when needed since both of these implement the
vector_expression concept. This is essentially what I am doing in one of my
projects and it seems to work well.

On Thu, Jun 24, 2010 at 8:05 AM, David Bellot <david.bellot_at_[hidden]>wrote:

> in the SVN repository there is an experimental assignment feature recently
> contributed by one of our contributors. You might want to have a look at it
> first. I hope to include into the next version.
>
> On Thu, Jun 24, 2010 at 13:21, <dariomt_at_[hidden]> wrote:
>
>> Hi list,
>>
>> Suppose I have an algorithm that works over a matrix expression.
>>
>> I also have a bunch of M ublas::vector's all of size N, each representing
>> a row of a matrix.
>>
>> Is it possible to create a 'view' over those vectors to pass it to the
>> algo as a MxN matrix expression?
>>
>> In this context a 'view' means that I don't need to copy the data in the
>> vectors into a ublas::matrix
>>
>> Also N >> M, both determined at runtime (i.e. N and M are not compile time
>> constants).
>>
>> Thanks!
>>
>>
>> _______________________________________________
>> ublas mailing list
>> ublas_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/ublas
>> Sent to: david.bellot_at_[hidden]
>>
>
>
>
> --
> David Bellot, PhD
> david.bellot_at_[hidden]
> http://david.bellot.free.fr
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: manning.jesse_at_[hidden]
>