Boost logo

Ublas :

Subject: Re: [ublas] [bindings] How do I call the new gees? Why is it different from the old one?
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-04-20 03:00:38


Paul Leopardi wrote:

> I may also have a look at using geev, tomorrow, but I'm not hopeful about
> it, since I think I need to allocate left and right matrices for
> eigenvectors, which will not be used anyway.

This shouldn't be necessary (there is a RValue overload available); what
could be the case is that we need something to fulfill the null-object
pattern.

> The old bindings worked a treat. The new ones are a pain (*almost* as
> complicated to call as the original LAPACK routines themselves :-)

I agree the real/imaginary stuff is a pain and shouldn't be present in any
C++ library. I looked it up in the bindings v1, apparently this was done
similar to how you're doing it, by allocating separate arrays. That's
additional memory (allocation) which I am not too fond of, perhaps a
inplace-version using casting and swapping will do the trick. But is this
trivial? E.g., by swapping, transform

R1 R2 R3 R4 I1 I2 I3 I4 into
R1 I1 R2 I2 R3 I3 R4 I4

I will check how we could add more overloads through the generator.

Cheers,

Rutger