maybe not what they were trying to demonstrate. but using 2 d convolution is more elegant
convolve the board (B) with ones(3,3) to get the number of neighbors(N) including the self and resisting an urge to golf, but still it is more elegant for the update rule N-B== 3 | N==3 -- vish 2009/11/16 Gabor Szabo <[email protected]>: > The page was written by Matthew Kenworthy > and it is supposed to be a gentle introduction to PDL threading, > ending with a description of a two line PDL threaded Game of Life: > > http://sourceforge.net/apps/mediawiki/pdl/index.php?title=Introduction_to_PDL_Threading > > This is what we are planning to talk about during the Rehovot.pm > meeting tomorrow. > > http://szabgab.com/blog/2009/11/1257443063.html > > Gabor > _______________________________________________ > Perl mailing list > [email protected] > http://mail.perl.org.il/mailman/listinfo/perl > _______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
