From the Vocabulary page on Rank u"n

The verb u"n applies u to each cell as specified by the rank n . The 
full form of the rank used is 3$&.|.n . For example, if n=:2 , the three 
ranks are 2 2 2 , and if n=: 2 3, they are 3 2 3 .

On 11/17/2011 9:13 AM, Björn Helgason wrote:
> I think that people very often misunderstand what they are doing when
> setting/changing rank.
>
> I very rarely see people set more than one number after the " as in "1 and
> on an occasion "0 1 and not realizing that you actually need three numbers
> to set the ranks when the ranks are for a dyadic verb. The first number is
> only for the monadic case. So if you want to set 0 for left and 1 for the
> right you would need to say for example  "0 0 1
>
> It is best to apply b. on the verb after you have done you setting/changing
> to see what actually is.
>
> Before you understand rank it can seem to be that it is giving you
> random behavior and be something of a pain.
>
> 2011/11/17 Raul Miller<[email protected]>
>
>> In general, structuring J code is an exercise in picking the right words.
>>
>> That said, in this case:  adding "1 on a verb that assumes a rank 1
>> argument is only meaningful for verbs which do the right thing on equal
>> length arguments.
>>
>> --
>> Raul
>>
>> On Wed, Nov 16, 2011 at 11:36 PM, Daniel Lyons<[email protected]
>>> wrote:
>>
>>>
>>> On Nov 16, 2011, at 8:49 AM, Devon McCormick wrote:
>>>
>>>> Since you know you want the function to applied with rank 1, you should
>>>> probably build it into the definition, e.g.
>>>>
>>>>    timeToMove=: ((timeToRotate&: azimuth)>. (timeToAscend&:
>>>> elevation))"1
>>>>    left timeToMove right
>>>> 0.15 0.45 1.15
>>>
>>>
>>> I decided I bit off more than I could chew and have gone back to the
>>> tutorials. I ran into this today, it certainly solves the short-term
>>> problem. But the bigger problem of not knowing how to structure a J
>> program
>>> is still there. Back to the books. :)
>>>
>>> Thanks for the help!
>>>
>>> —
>>> Daniel Lyons
>>>
>>> ----------------------------------------------------------------------
>>> 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