Re: [Jprogramming] Fwd: Boxing by columns

2012-11-27 Thread Ric Sherlock
Note that you can skip the issue with the padded zeros by processing through to a regular structure at the first "1 ([: +/ ~.)"1 |: ar or using atop +/@~."1 |: ar On Tue, Nov 27, 2012 at 12:56 PM, Linda Alvord wrote: > (+/"1) 0~: (~.)"1 |: --

Re: [Jprogramming] Fwd: Boxing by columns

2012-11-26 Thread Linda Alvord
ginal Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Dan Bron Sent: Monday, November 26, 2012 12:59 PM To: J Programming Subject: Re: [Jprogramming] Fwd: Boxing by columns Have you tried ('';1) <;.1 table? Cut is

Re: [Jprogramming] Fwd: Boxing by columns

2012-11-26 Thread Dan Bron
Have you tried ('';1) <;.1 table? Cut is one of the few primitives which can directly address non-leading dimensions. -Dan Please excuse typos; composed on a handheld device. On Nov 25, 2012, at 8:05 PM, Nick Simicich wrote: > I am trying to use the new gmail - and I have no idea why this p

Re: [Jprogramming] Fwd: Boxing by columns

2012-11-25 Thread Raul Miller
Personally, I always try to avoid boxing whenever I can. And if your data is regular (if all boxes have the same shape) then it seems to me that boxing is needless overhead. Am I missing something here? Thanks, -- Raul -- For

Re: [Jprogramming] Fwd: Boxing by columns

2012-11-25 Thread Ric Sherlock
In general I agree with Don that perhaps there are better ways to get the end result. However I did have a play and came up with the following way to box the columns of a table that is about twice as fast and twice as lean as the transpose method. ab=: >: ?. 1e6 4 $ 9 $ab 100 4 10 ti

Re: [Jprogramming] Fwd: Boxing by columns

2012-11-25 Thread Don Guinn
I don't think that there is a way to box by column other than transposing. However, it is not really necessary to box each column (or row if you transpose) to get your desired answer, which I assume is that you are looking for columns containing 9 unique digits. All you really need it the count of

[Jprogramming] Fwd: Boxing by columns

2012-11-25 Thread Nick Simicich
I am trying to use the new gmail - and I have no idea why this partial message was sent prematurely. I apologize, please ignore the earlier version. -- Forwarded message -- From: Nick Simicich Date: Sun, Nov 25, 2012 at 4:24 PM Subject: Boxing by columns To: Programming forum