Major cell search: Difference between revisions

Jump to navigation Jump to search
Roger didn't add support to set functions
(Created page with "The dyadic functions Index Of (<syntaxhighlight lang=apl inline>⍳</syntaxhighlight>), Interval Index (<syntaxhighlight lang=apl inline>⍸</syntaxhighlight>), and possibly Member Of (<syntaxhighlight lang=apl inline>∊</syntaxhighlight>) can be extended to search argument cells rather than elements, in accordance with the leading axis model. In this model, the "principal argument" (the one that is searched through) is considered as a list of its ...")
 
(Roger didn't add support to set functions)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
== History ==
== History ==


Major cell searching is supported for all relevant primitives in [[A+]] and [[J]]. Support where compatible was added to [[Dyalog APL]] under the direction of J implementer [[Roger Hui]] in 2014. The more recent array languages [[BQN]] and [[Uiua]] also define search functions to work on major cells.
Major cell searching is supported for all relevant primitives in [[A+]] and [[J]]. Some support was added to [[Dyalog APL]] under the direction of J implementer [[Roger Hui]] in 2014. The more recent array languages [[BQN]] and [[Uiua]] also define search functions to work on major cells.


[[Index Of]] searching major cells was added to [[Dyalog APL 14.0]] in 2014, and [[Interval Index]] also featured the extension when it was included in [[Dyalog APL 16.0]]. Several other APL dialects have extended Index Of in ways that are incompatible with major cell searching: in [[SHARP APL]] it has [[function rank]] <syntaxhighlight lang=apl inline>1 0</syntaxhighlight> (while major cell searching would imply a function rank that depends on the rank of the left argument), and in [[GNU APL]] and [[NARS2000]] elements are searched to give a multi-dimensional index. NARS2000 defines dyadic <syntaxhighlight lang=apl inline>⍸</syntaxhighlight>, called Array Lookup, to provide Index Of on cells.
[[Index Of]] searching major cells was added to [[Dyalog APL 14.0]] in 2014, and [[Interval Index]] also featured the extension when it was included in [[Dyalog APL 16.0]]. Several other APL dialects have extended Index Of in ways that are incompatible with major cell searching: in [[SHARP APL]] it has [[function rank]] <syntaxhighlight lang=apl inline>1 0</syntaxhighlight> (while major cell searching would imply a function rank that depends on the rank of the left argument), and in [[GNU APL]] and [[NARS2000]] elements are searched to give a multi-dimensional index. NARS2000 defines dyadic <syntaxhighlight lang=apl inline>⍸</syntaxhighlight>, called Array Lookup, to provide Index Of on cells.
Line 28: Line 28:


* [https://mlochbaum.github.io/BQN/doc/search.html#higher-ranks BQN documentation]
* [https://mlochbaum.github.io/BQN/doc/search.html#higher-ranks BQN documentation]
 
{{APL features}}
[[Category:Function characteristics]]
[[Category:Function characteristics]]

Navigation menu