Indices: Difference between revisions

Jump to navigation Jump to search
419 bytes added ,  22:16, 8 December 2019
No edit summary
Line 58: Line 58:
Where (<source lang=k inline>&</source>) with a Boolean argument was present in [[K]] by K2 in 1998.<ref>Kx Systems. [http://web.archive.org/web/20041022042401/http://www.kx.com/technical/documents/kusrlite.pdf "K User Manual"]. 1998.</ref> It was extended to vectors of non-negative integers when it was added to [[J]] as Indices (<source lang=j inline>I.</source>) in release 5.02 (2003).<ref>Jsoftware. [https://www.jsoftware.com/docs/archive/release/ifb.htm "I. Implements ''Indices'']. 2003.</ref>
Where (<source lang=k inline>&</source>) with a Boolean argument was present in [[K]] by K2 in 1998.<ref>Kx Systems. [http://web.archive.org/web/20041022042401/http://www.kx.com/technical/documents/kusrlite.pdf "K User Manual"]. 1998.</ref> It was extended to vectors of non-negative integers when it was added to [[J]] as Indices (<source lang=j inline>I.</source>) in release 5.02 (2003).<ref>Jsoftware. [https://www.jsoftware.com/docs/archive/release/ifb.htm "I. Implements ''Indices'']. 2003.</ref>


Indices (<source lang=j inline>⍸</source>) was first introduced to APL, and the [[nested array model]], by [[NARS2000]]. Originally defined only for vectors, the current definition <source lang=apl inline>(,R)/,⍳⍴1/R</source> was introduced in about 2013 after some experimentation with other definitions.<ref>NARS2000 Wiki. [http://wiki.nars2000.org/index.php?title=Indices&direction=next&oldid=863 Indices]. Old revision: 2013-05-26.</ref> Where (<source lang=j inline>⍸</source>) with the same definition was added to [[Dyalog APL 16.0]] with the restriction that the argument be Boolean, and this restriction was lifted to allow non-negative integers in [[Dyalog APL 18.0]].
Indices (<source lang=apl inline>⍸</source>) was first introduced to APL, and the [[nested array model]], by [[NARS2000]]. Originally defined only for vectors, the generalised definition <source lang=apl inline>(,R)/,⍳⍴1/R</source> was introduced in about 2013 after some experimentation with alternatives.<ref>NARS2000 Wiki. [http://wiki.nars2000.org/index.php?title=Indices&direction=next&oldid=863 Indices]. Old revision: 2013-05-26.</ref> Where (<source lang=apl inline>⍸</source>), with almost the same definition, was added to [[Dyalog APL 16.0]] (June 2017), but with the restriction that the argument be Boolean, a restriction that was lifted to allow non-negative integers in [[Dyalog APL 18.0|18.0]] (2020). Dyalog's definition also returned <source lang=apl inline>I⍴⊂⍬</source> for <source lang=apl inline>⍸I</source> on a scalar <source lang=apl inline>I</source>, as opposed to NARS2000 which returned <source lang=apl inline>I⍴1</source>. In January 2018, NARS2000 switched to Dyalog's definition for scalar arguments; <source lang=apl inline>{(,⍵)/,⍳⍴⍵}</source>.


== Documentation ==
== Documentation ==

Navigation menu