Re: 4 more associative containers.

Joaquín M López Muñoz wrote:
De: "David B. Held"
"Jeremy Maitin-Shepard" <jbms@attbi.com> wrote in message news:87u128yr3g.fsf@jbms.ath.cx...
I believe that a library named ``indexed_set,'' which has been proposed and is pending formal review, provides this functionality in addition to supporting multiple indices.
Are you sure it does the same thing? I was under the impression that Joaquin's library lets you define *additional* indexes, but what if you just want to use an existing index, but it is comparable to something other than the key_type?
indexed_set does provide this functionality (multiple indices aside.) See
http://tinyurl.com/2vu5g, section "Special lookup operations". See also http://tinyurl.com/3dyzh, section "Index set operations" for a formal definition of the kind of special lookup operations provided.
And so indexed_set does provide the ability to lookup by a type other than the key_type. Which means that if we compared the various set containers in terms of abilities, flex_set is a special case of indexed_set where the number of indexes == 1.
From what I just read about indexed_set, it seems that the best benefit to using flex_set instead of indexed_set is that flex_set is simpler and smaller.
We can sort set container classes by abilities to get this: std::set < flex_set < indexed_set. We can also sort multiset containers by ability and get this: std::multiset < flex_multiset < indexed_set. Rich Sposato

At 02:20 AM 2/4/2004, Rich Sposato wrote:
From what I just read about indexed_set, it seems that the best benefit to using flex_set instead of indexed_set is that flex_set is simpler and smaller.
How much simpler and smaller? If a programmer familiar with std::set could learn to use flex_set in and hour, and indexed_set an hour and ten minutes, I wouldn't see the difference as large enough to warrant two separate libraries. If that programmer who could learn to use flex_set in an hour would take four hours to learn indexed_set, the difference starts to look significant. Probably programmers not familiar with either library would be the best judges. Efficiency is also a question, but I don't suppose anyone has run apples-to-apples timings, and I'm always leery of efficiency arguments not supported by actual timings. --Beman
participants (2)
-
Beman Dawes
-
Rich Sposato