Axis: Difference between revisions

Jump to navigation Jump to search
12 bytes removed ,  23:36, 16 November 2019
m
Text replacement - "{{APL programming language}}" to "{{APL features}}"
Miraheze>Marshall
mNo edit summary
Miraheze>Adám Brudzewsky
m (Text replacement - "{{APL programming language}}" to "{{APL features}}")
Line 11: Line 11:
The choice to give leading axes lower indices and trailing axes higher indices is related to the choice to put lower-order places at higher indices in the base representation functions [[Decode]] and [[Encode]]. This is known in the wider programming world as a [[wikipedia:Endianness|big-endian]] order. Because the base representation and axis ordering are in alignment, [[selection]] of an single element from an array satisfies the clean identity <source lang=apl inline>i⌷A</source> {{←→}} <source lang=apl inline>((⍴A)⊥i)⌷,A</source>. If base representation used the opposite order, both of Decode's arguments would need to be reversed.
The choice to give leading axes lower indices and trailing axes higher indices is related to the choice to put lower-order places at higher indices in the base representation functions [[Decode]] and [[Encode]]. This is known in the wider programming world as a [[wikipedia:Endianness|big-endian]] order. Because the base representation and axis ordering are in alignment, [[selection]] of an single element from an array satisfies the clean identity <source lang=apl inline>i⌷A</source> {{←→}} <source lang=apl inline>((⍴A)⊥i)⌷,A</source>. If base representation used the opposite order, both of Decode's arguments would need to be reversed.


{{APL programming language}}
{{APL features}}

Navigation menu