468,306 Members | 1,255 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,306 developers. It's quick & easy.

The term "associative"

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?

Jul 22 '05 #1
1 1128
On Mon, 19 Apr 2004 09:07:00 -0700 in comp.lang.c++, "Dave"
<be***********@yahoo.com> wrote,
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.
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.