Boost logo

Ublas :

From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2007-03-18 12:32:43

Kresimir Fresl wrote:

>Karl Meerbergen wrote:
>>What I should have said: size1() and size2() of the ublas::matrix, not
>>functor_type. size1() and size2() do no longer exist in functor_type, so
>>that is why they had to be changed into size_m.
>>What I meant is that we can implement the bindings using size1() and
>>size() of ublas::matrix(), which makes the bindings independent of ublas
>Sorry, I misunderstood you.
>And I must admit that I do not remember why original design used that
>somewhat roundabout way with functor_type::size2(). As far as I can
>remember, it was Joerg Walter's suggestion (and he had some reasons :o).
>ublas mailing list

I guess the reason is that the leading dimension is always given by
size2() independent of the orientation. For ublas::matrix, the leading
dimension is size1() for a column_major and size2() for a row_major one.

So, we could create an orientation functor_type in the bindings that
does the same thing, if you see what I mean.
We could do this with the struct ublas_ordering which is in