I got a big helping hand from David and I think you would enjoy how I finally got around to understanding how "simple" a strategy Henry provides.
LInda From: Linda Alvord [mailto:[email protected]] Sent: Tuesday, August 14, 2012 5:44 AM To: 'david alis' Subject: RE: test m=:2 10 $ 'ABCDEEEFGH' f=: 13 :'(1,-. 2-:/\|:y)#"1 y' f m ABCDEFGH ABCDEFGH f ] #"1~ 1 , [: -. 2 -:/\ |: I can finally appreciate what Henry Rich had done. It is nice because it doesn't need to depend on amend and is really quite straightforward. Thanks to all of you for your help. Linda From: david alis [mailto:[email protected]] Sent: Tuesday, August 14, 2012 4:25 AM To: Linda Alvord Subject: Re: test Hi Linda In the statement (#~ 1 , [: -. 2&(-:/\))&.|: 2 10$'ABCDEEEFGH' the phrase &.|: means transpose the 2 10 array into a 10 2 array before applying the red expression. |:m AA BB CC DD EE EE EE FF GG HH 2&(-:/\) |:m 0 0 0 0 1 1 0 0 0 On Tue, Aug 14, 2012 at 9:34 AM, Linda Alvord <[email protected]> wrote: I had guessed that I should begin where your final target suggests but now what does this mean? m ABCDEEEFGH ABCDEEEFGH 2&(-:/\) m 1 Linda From: david alis [mailto:[email protected]] Sent: Tuesday, August 14, 2012 12:19 AM To: [email protected] Subject: Re: test Hello Linda I read your remark about needing time to understand Henry Rich's expression about removing adjacent columns (#~ 1 , [: -. 2&(-:/\)) and thought that maybe the following analysis would be helpful. Best regards David source=: (#~ 1 , [: -. 2&(-:/\)) target=: ( (#~) (1 , [: -. 2&(-:/\)) ) NB. hook T0=. (#~) T1=. (1 , [: -. 2&(-:/\)) source=: T1 target=: ( (1) (,) ([: -. 2&(-:/\)) ) NB. fork T2_T1=. (1) T3_T1=. (,) T4_T1=. ([: -. 2&(-:/\)) source=: T4_T1 target=: ( ([:) (-.) (2&(-:/\)) ) NB. fork T5_T4_T1=. ([:) T6_T4_T1=. (-.) T7_T4_T1=. (2&(-:/\)) source=: T7_T4_T1 target=: ( (2) (&) (-:/\) ) NB. conjunction T8_T7_T4_T1=. (2) T9_T7_T4_T1=. & T10_T7_T4_T1=. (-:/\) Linda Alvord lindaalvord at verizon.net <http://verizon.net/> Tue Aug 14 00:19:34 UTC 2012 Previous message: [Jprogramming] Amend adjacent columns Next message: [Jprogramming] Amend adjacent columns Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Thanks. I'll need to take some time to understand how this works. I'll let you know if I neeed some help. Linda -----Original Message----- From: programming-bounces at forums.jsoftware.com <http://forums.jsoftware.com/> [mailto:programming-bounces at forums.jsoftware.com <http://forums.jsoftware.com/> ] On Behalf Of Henry Rich Sent: Monday, August 13, 2012 5:24 AM To: programming at jsoftware.com <http://jsoftware.com/> Subject: Re: [Jprogramming] Amend adjacent columns Assuming you mean remove a column preceded by an identical column: (#~ 1 , [: -. 2&(-:/\))&.|: 2 10$'ABCDEEEFGH' ABCDEFGH ABCDEFGH ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
