On Wed, Sep 2, 2009 at 2:29 PM, Gunter Winkler
<guwi17@gmx.de> wrote:
in ublas the move semantics is partially available:
A.assign_temporary( same type as A )
this is implemented by swapping the internal storage objects.
Awesome.
if B in very large than it is already very expensive to compute inv(B).
In order to optimize this we had to modify the inv() method to return an
expression template instead of acutally computing the result. Then the
computation is deferred until the assignement to A is executed. However
this only helps if we can easily compute the rhs expression element by
element.
Yup. And as you say, that isn't the case here (or in many places where we end up using the bindings...)
> If this pattern is not usable yet, any idea of when it would be?
for inversions of general matrices I see no option except the usual
"decompose" and "solve" strategy which must be coded explicitly.
So let me throw out the following idea: