It seems to me that using ~. would mostly only help in cases where >./([-.-.)/ y would almost always give the same result as >./,y
That said, for those cases, I expect that a faster approach would typically be >./~.@([ -. -.)~/ y That said, if you know of cases where these assumptions do not hold, I'd be interested in hearing about them. Thanks, -- Raul On Fri, Sep 1, 2017 at 3:40 AM, 'Mike Day' via Programming <programm...@jsoftware.com> wrote: > The main requirement is to obtain the set-intersection of the rows: > > rowintersection =: ([-.-.)&~./ > > (The &~. isn't essential, but it will save space for large arrays with > significant repetition.) > > > (Drafting this, I see Raul's beaten me to it, though he didn't include the > &~. !!!) > > > Also, > > colintersection =: rowintersection@:|: > > > > Cheers, > > > Mike > > > > > On 01/09/2017 07:48, Skip Cave wrote: >> >> ]a =: 6 12$ ?72$10 > > > > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm