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