[Numpy-discussion] Extracting all the possible combinations of a grid
Charles R Harris
Fri Sep 21 15:33:42 CDT 2007
On 9/21/07, Gael Varoquaux <email@example.com> wrote:
> On Fri, Sep 21, 2007 at 01:52:31PM -0600, Charles R Harris wrote:
> > Go here, http://www.cs.utsa.edu/~wagner/knuth/. I think you want
> > 4A, http://www.cs.utsa.edu/~wagner/knuth/fasc4a.pdf. Some of the
> > from Vol 4 of TAOCP are now in print, http://tinyurl.com/2goxpr.
> :->. That's the best answer I have ever had so far: RTFAOCP !
> OK, I'll have a look, but I'd be surprised he talks about loop free ways.
> Anyhow, I have kludged a solution that seems to be working. Not the most
> beautiful ever, but it seems to be working. I will need to time it, but
> first I need to ask the end user what the actual numbers are.
I was actually excepting numpy (or scipy) to have functions built-in for
> these kind of problems. Or to have people on the list having already done
I wrote up some of the combinatorial algorithms in python a few years ago
for my own use in writing a paper, (*Harris*, C. R. Solution of the aliasing
and least squares problems of spaced antenna interferometric measurements
using lattice methods, Radio Sci. 38, 2003). I even thought I had found an
error and have a letter from Knuth pointing out that I was mistaken ;)
Anyway, there are a lot of neat things in volume 4 and it is well worth the
read. As to putting these things in scipy, I wouldn't mind at all if there
was a cs kit with various trees, union-find (equivalence relation)
structures, indexing, combinatorial generation, and graph algorithms, but I
am not sure how well they would fit in.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion