Leading axis theory: Difference between revisions

Jump to navigation Jump to search
1,026 bytes added ,  15:07, 30 April 2020
m
Leading axis theory category
Miraheze>Marshall
(Created page with "'''Leading axis theory''', or the '''leading axis model''', is an approach to array language design and use that emphasizes working with arrays by manipulating their cells...")
 
m (Leading axis theory category)
(8 intermediate revisions by 3 users not shown)
Line 30: Line 30:
| Unclear                    || [[Find]] (<source lang=apl inline>⍷</source>)
| Unclear                    || [[Find]] (<source lang=apl inline>⍷</source>)
|-
|-
| Designed for leading axes  || [[Rank operator]] (<source lang=apl inline>⍤</source>), [[Tally]] (<source lang=apl inline>≢</source>), [[Interval Index]] (<source lang=apl inline>⍸</source>), [[Key]] (<source lang=apl inline>⌸</source>)
| Designed for leading axes  || [[Rank operator]] (<source lang=apl inline>⍤</source>), [[Tally]] (<source lang=apl inline>≢</source>), [[Interval Index]] (<source lang=apl inline>⍸</source>), [[Key]] (<source lang=apl inline>⌸</source>), [[Raze]] (<source lang=apl inline>⊃</source>)
|}
|}


Line 36: Line 36:


{|class=wikitable
{|class=wikitable
! Functions                                !! [[SHARP APL]]!! [[Dyalog APL]]
! Functions                                !! [[SHARP APL]]       !! [[Dyalog APL]]      !!style="min-width:5em"| [[A+]]  !!style="min-width:5em"| [[J]]
|-
|-
| [[Take]], [[Drop]]                      || {{Yes|19.0}} || {{Yes|13.0}}
| [[Take]], [[Drop]]                      || {{Yes|19.0}}       || {{Yes|13.0}}        || {{Yes}}                        || {{Yes}}
|-
|-
| [[Indexing]] function                    || {{Yes|19.0}} || {{Yes|13.0}}
| [[Indexing]] function                    || {{Yes|19.0}}       || {{Yes|13.0}}        || {{Yes}}                        || {{Yes}}
|-
|-
| [[Bracket indexing]]                    || {{No}}       || {{No}}
| [[Bracket indexing]]                    || {{No}}             || {{No}}             || {{Yes}}                        ||style="text-align:center;"| N/A
|-
|-
| [[Scalar dyadic]]s                      || {{Yes}}     || {{No}}
| [[Scalar dyadic]]s                      || {{Yes}}             || {{No}}              || {{No}}                        || {{Yes}}
|-
|-
| [[Unique]]                               || {{Yes}}     || {{Yes|17.0}}
| [[Index Of]]                             || {{No|Incompatible}} || {{Yes|14.0}}        || {{Yes}}                        || {{Yes}}
|-
|-
| [[Index Of]]                             || {{No|No*}}   || {{Yes|14.0}}
| [[Membership]]                           || {{No|Incompatible}} || {{No|Incompatible}} || {{Yes}}                        || {{Yes}}
|-
|-
| [[Union]], [[Intersection]], [[Without]] || {{No}}       || {{No}}
| [[Unique]]                              || {{Yes}}            || {{Yes|17.0}}        ||style="text-align:center;"| N/A || {{Yes}}
|-
| [[Union]], [[Intersection]], [[Without]] || {{No}}             || {{No}}              ||style="text-align:center;"| N/A || {{Yes}}
|}
|}


[[Index Of]] in [[SHARP APL]] was not extended to apply to left argument [[major cell]]s as in J and Dyalog; instead it was given rank <source lang=apl inline>1 0</source> making such a change impossible. The leading-axis extension of scalar dyadics in SHARP is a direct consequence of given them a function rank 0, as SHARP's concept of function rank includes [[leading axis agreement]].
[[Index Of]] in SHARP APL was not extended to apply to left argument [[major cell]]s as in J and Dyalog; instead it was given rank <source lang=apl inline>1 0</source> making such a change impossible. In A+ not only [[Index Of]] but also [[Membership]] was changed to follow the leading axis model, breaking compatibility with other APLs. A+ also restricts [[Take]] and [[Drop]] to allow only a [[singleton]] left argument (but any right argument rank is permitted). The leading-axis extension of scalar dyadics in SHARP is a direct consequence of giving them a function rank 0, as SHARP's concept of function rank includes [[prefix agreement]].


== History ==
== History ==
Line 60: Line 62:


Leading axis theory was brought to [[Nested array theory|nested]] APLs by [[Dyalog APL]] in the 2010s after [[Dyalog Ltd.]] employed Hui. Working with [[Jay Foad]] and [[Morten Kromberg]], Hui designed and implemented versions of Rank and other J functionality compatible with Dyalog's nested arrays.
Leading axis theory was brought to [[Nested array theory|nested]] APLs by [[Dyalog APL]] in the 2010s after [[Dyalog Ltd.]] employed Hui. Working with [[Jay Foad]] and [[Morten Kromberg]], Hui designed and implemented versions of Rank and other J functionality compatible with Dyalog's nested arrays.
{{APL features}}[[Category:Leading axis theory| ]]

Navigation menu