473,387 Members | 3,033 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,387 software developers and data experts.

Trees in C++

Can anybody point me in the direction of a decent general purpose tree
data structure, as I have been less than impressed by the core::tree<>
discussed on gamedev.net

Adam
Feb 18 '06 #1
4 1490
In article <43**********@mk-nntp-2.news.uk.tiscali.com>,
Adam Hartshorne <ad**@dcs.warwick.ac.uk> wrote:
Can anybody point me in the direction of a decent general purpose tree
data structure, as I have been less than impressed by the core::tree<>
discussed on gamedev.net


To do an nary tree, I do:

std::map< Key, std::vector<Key> >

--
Magic depends on tradition and belief. It does not welcome observation,
nor does it profit by experiment. On the other hand, science is based
on experience; it is open to correction by observation and experiment.
Feb 18 '06 #2
Adam Hartshorne wrote:
Can anybody point me in the direction of a decent general purpose tree
data structure, as I have been less than impressed by the core::tree<>
discussed on gamedev.net


Have you tried googling for it?

IIRC, there is a graph library (part of Boost libraries, methinks).
A tree is a directional acyclic graph.
V
--
Please remove capital As from my address when replying by mail
Feb 18 '06 #3

Victor Bazarov wrote:
Adam Hartshorne wrote:
Can anybody point me in the direction of a decent general purpose tree
data structure, as I have been less than impressed by the core::tree<>
discussed on gamedev.net


Have you tried googling for it?

IIRC, there is a graph library (part of Boost libraries, methinks).
A tree is a directional acyclic graph.


I second that idea.
You can also take at the 'forest' object at opensource.adobe.com.

Feb 18 '06 #4
STL Trees are implemented as RED-BLACK Binary Tree.

Regards,
www.faqden.com

Feb 18 '06 #5

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

Similar topics

6
by: C++ Shark | last post by:
Hi, which stl class is good for creating search trees? I am looking for something flexible, that allows me to search for a required state (of matrices, graphs, etc.) quickly. thanks in...
1
by: barnesc | last post by:
Hi again, Since my linear algebra library appears not to serve any practical need (I found cgkit, and that works better for me), I've gotten bored and went back to one of my other projects:...
3
by: ptrSriram | last post by:
Can someone help me with an algorithm to merge two binary search trees. One method I thought of was to flatten both the trees into sorted lists(inorder traversal),merge those two sorted lists,...
8
by: sudharsan | last post by:
please gimme the logic to merge two binary search trees?I mean which node has to be the root node of the new binary tree?? Thanks in advance
2
by: trusiki | last post by:
I am trying to use C# for my program that deals with manipulation of trees (i.e. finding distance between different nodes, assigning labels to nodes, storing trees, etc.). I know I can probably...
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...
7
by: Vinodh | last post by:
Started reading about Binary Trees and got the following questions in mind. Please help. Definition of a Binary Tree from "Data Structures using C and C++ by Tanenbaum" goes like this, "A...
8
by: Bert | last post by:
How can my response to this problem be better? The pot doesn't work that well when you enter 25, 21, 17 and some others. The problem: CHRISTMAS TREES The grade 5 class at the local primary...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.