• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is there any ordered list or balanced tree
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Is there any ordered list or balanced tree (From: email@hidden)

  • Prev by Date: Re: Is there any ordered list or balanced tree
  • Next by Date: Re: KVO Code Breaks Undo
  • Previous by thread: Re: Is there any ordered list or balanced tree
  • Next by thread: KVO Code Breaks Undo
  • Index(es):
    • Date
    • Thread