Is the following any better?  (a is still 1 2 3 4 5)

    a +&> <\ a
2 0 0 0  0
3 4 0 0  0
4 5 6 0  0
5 6 7 8  0
6 7 8 9 10
    a +/ a
2 3 4 5  6
3 4 5 6  7
4 5 6 7  8
5 6 7 8  9
6 7 8 9 10


On 11/4/2011 9:10 PM, David Vaughan wrote:
> Hm, seems that was actually slightly slower than using / .
>
> On 5 Nov 2011, at 01:59, Kip Murray wrote:
>
>> Here is an example (u is +)
>>
>>     ]a =:>: i. 5
>> 1 2 3 4 5
>>     a +&.>  <\. a
>> +---------+-------+-----+---+--+
>> |2 3 4 5 6|4 5 6 7|6 7 8|8 9|10|
>> +---------+-------+-----+---+--+
>>     a +/ a
>> 2 3 4 5  6
>> 3 4 5 6  7
>> 4 5 6 7  8
>> 5 6 7 8  9
>> 6 7 8 9 10
>>
>>
>> On 11/4/2011 8:27 PM, David Vaughan wrote:
>>> I have a dyadic verb which is applied on the same boxed list using x u/ y 
>>> (where x=y), but this is inefficient because I only want to consider 
>>> distinct pairs once. How can I do this?
>>>
>>> Thanks.
>>> ----------------------------------------------------------------------
>>> 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

Reply via email to