One possible interpretation of dyad I. is a very tolerant dyad i. which
will work even an item in rhs does not exist in the lhs on the precondition
that lhs is sorted. Suppose you inspect the items of d selected by d I. e
   e;d{~ d I. e
┌────────────────┬────────────────┐
│2 3 6 7 10 13 14│4 4 7 7 11 13 14│
└────────────────┴────────────────┘

both 2 and 3 are not in d, mapped to 4 in d
6 7 in e mapped to  7 in d,

incidentally if all items in e are also in d, then both dyad i. and I. 
will give the same result, precondition assumed.

Пнд, 18 Апр 2011, PackRat писал(а):
> I'm trying to understand some J code that uses the interval index I. 
> primitive.  As a newbie to some of the more "advanced" primitives in J, 
> the DoJ's explanation is beyond me.  Can someone please clue me in on 
> what the purpose of I. is and how it works (in verbose, easy English, 
> please)?  I thought I'd do a little trial and error (you know, what 
> if...?) with some data to see what the results of I. were.  But looking 
> at the results below, I just don't see or understand what's going on.  
> I also don't know how these results would then be used as a possible 
> next step.
> 
>    d=. 0 1 4 5 7 8 11 13 14 17
>    e=. 2 3 6 7 10 13 14
>    
>    d I. e
> 2 2 4 4 6 7 8
>    e I. d
> 0 0 2 2 3 4 5 5 6 7
> 
> If you prefer other examples, that's fine, too--as long as they clearly 
> show what I. is doing.  Thanks in advance for any help with 
> understanding I. better!
> 
> Harvey
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to