471,066 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

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?

Thanks,
Dave
Jul 22 '05 #1
1 1196
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.
p
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.