• 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: binary search trees & binning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binary search trees & binning


  • Subject: Re: binary search trees & binning
  • From: "Michael Ash" <email@hidden>
  • Date: Tue, 15 Apr 2008 22:14:42 -0400

On Tue, Apr 15, 2008 at 5:38 PM, Jean-Daniel Dupas
<email@hidden> wrote:
>  If you need a storage that provide binary search, you can probably use a
> CFBinaryHeap.
>
>  "CFBinaryHeap  implements a container that stores values sorted using a
> binary search algorithm. All binary heaps are mutable; there is not a
> separate immutable variety".

Despite the name, CFBinaryHeap does not provide any binary search facilities.

It is a priority queue, heap being another name for that. In other
words, it's an object where you can put things into it in any order,
but when you get an object from it that object is always the smallest
one in the container, and it's implemented so that this is very fast,
O(log n).

I can see ways to use this object to implement this sort of histogram,
but it doesn't let you specify an input value and get an index to the
closest match.

Mike
_______________________________________________

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

  • Follow-Ups:
    • Re: binary search trees & binning
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >binary search trees & binning (From: Boyd Collier <email@hidden>)
 >Re: binary search trees & binning (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Memory leak when re-alloc Methods
  • Next by Date: Re: NSAllocateCollectable() questions
  • Previous by thread: Re: binary search trees & binning
  • Next by thread: Re: binary search trees & binning
  • Index(es):
    • Date
    • Thread