|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
On Mon, 19 Apr 2004 09:07:00 -0700 in comp.lang.c++, "Dave"
<better_cs_now@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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|