(<:2 1 3 4) { 2 1 0 3
1 2 0 3
   want-:filters 1 2 0 3&|:@(;"2/ cntrl&(];._3))"3 2 image
1

Thanks,

-- 
Raul

On Tue, May 21, 2019 at 9:51 AM Brian Schott <schott.br...@gmail.com> wrote:
>
> Raul,
> Your trick using echo is neat.
> But, more than that, your further development which I have named go(t),
> in contrast to the desired version which I have named wa(nt),
> is very clever.
> It turns out that a reshape of go produces an identical result to the
> desired result,
> as demonstrated below. But mostly a guess produced the reshape, and I
> cannot generalize upon it. Does it give you any ideas?
>
>    tesl =: ;._3
>    link =: ;
>    cntrl =: 1 1,:2 2
>    filters =: 10+i.3 2 2 2
>    image =: 3 3 3$'abcdefghi','ABCDEFGHI',|.'abcdefghi'
>
>    wa =: (4 : 'cntrl x&(link"2) tesl y')"3 2
>    go =: 2 1 0 3&|:@(;"2/ cntrl&(];._3))"3 2
>    filters((0  2 1 3  4&|:@:go)-: wa)image      NB. here's the proof
> 1
>
> And, yes, your results do help a lot.
> Thanks,
>
>
> On Tue, May 21, 2019 at 6:49 AM Raul Miller <rauldmil...@gmail.com> wrote:
>
> > Yes... in other words, the tacit expression you want can be hinted at this
> > way:
> >
> >       $(cntrl filters&(link"2) tesl ])"3 2 image
> > 3 2 2 3 2 2
> >       $filters (cntrl [&(link"2) tesl ])"3 2 image
> > 3 2 2 4
> >
> > But of course neither work right. The first fails because filters is
> > the wrong value. The second fails because the grammar is wrong.
> >
> > To help see that filters is the wrong value for your tacit expression,
> > you can replace the body of your explicit expression:
> >
> >    filters(4 : 'echo x;y')"3 2 image
> >
> > To help see that the grammar is wrong in the second expression, you
> > can replace the non-noun names with their values:
> >
> >    $filters (cntrl [&(;"2);._3 ])"3 2 image
> >
> > That said, it occurs to me that this gets close:
> >
> >    $filters 2 1 0 3&|:@(;"2/ cntrl&(];._3))"3 2 image
> > 3 2 2 2 2
> >
> > That's still not right, though:
> >
> >    want=: filters(4 : 'cntrl x&(link"2) tesl y')"3 2 image
> >    {:want=filters 2 1 0 3&|:@(;"2/ cntrl&(];._3))"3 2 image
> >
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to