LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-03-2004, 01:44 AM   #1
dongerch
LQ Newbie
 
Registered: Aug 2004
Posts: 1

Rep: Reputation: 0
Question stl_map is implemented by rbtree?


hi,

does anybody knows the stl_map in redhat 7.3 is implemented by rbtree? I need to verify this for my project. Because the rbtree is fast access.
 
Old 08-03-2004, 04:52 PM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
The implementation isn't guarenteed.

stl_map is a part of the standard template library, which can be implemeted in any number of different ways. For example, gcc ships with one version of the library, but can also compile with stlport (a different version).

What is defined is that the insertion and lookup routines will take a length of time proportional to the logarithm of the number of elements in the list. In other words, it's guarenteed to be fast.

But it could also be implemented by several other forms of binary search tree, or even (I think) an open-bucket hashmap.

The implementation isn't defined in the standard for the perfectly good reason that if someone finds a better method, it can be re-implemented without having to change the standard.

Hope that helps,

— Robert J. Lee
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
QM_MODULES function not implemented pike Linux - General 4 12-22-2005 06:03 AM
nslookup, command not implemented? digimars Linux - Networking 2 11-09-2005 06:59 PM
lockdsvc: Function not implemented Yalla-One Slackware 4 10-05-2005 12:48 PM
How Sizeof Operator Implemented? hiren Linux - General 4 09-29-2004 05:12 AM
How this can be implemented? JIV Linux - Networking 2 11-13-2003 11:00 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration