Topic: Why set is called an associative container ( Was STL More Complexity than It's Worth?)
Author: Biju Thomas <bijuthom@ibm.net>
Date: 1998/10/07 Raw View
Matt Austern wrote:
>
> For a Unique Associative Container (e.g. set or map),
I understand why map is called an Associative Container. It encapsulates
an association from a key to a value.
But, why set is called an Associative Container in the Standard? Where
is the association in a set?
-- Biju Thomas
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: sbnaran@localhost.localdomain (Siemel Naran)
Date: 1998/10/08 Raw View
On 7 Oct 1998 05:22:27 -0400, Biju Thomas <bijuthom@ibm.net> wrote:
>I understand why map is called an Associative Container. It encapsulates
>an association from a key to a value.
>
>But, why set is called an Associative Container in the Standard? Where
>is the association in a set?
I suppose this is because they want to think of a set as a map with the
mapped value field missing.
--
----------------------------------
Siemel B. Naran (sbnaran@uiuc.edu)
----------------------------------
[ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
[ about comp.lang.c++.moderated. First time posters: do this! ]
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Anatoli <REMOVETHIS.anatoli@ptc.com>
Date: 1998/10/08 Raw View
Biju Thomas wrote:
>
> Matt Austern wrote:
> >
> > For a Unique Associative Container (e.g. set or map),
>
> I understand why map is called an Associative Container. It encapsulates
> an association from a key to a value.
>
> But, why set is called an Associative Container in the Standard? Where
> is the association in a set?
>
A set of T is a map with key of T and value of void, sort of.
--
Regards
Anatoli (anatoli at ptc dot com) -- opinions aren't
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Al Stevens" <alstevens@midifitz.com>
Date: 1998/10/09 Raw View
"Associative" in this context refers to the method of retrieval rather than
the assocations of two objects. In the relational database lexicon,
associative retrieval has been defined as follows:
"... direct retrieval by value; that is, the user identifies the data
required by (some condition on) its value; not its address." An Introduction
to Database Systems, 1975, C.J.Date.
In the case of std::set<>, the "data required" is the determination whether
the value exists in the set.
[ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
[ about comp.lang.c++.moderated. First time posters: do this! ]
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Paul D. DeRocco" <pderocco@ix.netcom.com>
Date: 1998/10/09 Raw View
Biju Thomas wrote:
>
> But, why set is called an Associative Container in the Standard? Where
> is the association in a set?
My guess is that set<T> shares so much code with map<T> that it seemed
to the designers like they belong in the same family.
--
Ciao,
Paul
[ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
[ about comp.lang.c++.moderated. First time posters: do this! ]
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]