The term "associative"

D

Dave

Hello all,

Why is the term "associative" containter used to describe std::set<>,
std::map<>, std::multiset<> and std::multimap<>? I always had the
impression that it is related to the fact that elements in these containers
are sorted. However, the (soon-to-be standard) hash-based containers are
also considered associative. In these containers, element order is
determined purely by the hash function and the insertion order, not by any
ordering that could be imposed on the elements.

So, just what exactly does "associative" mean?

Thanks,
Dave
 
D

David Harmon

On Mon, 19 Apr 2004 09:07:00 -0700 in comp.lang.c++, "Dave"
So, just what exactly does "associative" mean?

Lookup based on an arbitrary "key" type. THe container makes an
"association" between the key and the value. Except for "set" where the
key is the value.
p
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,244
Latest member
cryptotaxsoftware12

Latest Threads

Top