Boost logo

Boost :

From: boost (boost_at_[hidden])
Date: 2002-06-28 03:06:18


Salut,

On Thursday 27 June 2002 22:54, Joerg Walter wrote:
> These member functions have been added recently and should be documented at
> least in the 'Interface' section. We'll document them fully later.

Nice, thank you.

> > 2) I still think that swapping of matrices of different sizes should be
> > allowed. In my opinion it would be fine if matrix_ranges or slices
> > of a swapped matrix are just undefined.
>
> I'm unsure, whether it's worth it to relax the size conformance checks
> right in this case. I'd like to hear other opinions.

I've remoced the checks in my ublas version without problems.
I just want don't want to pay for the extra copy after calculating
a matrix product, e.g. with P rectangular

 A = P * QM;C = ... Q; Q= A; can be discarded now; return;

so I calculate

 A = P * QM;C = ... Q; Q.swap(A); A can be discarded now; return;

Is there a better way to do this within ublas without using swap ?

Of course, I can use pointers of matrices, e.g. smart pointers, but that's
unnecessary complicated. ( BTW, that the way I currently handle my
matrix_range problem mentioned before. I have to switch to .reset(..) now.)

Best wishes,
Peter


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk