 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Bryan Turner Guest
|
Posted: Fri Sep 19, 2003 10:06 pm Post subject: STL-like Skiplist template? |
|
|
Hello,
I'm looking for an STL-compatible skiplist template. Any
recommendations?
Specifically, I'm looking for a drop-in replacement for map<> which
guarantees logarithmic find()/insert()/erase(), with constant time
front()/back().
Thanks!
--Bryan
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
John Potter Guest
|
Posted: Sat Sep 20, 2003 10:11 am Post subject: Re: STL-like Skiplist template? |
|
|
On 19 Sep 2003 18:06:16 -0400, [email]bryan.turner (AT) pobox (DOT) com[/email] (Bryan Turner)
wrote:
| Quote: | I'm looking for an STL-compatible skiplist template. Any
recommendations?
|
Why you are looking would be of interest.
| Quote: | Specifically, I'm looking for a drop-in replacement for map<> which
guarantees logarithmic find()/insert()/erase(), with constant time
front()/back().
|
What is the real demand? std::map gives find/insert/erase and front.
Front is *m.begin() which is required to be constant time. You may
use that to get front from std::map. Back is *--m.end(); This is
not required to work, but it is required to be O(1) if it does.
Why do you want a skip-list?
John
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|