Boost logo

Ublas :

From: Brian Budge (brian.budge_at_[hidden])
Date: 2006-05-17 10:05:07


Hi Gunter (and others) -

I've been interested for a while now in writing fixed sized matrix and
vector classes in the spirit of the tvmet/blitz libraries, but that
could be used interchangeably with existing ublas matrices and vectors
(when you know the size ahead of time, of course).

Is there anything about how tvmet has implemented their matrix and
vector classes that would be undesirable for a ublas implementation?

Thanks,
  Brian

On 5/17/06, Gunter Winkler <guwi17_at_[hidden]> wrote:
> On Wednesday 17 May 2006 05:26, Dan Elliott wrote:
> > Hello,
> >
> > I fear that my ignorance about that guts of uBLAS will be made glaringly
> > obvious by this question...
>
> so, so ;)
>
> > I see that the lu.hpp file has a data type permutation_matrix which
> > inherits from the vector type. However, I would like to discuss the merits
> > of creating a matrix permutation matrix type that would behave more like a
> > matrix (e.g. matrix operators for right and left had operations).
> > Permutation matrices could even fall under a larger family of
> > transformation matrices!
>
> It would be very convenient to have a transformation matrix that behaves like
> a matrix. But for the simple task of solving linear equations the current
> permutation_matrix is sufficient. The permutation_matrix class does not store
> the mapping (old index) -> (new index) but a list of swap operations needed
> for inplace reordering of vectors (or matrices). Therefore we should keep
> this class - maybe with a better name.
>
> > Operations of other types against this type could have specialized
> > algorithms which take advantage of their particular structure. For
> > example, if T were a permutation matrix, and S were diagonal, the operation
> > transpose(T) * S * T has a predictable structure as it goes from left to
> > right.
>
> This would be a very interesting extension because symmetric products are
> repeatedly requested on this list. I think a new matrix_ternary_expression
> class can cover all products of this type and can be dispatched to
> specialized algorithms. However, I am not sure if this should be part of
> ublas or at a higher level of abstraction (e.g. some glas frontend).
>
> btw. I never used products of 3 matrices except for small (3 by 3 upto 5 by 5)
> matrices. And here we could write a new class for fixed size matrices and
> vectors that removes all unused load from bounded_matrix and bounded_vector.
>
> mfg
> Gunter
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>