Everything2
Near Matches
Ignore Exact
Full Text
Everything2

array

created by JeffMagnus

(thing) by sahib! (5.9 y) (print)   ?   I like it! Fri Apr 07 2000 at 8:03:53

A collection of elements, each of the same type, but normally corresponding to unique values. Used often in computer science, compare with set and tuple. Also see hash, queue and stack.

(thing) by WarMachine (1.5 mon) (print)   ?   I like it! Sat Mar 31 2001 at 20:57:18

In Java, an array is a collection of values of the same type stored in contiguous order memory locations, each of which can be accessed by an integer index. Class Java.lang.reflect.Array.

API (JDK 1.1) documentation: http://java.sun.com/products/jdk/1.1/docs/api/java.lang.reflect.Array.html.


(idea) by Noung (14 s) (print)   ?   I like it! Sat Oct 20 2001 at 11:45:13

One-dimensional

In computer science, probably the simplest and most commonly used data-structure is the one-dimensional array. A one-dimensional array can be conceptualised as a simple list of values arranged in order in memory, such as this -

1 2 7 6 3 34 2 87

When accessing values from the array, it is usual to provide a) the variable name of the array (one of the main advantages of an array is to allow you to access multiple values from the same variable name, allowing you to group data together) and b) the memory offset from the start of the array. The first value is usually accessed by providing the offset 0, because this will read from the first block of memory (the offset 1 will read the second value, because it will move inwards 1 block).

Multi-dimensional

Things get a bit more complicated with arrays that have more than one dimension, which can be conceptualised as tables, like this -
 | 0  1
-|--------------
0| 1 34
1| 2 12
2| 5 37
The rows are usually referred to as the records, and the columns are the fields. To access this array, you need to supply two offsets, as well as the variable name - an offset for the record, and one for the field. So, the offset 1,2 would access the value 37. Most databases are essentially two-dimensional arrays, which is what you see above in the table.

Things get really complicated with three or four dimensional arrays, which are hard to conceptualise. You can imagine a three dimensional array to be a cube of values, and if anyone can conceptualise a four-dimensional one, I'd like to know.

Three dimensional arrays are used in graphics programs to store 3D co-ordinates, but anything above that is usually of little use to the programmer.


(definition) by Webster 1913 (print) I like it! Tue Dec 21 1999 at 21:54:18

Ar*ray" (#), n. [OE. arai, arrai, OF. arrai, arrei, arroi, order, arrangement, dress, F. arroi; a (L. ad) + OF. rai, rei, roi, order, arrangement, fr. G. or Scand.; cf. Goth. raidjan, garaidjan, to arrange, MHG. gereiten, Icel. rei[eth]i rigging, harness; akin to E. ready. Cf. Ready, Greith, Curry.]

1.

Order; a regular and imposing arrangement; disposition in regular lines; hence, order of battle; as, drawn up in battle array.

Wedged together in the closest array. Gibbon.

2.

The whole body of persons thus placed in order; an orderly collection; hence, a body of soldiers.

A gallant array of nobles and cavaliers. Prescott.

3.

An imposing series of things.

Their long array of sapphire and of gold. Byron.

4.

Dress; garments disposed in order upon the person; rich or beautiful apparel.

Dryden.

5. Law (a)

A ranking or setting forth in order, by the proper officer, of a jury as impaneled in a cause.

(b)

The panel itself.

(c)

The whole body of jurors summoned to attend the court.

To challenge the array Law, to except to the whole panel. Cowell. Tomlins. Blount. -- Commission of array Eng. Hist., a commission given by the prince to officers in every county, to muster and array the inhabitants, or see them in a condition for war. Blackstone.

 

© Webster 1913.


Ar*ray", v. t. [imp. & p. p. Arrayed (#); p. pr. & vb. n. Arraying.] [OE. araien, arraien, fr. OE. arraier, arreier, arreer, arroier, fr. arrai. See Array, n.]

1.

To place or dispose in order, as troops for battle; to marshal.

By torch and trumpet fast arrayed, Each horseman drew his battle blade. Campbell.

These doubts will be arrayed before their minds. Farrar.

2.

To deck or dress; to adorn with dress; to cloth to envelop; -- applied esp. to dress of a splendid kind.

Pharaoh . . . arrayed him in vestures of fine linen. Gen. xli..

In gelid caves with horrid gloom arrayed. Trumbull.

3. Law

To set in order, as a jury, for the trial of a cause; that is, to call them man by man.

Blackstone.

To array a panel, to set forth in order the men that are impaneled.

Cowell. Tomlins.

Syn. -- To draw up; arrange; dispose; set in order.

 

© Webster 1913.


printable version
chaos

C Arrays how to increase the size of an array Girls versus Girls associative array
collection Checkerboard puzzle One True Way of array indexing Advanced C Programming
dynamic array bubble sort Why can't Starbucks sell "small," "medium," and "large" drinks? C string
80x86 hash Storage units for the 8088 chip wantarray
Indirection tuple accessor !!
Matrix Sparse matrix for loop Trie
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
What you are reading:
Eric Burdon
Consumer Broadband and Digital Television Promotion Act
Freenet
Some people break so easily
I caught the football
The minister's penis
polis
Protestant Reformation
Uncle Tom's Cabin
vegans beware
Dem Bones Gonna Rise Again
Young Virgin Auto-Sodomized by Her Own Chastity
homogenisation of cultural identity in television shows
New Writeups
auraseer
Fling(fiction)
StrawberryFrog
Iron Man(review)
devolution
Misogyny and Porn, East to West - An Empirical Analysis(idea)
devolution
Korea is a place that refuses to stand still(idea)
Beanie127
The Pacifist Soldier(fiction)
VergilKint
Distilled from Dreams(fiction)
Scaevola
Roman marriage(thing)
rootbeer277
m&m's Ice Cream Treats(review)
Transitional Man
Gus's Chalet(review)
minnow
.410 bore(thing)
shaogo
Phonautogram(thing)
Morkel
Changing your sexuality(idea)
teleny
Baron Samedi(person)
Ouzo
The Great Barbershop Race Wars(log)
Mannerisky
second language(essay)
This affordable entertainment brought to you by The Everything Development Company