Total array ordering: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
Miraheze>Marshall
No edit summary
m (Paradigms category)
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
In APL, a '''total array ordering''', or '''TAO''', is an [[ordering]] on all arrays which is used by [[Grade]] and [[Interval Index]]. Traditionally ordering is defined only for [[simple]] arrays of the same [[shape]], so TAO refers to the extension to [[Nested array|nested]] or [[box]]ed arrays of arbitrary [[shape]] and [[rank]]. While [[J]] has had such an ordering since an early version, total array ordering in APL was first seen in [[Dyalog APL 17.0]].
In APL, a '''total array ordering''', or '''TAO''', is an [[ordering]] on all arrays which is used by [[Grade]] and [[Interval Index]]. Traditionally ordering is defined only for [[simple]] arrays of the same [[shape]], so TAO refers to the extension to [[Nested array|nested]] or [[box]]ed arrays of arbitrary [[shape]] and [[rank]]. While [[J]] has had such an ordering since 1996 (release 3.01), total array ordering in APL was first seen in [[Dyalog APL 17.0]].


Dyalog's ordering is not a true total order because it does not handle arrays containing [[simple scalar]]s other than [[number]]s or [[character]]s, such as [[namespace]]s or [[object]]s. [[Roger Hui]] has argued that these scalars are not truly arrays, and are not in the scope of a total array ordering.
Dyalog's ordering is not a true total order because it does not handle arrays containing [[simple scalar]]s other than [[number]]s or [[character]]s, such as [[namespace]]s or [[object]]s. [[Roger Hui]] has argued that these scalars are not truly arrays, and are not in the scope of a total array ordering.
Line 12: Line 12:


[https://code.jsoftware.com/wiki/Essays/The_TAO_of_J The TAO of J]
[https://code.jsoftware.com/wiki/Essays/The_TAO_of_J The TAO of J]
{{APL features}}[[Category:Paradigms]]

Revision as of 15:26, 30 April 2020

In APL, a total array ordering, or TAO, is an ordering on all arrays which is used by Grade and Interval Index. Traditionally ordering is defined only for simple arrays of the same shape, so TAO refers to the extension to nested or boxed arrays of arbitrary shape and rank. While J has had such an ordering since 1996 (release 3.01), total array ordering in APL was first seen in Dyalog APL 17.0.

Dyalog's ordering is not a true total order because it does not handle arrays containing simple scalars other than numbers or characters, such as namespaces or objects. Roger Hui has argued that these scalars are not truly arrays, and are not in the scope of a total array ordering.

The name "total array ordering" is taken partly from the mathematical concept of a 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.

External links

TAO Axioms for Dyalog APL

n_le, a dfn implementation of a total array ordering

The TAO of J

APL features [edit]
Built-ins Primitives (functions, operators) ∙ Quad name
Array model ShapeRankDepthBoundIndex (Indexing) ∙ AxisRavelRavel orderElementScalarVectorMatrixSimple scalarSimple arrayNested arrayCellMajor cellSubarrayEmpty arrayPrototype
Data types Number (Boolean, Complex number) ∙ Character (String) ∙ BoxNamespaceFunction array
Concepts and paradigms Conformability (Scalar extension, Leading axis agreement) ∙ Scalar function (Pervasion) ∙ Identity elementComplex floorArray ordering (Total) ∙ Tacit programming (Function composition, Close composition) ∙ GlyphLeading axis theoryMajor cell search
Errors LIMIT ERRORRANK ERRORSYNTAX ERRORDOMAIN ERRORLENGTH ERRORINDEX ERRORVALUE ERROREVOLUTION ERROR