- Joined
- Jul 10, 2007
- Messages
- 6,306
One thing that has bothered me a great deal is how we've been incorrectly using the term "indexed array" to represent the following algorithm
insert:
set array[count] = value
set count = count + 1
remove:
set count = count - 1
set array[index] = array[count]
An indexed array is just a standard array. The above, for some unknown reason, is called indexing. It is a form of collection.
In reality, it has no name. It is used in the Knuth (Fisher–Yates) shuffle (look it up on wikipedia). For now, we'll just call it the idea used in the Knuth (Fisher–Yates) shuffle.
Does anyone have any good sensible name that we can use for this? Indexed Array is just... it makes us sound stupid : |.
The next thing is ofc all of the so called "indexers" that we have, like a unit indexer. Now, these make sense because they assign array indexes to a handle or w/e. Indexing would just be the act of assigning an index (no matter how) to something. This could be one with a counter, a stack, or whatever else. Indexing doesn't really give any specific information.
When people say that they are indexing something, they could be using the idea used in the Knuth (Fisher–Yates) shuffle or they could be using a stack. I suppose that the method does not really matter, so long as a unique index is assigned.
Back to the original issue. What should we call the unnamed data structure? I am almost positive that it had some name that was issued to it when I was taking a data structures class, but I can't find that name anywhere on the net. 99.99% of people shift elements down when they remove from the array. It's very rare to do what we do here all the time.
Anyways, please share your thoughts =).
insert:
set array[count] = value
set count = count + 1
remove:
set count = count - 1
set array[index] = array[count]
An indexed array is just a standard array. The above, for some unknown reason, is called indexing. It is a form of collection.
In reality, it has no name. It is used in the Knuth (Fisher–Yates) shuffle (look it up on wikipedia). For now, we'll just call it the idea used in the Knuth (Fisher–Yates) shuffle.
Does anyone have any good sensible name that we can use for this? Indexed Array is just... it makes us sound stupid : |.
The next thing is ofc all of the so called "indexers" that we have, like a unit indexer. Now, these make sense because they assign array indexes to a handle or w/e. Indexing would just be the act of assigning an index (no matter how) to something. This could be one with a counter, a stack, or whatever else. Indexing doesn't really give any specific information.
When people say that they are indexing something, they could be using the idea used in the Knuth (Fisher–Yates) shuffle or they could be using a stack. I suppose that the method does not really matter, so long as a unique index is assigned.
Back to the original issue. What should we call the unnamed data structure? I am almost positive that it had some name that was issued to it when I was taking a data structures class, but I can't find that name anywhere on the net. 99.99% of people shift elements down when they remove from the array. It's very rare to do what we do here all the time.
Anyways, please share your thoughts =).