Boost logo

Ublas :

Subject: Re: [ublas] Is it possible to construct alternative "views" of vectors and matrices?
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2009-09-17 17:00:07


Mark Johnson schrieb:
> Thanks Jesse for your answer and the code fragment!
>
> Is there a way of building a matrix or vector out of a pre-existing
> array_type? I'd like to be able to view a matrix as a vector, and use
> vector arithmetic on it.
>
> I'd be willing to implement such a thing, but I don't know whether the
> returned object should be a matrix_expression, a matrix_reference or
> whatever, and I don't know what things an object has to define in order
> to be a vector or a matrix. If someone can point me to the appropriate
> documentation that would be great!
>
Please check out the latest version from SVN trunk and have a look into
the experimental folder. The matrix_view.hpp file aleady contains a
class which presents a pair of raw pointer and size as an array. The
class is still under developement, thus any contributions are very welcome.

mfg
Gunter