Associative Array: Difference between revisions

From GM-RKB
Jump to navigation Jump to search
No edit summary
 
(Redirected page to Associative Array Data Structure)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
An [[Associative Array]] is a [[data structure]] that facilitates the storage, update, and retrieval of [[Key-Value Pair]]s.
#REDIRECT [[Associative Array Data Structure]]
* <B><U>AKA</U>:</B> [[Key-Value Table]], [[Associative Container]], [[Map Structure]], [[Dictionary Structure]], [[Lookup Table]].
* <B><U>Context</U>:</B>
** It can (typically) be accessed natively from a [[Programming Language]].
** It can be implemented with:
*** a [[Hash Table]].
*** a [[Self-Balancing Binary Search Tree]].
* <B><U>Example(s)</U>:</B>
** a [[Perl Associative Array]].
** a [[Java Associative Array]]/[[Java Map]].
** a [[Cassandra Associative Array]].
* <B><U>Counter-Example(s)</U>:</B>
** an [[Array Data Structure]].
* <B><U>See</U>:</B> [[Hash Data Structure]].
----
----
==References ==
 
===2011===
* http://en.wikipedia.org/wiki/Collection_%28computing%29#Associative_arrays
** An [[associative array]] or "lookup table" acts like a dictionary, providing a "value" (like a definition) in response to a lookup on a "key" (like a word).  The "value" might be a reference to a compound data structure.  A [[hash table]] is usually an efficient implementation.
* http://en.wikipedia.org/wiki/Associative_array
** In [[computer science]], an '''associative array''' (also called a '''map''' or a '''dictionary''') is an [[abstract data type]] composed of a [[Collection (computing)|collection]] of (key,value) pairs, such that each possible key appears at most once in the collection. Operations associated with this data type allow the addition of pairs to the collection, the removal of pairs from the collection, the modification of the values of existing pairs, and the lookup of the value associated with a particular key.<ref name="gt">{{citation|contribution=9.1 The Map Abstract Data Type|title=Data Structures & Algorithms in Java|last1=Goodrich|first1=Michael T.|author1-link=Michael T. Goodrich|last2=Tamassia|first2=Roberto|author2-link=Roberto Tamassia|publisher=Wiley|edition=4th|year=2006|pages=368–371}}.</ref><ref name="ms">{{citation|contribution=4 Hash Tables and Associative Arrays|title=Algorithms and Data Structures: The Basic Toolbox|first1=Kurt|last1=Mehlhorn|author1-link=Kurt Mehlhorn|first2=Peter|last2=Sanders|publisher=Springer|year=2008|pages=81–98}}.</ref>  <P>  The '''dictionary problem''' is the task of designing a [[data structure]] that implements an associative array. A standard solution to the dictionary problem is a [[hash table]]; in some cases it is also possible to solve the problem using directly addressed [[Array data structure|array]]s, [[binary search tree]]s, or other more specialized structures.<ref name="gt"/><ref name="ms"/><ref name="clrs">{{citation | last1 = Cormen | first1 = Thomas H. | author1-link=Thomas H. Cormen | coauthors = [[Charles E. Leiserson|Leiserson, Charles E.]]; [[Ron Rivest|Rivest, Ronald L.]]; [[Clifford Stein|Stein, Clifford]] | title = [[Introduction to Algorithms]] | edition = 2nd | year = 2001 | publisher = [[MIT Press]] and [[McGraw-Hill]] | isbn=0-262-03293-7 | chapter = 11 Hash Tables | pages = 221–252}}.</ref>  <P> Many programming languages include associative arrays as [[primitive data type]]s, and they are available in [[software library|software libraries]] for many others. [[Content-addressable memory]] is a form of direct hardware-level support for associative arrays.  <P> Associative arrays have many applications including such fundamental [[programming pattern]]s as [[memoization]]
<references/>
 
===2009===
* http://en.wikipedia.org/wiki/Associative_array
** ... From the perspective of a computer programmer, an associative array can be viewed as a generalization of an [[Array data type|array]]. While a regular array maps an integer key ([[Index (information technology)|index]]) to a value of arbitrary [[data type]], an associative array's keys can also be arbitrarily typed. In some [[programming language]]s, the keys of an associative array do not even need to be of the same type.
 
----
 
__NOTOC__
[[Category:Concept]]

Latest revision as of 20:33, 31 July 2014