Subject: Re: Is there any ordered list or balanced tree



On Mar 28, 2009, at 3:25 AM, an00na@xxxxxxxxx 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 (Cocoa-dev@xxxxxxxxxxxxxxx)

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:
http://lists.apple.com/mailman/options/cocoa-dev/maillists%40codeha.us

This email sent to maillists@xxxxxxxxx

...



Privacy