On Tue, Apr 15, 2008 at 5:38 PM, Jean-Daniel Dupas
<[EMAIL PROTECTED]> 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 (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to