Re: Is there any ordered list or balanced tree
Re: Is there any ordered list or balanced tree
- Subject: Re: Is there any ordered list or balanced tree
- From: Ken Thomases <email@hidden>
- Date: Sat, 28 Mar 2009 08:44:54 -0500
On Mar 28, 2009, at 3:25 AM, email@hidden wrote:
I can not find any data structure in Cocoa that maintains sorting
order of items gradually added in, using the pairwise comparison
results, something like the canonical set in C++'s STL that is
usually implemented as a balanced tree.
Cocoa doesn't have what you're looking for built in.
You can use the C++ STL, but it doesn't do the right thing with
respect to memory management. You can overcome that with some wrappers.
You can use the Core Foundation CFBinaryHeap API. It's closer in
spirit to Cocoa, and you can make that do the right thing with respect
to memory management quite easily.
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden