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-07-26 03:00:42
Rutger ter Borg wrote:
> 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.
Just to keep the stuff going, this looks like a good pointer
apparently it can be done in O(n) time and O(1) space. This cost will taken
twice (on entry and on exit) to support arrays of C++ complex types.