On Thu, Sep 3, 2009 at 11:07 AM, Dan Bron<[email protected]> wrote:
> 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')

That's a step in the right direction, but I was hoping for padding to
work more like this:

pad=: adverb define
  adj1=: <.m%2
  adj2=: m-1
  (-@(adj2 + ]) {. (adj1 + ]) {. [) (#m) {. $
)

   5 5 pad i. 3 3
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 1 2 0 0
0 0 3 4 5 0 0
0 0 6 7 8 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

> 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.

I do want them to be homogeneous in shape, but I also want
symmetric treatment of the array bounds, where that is
practical.

Thanks,

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to