For posterity, here is an excellent overview of ranks (including nested
ranks):

http://www.jsoftware.com/help/jforc/loopless_code_i_verbs_have_r.htm

Cheers,

Mike


On Sat, Jun 22, 2013 at 5:41 AM, Don Guinn <[email protected]> wrote:

> Extending your relationship slightly:
>
>    v"a"b <=> v"(a <. b <. (v b. 0))
> where a and b are three integers each to match the rank of v.
>
> This determines the rank in which v is executed; however, the expression
> v"a"b will have rank b when used in an expression.
>
>    v=:(<@i."0)"1
>
> 'x';v 3 2
>
> +-+-----+---+
>
> |x|0 1 2|0 1|
>
> +-+-----+---+
>
>
> Here <@i. executes as rank 0 0 0, where when used with ; v runs as rank 1 1
> 1.
>
>
> On Fri, Jun 21, 2013 at 11:57 PM, Michal D. <[email protected]
> >wrote:
>
> > By taking the minimum rank I mean:
> >
> > v"a b"c d  <=>  v"(a b <. c d)
> >
> > Interesting Raul, thanks for pointing that one out.  Expressions
> resulting
> > in errors always seem to trigger the funny corner cases.
> >
> > The other behaviour resistant to simplification that I came up would be
> > mixing positive and negative ranks.
> >
> > Cheers,
> >
> > Mike
> >
> >
> > On Thu, Jun 20, 2013 at 6:26 AM, Raul Miller <[email protected]>
> > wrote:
> >
> > >    $(i.3)(+"0"0 _)i.4
> > > 3 4
> > >
> > > simplifying by using the minimum of all nested ranks:
> > >
> > >    $(i.3)(+"0)i.4
> > > |length error
> > >
> > > --
> > > Raul
> > >
> > ----------------------------------------------------------------------
> > 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