Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is an associative container?

I am writing a paper about a certain new data structure. This structure holds (key, value) pairs and supports fast lookup by the key.

Can I call it an associative container in my paper?

Wikipedia contains the definition of associative containers only in the context of C++. Is the concept of associative container a C++ thing?

The entry on Associative arrays seems better. It defines the associative array in terms of 4 operations:

  1. the addition of pairs to the collection
  2. the removal of pairs from the collection
  3. the modification of the values of existing pairs
  4. the lookup of the value associated with a particular key

Unfortunately I cannot find very good references to this definition. Do you know of any relevant sources that I can cite?

like image 748
Martin Drozdik Avatar asked Dec 01 '22 02:12

Martin Drozdik


1 Answers

An associative container is any container that is not necessarily indexed with sequential integers that start with the base for the language (0 in most of the C-based languages, 1 for some others). If the data structure in your paper meets that requirement, it is an associative container.

As a general rule, don't use Wikipedia as a source for an academic paper.

like image 143
Zac Howland Avatar answered Dec 20 '22 19:12

Zac Howland