# Difference between revisions of "Nested array"

Miraheze>Marshall (Created page with "In nested array theory, a nested array is an array of depth greater than one, that is, an array that contains at least one element which is not a simple scalar. It...") |
Miraheze>Marshall m |
||

Line 1: | Line 1: | ||

− | In [[nested array theory]], a nested array is an array of [[depth]] greater than one, that is, an array that contains at least one element which is not a [[simple scalar]]. It is roughly equivalent to a [[Box|boxed]] array in [[flat array theory]]; more precisely, non-[[mixed]] nested arrays correspond exactly to boxed arrays. Depending on language, an [[empty]] array may never be considered nested, or it may be considered nested if its [[prototype]] is nested. | + | In [[nested array theory]], a '''nested array''' is an array of [[depth]] greater than one, that is, an array that contains at least one element which is not a [[simple scalar]]. It is roughly equivalent to a [[Box|boxed]] array in [[flat array theory]]; more precisely, non-[[mixed]] nested arrays correspond exactly to boxed arrays. Depending on language, an [[empty]] array may never be considered nested, or it may be considered nested if its [[prototype]] is nested. |

[[Scalar functions]] descend into nested arrays one element at a time. Arrays can be nested at an arbitrary depth so this descent constitutes a traversal. Nested arrays form a [[tree]] structure with some additional information (the [[shape]]) at each node. | [[Scalar functions]] descend into nested arrays one element at a time. Arrays can be nested at an arbitrary depth so this descent constitutes a traversal. Nested arrays form a [[tree]] structure with some additional information (the [[shape]]) at each node. | ||

A nested array is a kind of [[pointer array]] and is almost always stored using pointers. | A nested array is a kind of [[pointer array]] and is almost always stored using pointers. |

## Revision as of 14:23, 4 November 2019

In nested array theory, a **nested array** is an array of depth greater than one, that is, an array that contains at least one element which is not a simple scalar. It is roughly equivalent to a boxed array in flat array theory; more precisely, non-mixed nested arrays correspond exactly to boxed arrays. Depending on language, an empty array may never be considered nested, or it may be considered nested if its prototype is nested.

Scalar functions descend into nested arrays one element at a time. Arrays can be nested at an arbitrary depth so this descent constitutes a traversal. Nested arrays form a tree structure with some additional information (the shape) at each node.

A nested array is a kind of pointer array and is almost always stored using pointers.