Wow ! I understand them when I see them, but it seems I cannot 'forward engineer' them. Well, not always.
Thanks a lot! Ben ________________________________________ From: [email protected] [[email protected]] on behalf of Raul Miller [[email protected]] Sent: Thursday, November 20, 2014 18:28 To: Programming forum Subject: Re: [Jprogramming] Boxing columns Perhaps ,"1/,"2/,"3/>zz Thanks, -- Raul On Thu, Nov 20, 2014 at 10:42 AM, Ben Gorte - CITG <[email protected]> wrote: > If I'm allowed to jump in here, I'm using ;. a lot to subdivide images into > 2x2 blocks (think wavelet), and I guess it's okay to do it like: > > ]z =: (2 2,:2 2) < ;. _3 i.4 6 > +-----+-----+-----+ > |0 1 |2 3 | 4 5| > |6 7 |8 9 |10 11| > +-----+-----+-----+ > |12 13|14 15|16 17| > |18 19|20 21|22 23| > +-----+-----+-----+ > > I was quite happy to discover that: > > ,./,./> z > 0 1 2 3 4 5 > 6 7 8 9 10 11 > 12 13 14 15 16 17 > 18 19 20 21 22 23 > > does the inverse (it's even pleasant to type). > > Now I'm smoothly moving to 3d with > > ]zz =: (2 2 2,:2 2 2) < ;. _3 i.4 6 8 > > but as the inverse is concerned I'm sort of stuck at: > > CutBack =: [: ([: ,/ ([: ,./ ,./)"4) 1 2 4 5&|: > (i.4 6 8) -: CutBack >zz > 1 > > which I'm sure can be improved. Any suggestions? > > Thanks, > Ben > ________________________ > From: [email protected] > [[email protected]] on behalf of Henry Rich > [[email protected]] > Sent: Wednesday, November 19, 2014 23:40 > To: [email protected] > Subject: Re: [Jprogramming] Boxing columns > > Is the inverse implemented using ^:_1 ? I couldn't find it. > > I come up with ,.&:>/ as an inverse for ('';1)&(<;.1) . > > Henry Rich > > On 11/19/2014 5:28 PM, Roger Hui wrote: >> The inverse of this "block matrices cut" is also interesting. >> >> >> On Wed, Nov 19, 2014 at 2:27 PM, Roger Hui <[email protected]> >> wrote: >> >>> ('';1) <;.1 i.3 3 >>> ┌─┬─┬─┐ >>> │0│1│2│ >>> │3│4│5│ >>> │6│7│8│ >>> └─┴─┴─┘ >>> >>> >>> On Wed, Nov 19, 2014 at 2:05 PM, Henry Rich <[email protected]> wrote: >>> >>>> boxcols i. 3 3 >>>> +-+-+-+ >>>> |0|1|2| >>>> |3|4|5| >>>> |6|7|8| >>>> +-+-+-+ >>>> >>>> Can you write boxcols? >>>> >>>> Can you write it tacitly without using a hook, fork, compose, or appose? >>>> >>>> Henry Rich >>>> ---------------------------------------------------------------------- >>>> For information about J forums see http://www.jsoftware.com/forums.htm >>>> >>> >>> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
