Raul Miller asked:
> In particular, I would like a mechanism for ;._3 to extend off the
> edges of an array.
I'm not sure what you're asking, but is the following adverb a step in the
right direction?
cfs =: (&>) (@:(<@:[ {.&.> <;.3))
or to be more explicit:
cfs =: 1 : (':';'u&> (<x) {.&.> x <;.3 y')
Of course, this isn't as general as ;.3 but it gives you the ability to
express concepts like:
2 2 < cfs i. 3 3
+---+---+---+
|0 1|1 2|2 0|
|3 4|4 5|5 0|
+---+---+---+
|3 4|4 5|5 0|
|6 7|7 8|8 0|
+---+---+---+
|6 7|7 8|8 0|
|0 0|0 0|0 0|
+---+---+---+
Note that the shards have been filled (cfs stands for "cut filling
shards").
I know you specifically asked about ;._3 and not ;.3 , but as I
interpret your question, you don't neccesarily want to exclude the shards,
but you do want to ensure all the cuboids are homogeneous in shape. Here,
I use a combination of ;.3 (including shards) and {. (overtake) to
achieve that end.
Does that help? If not, would you mind posting some sample inputs & ouputs?
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm