Content deleted Content added
{{Copied |from=Index (computer science) |from_oldid=470513254 |to=Array data structure |to_diff=470647949 |to_oldid=470644178 |date=17:50, 10 January 2012}} |
→clarity: new section |
||
(24 intermediate revisions by 19 users not shown) | |||
Line 1:
{{Talk header}}
{{WikiProject Computer science|importance=Top|class=start}}▼
{{WikiProject banner shell|class=C|vital=yes|
}}
{{Copied |from=Index (computer science) |from_oldid=470513254 |to=Array data structure |to_diff=470647949 |to_oldid=470644178 |date=17:50, 10 January 2012}}
Line 197 ⟶ 200:
: Do you have a good example? [[User:Rgrig|Rgrig]] ([[User talk:Rgrig|talk]]) 01:24, 24 April 2009 (UTC)
:: For example, some kinds of [[hash table]] often reduces a number to the appropriate range of array index (the range varies over time with dynamic resizing) with a ''mod'' operator. --[[User:DavidCary|DavidCary]] ([[User talk:DavidCary|talk]]) 08:32, 23 January 2021 (UTC)
== Proposal to split the article ==
Line 249 ⟶ 254:
:::::''When I use my finger to point at the Moon, no one would mistake my finger for the Moon. But why is it then, that when I use a word to point to an idea, people so often mistake the word for the idea?'' -- attributed to [[Zhuangzi]], c. 350 BC.
:::All the best, --[[User:Jorge Stolfi|Jorge Stolfi]] ([[User talk:Jorge Stolfi|talk]]) 19:57, 21 May 2009 (UTC)
:''The above discussion is preserved as an archive of a [[WP:RM|requested move]]. <span style="color:red">'''Please do not modify it.'''</span> Subsequent comments should be made in a new section on this talk page. No further edits should be made to this section.''</div><!-- Template:RM bottom -->
==Array structure?==
Line 282 ⟶ 287:
The implementation of the iliffe array presented here makes the assumption that each row is allocated separately. However, Numerical Recipes in C provide a version of such vector with better locality by allocating the data as a contiguous memory block and have the indexing array points to beginning of rows in this block. Tests show few to no overhead between this and a traditional Dope vector. Would it be worthwhile to speak of this distinction ?
[[User:Joel falcou|Joel falcou]] ([[User talk:Joel falcou|talk]]) 18:27, 4 January 2012 (UTC)
== Arrays not analogous to vectors or matrices ==
(Referring to the 3rd paragraph) Arrays are not analogous to mathematical vectors, matrices or tensors, but rather to the objects called tuples in mathematical terminology. I appreciate that they have often been named this way, and there may even be cases where it is helpful to explain them like this, but the statement as it stands is not correct. I believe at the least there should be a mention of tuples. I am not aware of the mathematical term for multidimensional tuples.
Example:
Vectors and the related objects are linear objects. An array of customer details is valid in computer science, but it has no meaning to act on it using coordinate transformations, linear functions, inner products or any of the other machinery associated with linear mathematics. Conversely Maxwell's equations contain vectors but do not contain any arrays (or tuples). When a vector can be represented as a tuple/array, it must have elements that are members of a field, this is not the case for a general array.
I see that the paragraph doesn't have a reference, so unless there is some disagreement or discussion I will delete it, or possibly edit it.
David Drakard <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/86.182.183.171|86.182.183.171]] ([[User talk:86.182.183.171|talk]]) 22:20, 2 October 2012 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
== linked list O(1) insertion/deletion in the middle? ==
I know this is a common myth, but am surprised to see it in a Wikipedia article. Moreover, how can we read both O(n) for indexed access and O(1) for insertion/deletion in the middle, since to insert or delete item #i in a list, one must first get there, meaning perform indexed access.
Can someone expose this better? I would happily do it, but since I have no reference, edits would probably be quickly removed by ll fans, and I don't want to start an edit war (better abstain).
[[User:Denispir|denis 'spir']] ([[User talk:Denispir|talk]]) 18:09, 9 December 2012 (UTC)
== "A programmer (or a sophisticated compiler) may use this information to choose between ... ==
... row- or column-major layout for each array."
'''Very nice''', but in what actual programming language is that possible"
:Several languages and libraries for numeric computing, e.g. NumPy. I'm not aware of compilers that do this. [[User:Qwertyus|Q<small>VVERTYVS</small>]] <small>([[User talk:Qwertyus|hm?]])</small> 10:51, 25 February 2016 (UTC)
== A Commons file used on this page has been nominated for deletion ==
The following Wikimedia Commons file used on this page has been nominated for deletion:
* [[commons:File:Octicons-terminal.svg|Octicons-terminal.svg]]<!-- COMMONSBOT: discussion | 2019-07-26T23:37:55.984986 | Octicons-terminal.svg -->
Participate in the deletion discussion at the [[commons:Commons:Deletion requests/File:Octicons-terminal.svg|nomination page]]. —[[User:Community Tech bot|Community Tech bot]] ([[User talk:Community Tech bot|talk]]) 23:38, 26 July 2019 (UTC)
== Discuss delayed and manifest arrays ==
We should have a section that discusses different conceptual representations of arrays i.e. manifest and delayed. On a high level:
Manifest arrays
* exists in memory;
* contain trash from the memory without initialisation
* can be hidden behind functions to act as delayed arrays
Delayed arrays
* do not have to actually exist;
* are represented by a function of type (!! :: ix -> a) where ix is the index type and a is the type of the values of the array;
* Multidimensional array access translates to function composition
Delayed arrays seem to become more and more prominent in languages such as Haskell, Accelerate, Single Assignment C, Halide, Repa, Massiv and Futhark.
--[[User:Cluzz|Cluzz]] ([[User talk:Cluzz|talk]]) 15:33, 21 January 2020 (UTC)
== clarity ==
There needs to be some clarity as to what an array is, it seems sometimes it is a consecutive series of same sized elements in a datastructure (consecutive in memory) but then memory on most modern systems isn't physically consecutive anyway... since it is virtualised, so then... is it a logic (pretend) consecutive series of same sized elements? then we have associative arrays, which don't seem to be arrays at all but often lists of things. I know what I was taught originally an array to be, as in k&r C, but... that doesn't appear to be the definitive definition of array - at least any more. [[Special:Contributions/103.232.162.28|103.232.162.28]] ([[User talk:103.232.162.28|talk]]) 18:28, 1 June 2025 (UTC)
|