Yes, this is similar. However for shape 1800 1800,
it takes about 270Mb of RAM and a few seconds

   CONTIG 300#300#"1 ...

I was thinking maybe a specific version would be
faster and leaner? E.g. because it is and if it stays
boolean it might get optimal treatment by special code.


--- "R.E. Boss" <[EMAIL PROTECTED]> wrote:

> Is this (a more general solution of) what you mean?
> 
>    CONTIG "."0;._2 '111111 100101 100101 100011 101001 111111 '
> 1 1 1 1 1 1
> 1 3 3 1 5 1
> 1 3 3 1 5 1
> 1 3 3 3 1 1
> 1 3 1 3 3 1
> 1 1 1 1 1 1
> 
> See http://www.jsoftware.com/pipermail/general/2005-August/023910.html
> 
> R.E. Boss
> 
> 
> 
> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Namens Oleg Kobchenko
> Verzonden: dinsdag 1 mei 2007 9:15
> Aan: Programming forum
> Onderwerp: [Jprogramming] A mazing grace
> 
> This is probably a standard path-finding
> algorithm, and possibly already implemented in J.
> 
> Given a boolean matrix, as shown in the first output, 
> and an index with 0, e.g. (<1 1); return 1s for all 0s 
> reachable with rectangular paths.
> 
>    "."0;._2 '111111 100101 100101 100011 101001 111111 '
> 1 1 1 1 1 1
> 1 0 0 1 0 1
> 1 0 0 1 0 1
> 1 0 0 0 1 1
> 1 0 1 0 0 1
> 1 1 1 1 1 1
>    "."0;._2 '000000 011000 011000 011100 010110 000000 '
> 0 0 0 0 0 0
> 0 1 1 0 0 0
> 0 1 1 0 0 0
> 0 1 1 1 0 0
> 0 1 0 1 1 0
> 0 0 0 0 0 0



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to