Array model: Difference between revisions
Jump to navigation
Jump to search
→Array characteristics
Miraheze>Marshall m (→Boxes) |
Miraheze>Marshall |
||
Line 67: | Line 67: | ||
== Array characteristics == | == Array characteristics == | ||
APL defines the following characteristics of an array. All information about an array is contained in two [[Vector|vectors]]: its [[shape]] and [[ravel]], including, for empty arrays, the ravel's [[prototype]]. | |||
* The [[rank]] is the number of dimensions or [[axes]] it has. It is the length of the shape. | |||
* The [[shape]] gives its length along each dimension. | |||
* The [[bound]] is the total number of elements in an array, that is, the product of the shape. | |||
* The [[ravel]] is a [[vector]] containing all of the array's [[Element|elements]]. It's length is the bound. | |||
* The [[Array prototype|prototype]] is a special "null" element for the array. It is derived from the first element for non-empty arrays. | |||
* The [[depth]] is a number indicating how deeply nested an array is. | |||
=== Depth === | === Depth === | ||
Line 82: | Line 90: | ||
APLs vary in their definition of depth: for example some may return the depth with a sign to indicate that some level of the array mixes elements of different depths. | APLs vary in their definition of depth: for example some may return the depth with a sign to indicate that some level of the array mixes elements of different depths. | ||
== External links == | == External links == |