home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / language / j32.sit / j.rsrc / TEXT_1202_;..txt < prev    next >
Text File  |  1991-06-13  |  2KB  |  56 lines

  1. u;.n  (Conjunction)
  2.  
  3. CUT (_)  The phrase u;. 1 y applies u to each of a set of intervals of items of y  to produce the items of the result. Each interval begins at an occurrence of the delimiter 0{y. For example, if s=. 5 3:
  4.  
  5.       <;.1 y=.' worlds on worlds'
  6. +-------+---+-------+
  7. | worlds| on| worlds|
  8. +-------+---+-------+
  9.   $;.1 y        s$i.9     +/;.1 s$i.9
  10. 7               0 1 2        9 12 15
  11. 3               3 4 5        3  5  7
  12. 7               6 7 8
  13.                 0 1 2
  14.                 3 4 5
  15.  
  16. The phrase u;._1 y differs only in that the delimiters are excluded from the intervals. In u;.2 and u;._2 the delimiter is the last item, and marks the ends of intervals.
  17.  
  18. The phrase u;.0 y applies u to y after reversing y along each axis, and is equivalent to (0 _1 */$y) u;.0 y.
  19.  
  20. The monads u;.3 and u;._3 apply u to tessellation by "maximal cubes", that is, they are defined by their dyadic cases using the left argument  ($$y)$<./$y.
  21.  
  22. CUT (_ _)  The dyads u;.1 and u;._1 and u;.2 and u;._2 differ from the monads in that the intervals are delimited by the ones in  the boolean  argument x. Thus:
  23.  
  24.    x=. 0 1 0 0 1 [ y=. i. 5 3
  25.    y             x+/;.1 y     x+/;.2 y
  26.  0  1  2      18 21 24      3  5  7
  27.  3  4  5      12 13 14     27 30 33
  28.  6  7  8
  29.  9 10 11
  30. 12 13 14
  31.  
  32. The phrase x u;.0 y applies u to a rectangle or cuboid of y with one vertex at the point in y indexed by v=.0{x, and with the opposite vertex determined as follows: the dimension is |1{x, but the rectangle extends back from v along any axis for which the index k{v is negative. Finally, the order of the selected elements is reversed along each axis k for which k{1{x is negative. For example:
  33.       (1 _2,:_2 3)+;.0 i. 4 5 
  34. 11 12 13 
  35. 6   7  8
  36.  
  37. The cases u;.3 and u;._3 provide (possibly overlapping) tessellations. The phrase x u;._3 y applies u to each complete rectangle of size |1{x obtained by beginning at all positions obtained as integer multiples of (each element of) the movement vector 0{x. As in u;.0, reversal of each piece occurs along an axis for which the dimension 1{x is negative.
  38.  
  39. The degenerate case of a list x is equivalent to the left argument 1,:x, and therefore provides a complete tessellation of size x.
  40.  
  41. The case u;.3 differs from u;._3 only in that any shards of sizes less than |1{x are included. For example:
  42.  
  43.       y
  44. abcdef
  45. ghijkl
  46. mnopqr
  47. stuvwx
  48. yzABCD
  49.    (3 2;2 3)<;.3 y
  50. +---+---+--+
  51. |abc|cde|ef|   
  52. |ghi|ijk|kl|
  53. +---+---+--+
  54. |stu|uvw|wx|
  55. |yzA|ABC|CD|
  56. +---+---+--+