# Array Data Structure

An Array Data Structure is an index data structure with fixed array dimensions that supports efficient lookup by index address on one or more integer array dimensions.

**AKA:**Multi-Dimensional Data Object.**Context:**- It can (typically) have Array Dimensions.
- It can (typically) support an Array Operation, such as a push operation, and a pop operation.
- It can be based on an Array Data Structure Pattern.
- It can range from being a Heterogeneous Array to being a Homogeneous Array (such as a matrix data structure).
- It can range from being an Empty Array Data Structure to being a Populated Array Data Structure.
- It can range from being a Sparse Array Data Structure to being a Dense Array Data Structure.
- …

**Example(s):**- a One-Dimensional Array, such as a vector data structure.
- a Two-Dimensional Array, such as a
`217x3 array`

. - an OLAP Cube, which also allows efficient summarization functions.
- a Python Array, such as
`@Tuple = ("One", "Two", "Three")`

. - an R Array, such as
`x <- matrix(1:21, nrow=3, ncol=7, byrow = FALSE);`

- a Perl Array, such as
`@Tuple = ("Un","Two","Tres");`

and`@IMatrix = ([1,0,0], [0,1,0], [0,0,1]);`

. - a Scala Array.
- …

**Counter-Example(s):**- a Hash Data Structure or a Map Data Structure.
- a Tabular Data Structure (that can model an unordered multiset)
- a List Data Structure.
- a Linked List DS.
- a Dictionary DS.

**See:**Tuple Record Array, Structured Data, Array Data Type.

## References

### 2013

- (Wikipedia, 2013) ⇒ http://en.wikipedia.org/wiki/Array_data_structure#structure Retrieved:2013-11-30.
- In computer science, an
**array data structure**or simply an array is a data structure consisting of a collection of*elements*(values or variables), each identified by at least one*array index*or*key*. An array is stored so that the position of each element can be computed from its index tuple by a mathematical formula.^{[1]}^{[2]}^{[3]}For example, an array of 10 integer variables, with indices 0 through 9, may be stored as 10 words at memory addresses 2000, 2004, 2008, … 2036, so that the element with index*i*has the address 2000 + 4 ×*i*.^{[4]}Because the mathematical concept of a matrix can be represented as a two-dimensional grid, two-dimensional arrays are also sometimes called matrices. In some cases the term "vector" is used in computing to refer to an array, although tuples rather than vectors are more correctly the mathematical equivalent. Arrays are often used to implement tables, especially lookup tables; the word*table*is sometimes used as a synonym of*array*. Arrays are among the oldest and most important data structures, and are used by almost every program. They are also used to implement many other data structures, such as lists and strings. They effectively exploit the addressing logic of computers. In most modern computers and many external storage devices, the memory is a one-dimensional array of words, whose indices are their addresses. Processors, especially vector processors, are often optimized for array operations. Arrays are useful mostly because the element indices can be computed at run time. Among other things, this feature allows a single iterative statement to process arbitrarily many elements of an array. For that reason, the elements of an array data structure are required to have the same size and should use the same data representation. The set of valid index tuples and the addresses of the elements (and hence the element addressing formula) are usually,^{[5]}but not always, fixed while the array is in use.The term

*array*is often used to mean array data type, a kind of data type provided by most high-level programming languages that consists of a collection of values or variables that can be selected by one or more indices computed at run-time. Array types are often implemented by array structures; however, in some languages they may be implemented by hash tables, linked lists, search trees, or other data structures.The term is also used, especially in the description of algorithms, to mean associative array or "abstract array", a theoretical computer science model (an abstract data type or ADT) intended to capture the essential properties of arrays.

- In computer science, an

- ↑ Black, Paul E. (13 November 2008). "array".
*Dictionary of Algorithms and Data Structures*. National Institute of Standards and Technology. http://www.nist.gov/dads/HTML/array.html. Retrieved 22 August 2010. - ↑ Template:Cite arXiv
- ↑ Garcia, Ronald; Lumsdaine, Andrew (2005). "MultiArray: a C++ library for generic programming with arrays".
*Software: Practice and Experience***35**(2): 159–188. doi:10.1002/spe.630. ISSN 0038-0644. - ↑ David R. Richardson (2002), The Book on Data Structures. iUniverse, 112 pages. ISBN 0-595-24039-9, ISBN 978-0-595-24039-5.
- ↑ T. Veldhuizen. Arrays in Blitz++. In: Proceedings of the 2nd Int. Conf. on Scientific Computing in Object-Oriented Parallel Environments (ISCOPE), LNCS 1505, pages 223-220. Springer, 1998.

### 1996

- (Wall et al., 1996) ⇒ Larry Wall, Tom Christiansen, and Randal L. Schwartz. (1996). “Programming Perl, 2nd edition." O'Reilly. ISBN:1565921496
**multi-dimensional array**: An array with multiple subscripts for finding a single element. Perl does them with references.