[Numpy-discussion] Extracting all the possible combinations of a grid
Charles R Harris
charlesr.harris@gmail....
Fri Sep 21 15:33:42 CDT 2007
On 9/21/07, Gael Varoquaux <gael.varoquaux@normalesup.org> 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
> fascicle
> > 4A, http://www.cs.utsa.edu/~wagner/knuth/fasc4a.pdf. Some of the
> fascicles
> > 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.
<snip>
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
> this.
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.
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070921/f5eccb39/attachment-0001.html
More information about the Numpy-discussion
mailing list