473,326 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

STL and Balanced Trees???

Are there any data types within STL that implement a balanced tree?

Peter
Jul 19 '05 #1
7 4753
On Wed, 22 Oct 2003 20:41:52 -0400, Peter Tkacz <pt****@cogeco.ca> wrote:
Are there any data types within STL that implement a balanced tree?

Peter

map , multimap , set , mutliset
--
grzegorz
Jul 19 '05 #2

"Peter Tkacz" <pt****@cogeco.ca> wrote in message
news:8z*******************@read1.cgocable.net...
Are there any data types within STL that implement a balanced tree?

Peter


Well, the performance requirements imposed on maps, multimaps, sets and
multisets cause them to be implemented as balanced trees.
Jul 19 '05 #3
Peter Tkacz wrote:
Are there any data types within STL that implement a balanced tree?


There is no requirement to implement a certain algorithm but STL
templates that might do somthing similar are std::map<...> or
std::multimap<...> .

Jul 19 '05 #4

"Gianni Mariani" <gi*******@mariani.ws> wrote in message
news:bn********@dispatch.concentric.net...
Peter Tkacz wrote:
Are there any data types within STL that implement a balanced tree?


There is no requirement to implement a certain algorithm but STL
templates that might do somthing similar are std::map<...> or
std::multimap<...> .


True, but can anyone think of any known data structures other than balanced
binary trees that would meet the logarithmic time complexity requirements
imposed by the Standard? I'm really seriously asking because, as far as I
know, there are none, but I don't know that I am right on that...
Jul 19 '05 #5
In article <vp************@news.supernews.com>, be***********@yahoo.com
says...

[ ... ]
Well, the performance requirements imposed on maps, multimaps, sets and
multisets cause them to be implemented as balanced trees.


More or less, partly depending on how tightly you define "tree" -- just
for example, you might be able to do the job with a heap, but it's open
to argument that a heap really IS a tree, just represented differently
than usual.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jul 19 '05 #6

"Dave" <be***********@yahoo.com> wrote in message
news:vp************@news.supernews.com...

"Gianni Mariani" <gi*******@mariani.ws> wrote in message
news:bn********@dispatch.concentric.net...
Peter Tkacz wrote:
Are there any data types within STL that implement a balanced tree?
There is no requirement to implement a certain algorithm but STL
templates that might do somthing similar are std::map<...> or
std::multimap<...> .


True, but can anyone think of any known data structures other than

balanced binary trees that would meet the logarithmic time complexity requirements
imposed by the Standard? I'm really seriously asking because, as far as I
know, there are none, but I don't know that I am right on that...


In looking around a bit on this, it appears that skip lists might also be a
data structure that could be used to implement the STL associative
containers and meet the logarithmic time complexity requirements.
Jul 19 '05 #7
In article <vp************@news.supernews.com>, be***********@yahoo.com
says...

[ ... ]
In looking around a bit on this, it appears that skip lists might also be a
data structure that could be used to implement the STL associative
containers and meet the logarithmic time complexity requirements.


IIRC, a skip list provides excellent _expected_ complexity, but at least
the usual ones don't meet the requirements for worst-case complexity.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: abhrajit | last post by:
I'm looking for a C/C++/Java library to create a balanced binary tree data structure given a set of leaf nodes as input. A leaf node should never become an interior node. So if I wish to create...
6
by: Kenneth McDonald | last post by:
I can't see anything about this in the notes on the upcoming 2.4 on python.org, but for some reason I thought I remembered seeing that a balanced tree sequence type would be included in Python in...
1
by: Koen | last post by:
Hi all, I created a little database to manage my e-books. The program will synchronize a table with the contents of a directory. Works great. Because I keep additional info (like keywords) to...
2
by: billym | last post by:
Does anyone know if C# (or .NET applications in general) can be load balanced on the middle tier simply by deploying them to multiple servers in a clustered environtment? If so, would this be...
13
by: Chris Bellini | last post by:
Greetings! I would like to use Server.Transfer to redirect users to a given page, while maintaining the state of form fields. This works fine on a single server. However, this will be...
17
Ganon11
by: Ganon11 | last post by:
Hey guys, OK, taking care of this beforehand; I AM a student in a university. This IS part of my homework, and (as a moderator), I'm doing my best to follow the posting guidelines I work so hard...
2
by: parasuram | last post by:
Hi friends ............. this is a question regarding the data structures trees Pleas post it if possible with in 2 days I will thankful if some body could help doing this. Operating...
4
by: the6campbells | last post by:
for the conext of this example imagine a simple part table where a part can only have a single parent. try to express a cte where the result set must be balanced. That is, the result set repeats...
6
by: rsprawls | last post by:
I found a disk for a b-tree algorithm that I purchased back in 93 or so. I'd hoped to find this, but now I'd like to know how worthwhile are b-trees in today's advancements? This is old C code...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.