Total array ordering: Difference between revisions

Jump to navigation Jump to search
No change in size ,  20:29, 24 November 2020
m
no edit summary
(→‎Exceptions from the ordering: Expand on non-orderability of complex numbers; no need for a quote since it's a widely-accepted mathematical fact)
mNo edit summary
Line 1: Line 1:
In APL, a '''total array ordering''', or '''TAO''', is an [[ordering]] on all arrays which is used primarily by [[Grade]] and [[Interval Index]], but optionally also by the [[comparison function]]s. Traditionally ordering is defined only for [[simple]] arrays of the same [[shape]] and [[type]], so ''TAO'' refers to the extension to [[Nested array|nested]] or [[box]]ed arrays of arbitrary [[rank]], shape, and type.
In APL, a '''total array ordering''', or '''TAO''', is an [[ordering]] on all arrays which is used primarily by [[Grade]] and [[Interval Index]], but optionally also by the [[comparison function]]s. Traditionally ordering is defined only for [[simple]] arrays of the same [[shape]] and [[type]], so ''TAO'' refers to the extension to [[Nested array|nested]] or [[box]]ed arrays of arbitrary [[rank]], shape, and type.


[[J]] has had such an ordering since 1996 (release 3.01). [[Dyalog APL]] added a total array ordering with [[Dyalog APL 17.0|version 17.0]]. Both of these are based on a [[wikipedia:lexicographic order|lexicographic order]]ing.<ref>[[Roger Hui|Hui, R.]]. [https://code.jsoftware.com/wiki/Essays/The_TAO_of_J The TAO of J].</ref><ref>Hui, R. and [[M. Kromberg|Morten Kromberg]]. [https://dl.acm.org/doi/abs/10.1145/3386319 ''APL since 1978'']. ACM HOPL IV. 2020-06.</ref> [[GNU APL]] and [[NARS2000]] also implement total ordering, but based on [[wikipedia:shortlex order|shortlex order]]ing instead, comparing first [[rank]], then [[shape]], then [[type]], and finally value.
[[J]] has had such an ordering since 1996 (release 3.01). [[Dyalog APL]] added a total array ordering with [[Dyalog APL 17.0|version 17.0]]. Both of these are based on a [[wikipedia:lexicographic order|lexicographic order]]ing.<ref>[[Roger Hui|Hui, R.]]. [https://code.jsoftware.com/wiki/Essays/The_TAO_of_J The TAO of J].</ref><ref>Hui, R. and [[Morten Kromberg|M. Kromberg]]. [https://dl.acm.org/doi/abs/10.1145/3386319 ''APL since 1978'']. ACM HOPL IV. 2020-06.</ref> [[GNU APL]] and [[NARS2000]] also implement total ordering, but based on [[wikipedia:shortlex order|shortlex order]]ing instead, comparing first [[rank]], then [[shape]], then [[type]], and finally value.


The name ''total array ordering'' is taken partly from the mathematical concept of a [[wikipedia:total order|total order]], which must order any two elements, with elements ordering equally only if they are identical. This concept is transferred to APL by specifying that arrays should only order equally if they [[match]].
The name ''total array ordering'' is taken partly from the mathematical concept of a [[wikipedia:total order|total order]], which must order any two elements, with elements ordering equally only if they are identical. This concept is transferred to APL by specifying that arrays should only order equally if they [[match]].

Navigation menu