Boost logo

Ublas :

Subject: Re: [ublas] [bindings] How do I call the new gees? Why is it different from the old one?
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2010-11-21 10:50:28


The method described in the paper seems reasonable simple, but I decided to implement the "straightforward" recursive method with O(n) time and O(log(n)) (stack) space first. The attached file contains both a non-optimized implementation (which takes O(nlog(n)) time due to missing optimizations, but makes it obvious how the method works in principle), and an optimized implementation. As the O(log(n)) (stack) space is normally not considered a drawback for quicksort, I think this implementation should be good enough for our purposes. However, I may still implement the method from the paper one day in the distant future, and benchmark both methods against each other. But before I do this, I will first try to update geev and gees to offer functionality similar to what was available in bindings-v1, with the main difference being that explicit memory allocation is avoided.

Regards,
Thomas
________________________________________
From: ublas-bounces_at_[hidden] [ublas-bounces_at_[hidden]] On Behalf Of Rutger ter Borg [rutger_at_[hidden]]
Sent: Monday, July 26, 2010 9:00 AM
To: ublas_at_[hidden]
Subject: Re: [ublas] [bindings] How do I call the new gees? Why is it different from the old one?

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

http://stackoverflow.com/questions/1777901/array-interleaving-problem

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.

Cheers,

Rutger