AW: [Boost-Users] Tree Object Needed!
Isn't std::map what you want?
-----Ursprüngliche Nachricht----- Von: Hossein Haeri [mailto:powerprogman@yahoo.com] Gesendet: Dienstag, 3. Juni 2003 21:23 An: Boost-Users@yahoogroups.com Betreff: [Boost-Users] Tree Object Needed!
Dear all,
I need to have some template doing the jobs of an ordinary BST (Binary Search Tree). Nothing that fancy, but something at the level we all have been educated in CS1/FCS1, or similar courses. Does boosts repository contain such an object?
Why don't I write it myself? Simply, because I want to optimise the time!
Thank you, --Hossein
__________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com
------------------------ Yahoo! Groups Sponsor ---------------------~--> Get A Free Psychic Reading! Your Online Answer To Life's Important Questions. http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/EbFolB/TM -------------------------------------------------------------- -------~->
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Jasper,
Isn't std::map what you want?
No, it isn't! The fact is that I have a hierarchy that is aimed to be fixed, and is not balanced at all. The more important fact about it is that this hierarchy doesn't have any ordering. So what I need is a tree in which I can put the nodes everywhere in the abstract problem they are. Wishes, --Hossein __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com
Hi Hossein, Hossein Haeri wrote:
Jasper,
Isn't std::map what you want?
No, it isn't!
The fact is that I have a hierarchy that is aimed to be fixed, and is not balanced at all. The more important fact about it is that this hierarchy doesn't have any ordering.
If there no ordering, then what you want is not in fact Binary Search Tree... and if all you want is represent a tree, then Boost.Graph is quite handy. - Volodya
On Wed, 2003-06-04 at 19:36, Jasper, Alexander wrote:
Isn't std::map what you want?
I was about to say the same, but there's not really anything saying that std::map _must_ be implemented as a BST - it just usually is. For this reason I think tree based containers (BST, red-black etc. etc.) would have a place in Boost. Or not? In any case, you could use the Aapl C++ template library found here: http://www.essemage.com/aapl/
Dear all,
I need to have some template doing the jobs of an ordinary BST (Binary Search Tree). Nothing that fancy, but something at the level we all have been educated in CS1/FCS1, or similar courses. Does boosts repository contain such an object?
Why don't I write it myself? Simply, because I want to optimise the time!
Cheers, -- Tarjei
You may find tree.hh useful; not in boost though: http://www.damtp.cam.ac.uk/user/kp229/tree Kasper
participants (5)
-
Hossein Haeri
-
Jasper, Alexander
-
Kasper Peeters
-
Tarjei Knapstad
-
Vladimir Prus