Le 15 avr. 08 à 21:02, Boyd Collier a écrit :
Hello all,

I need to place many thousands of doubles into size-class groups whose boundaries can be explicitly specified (much like one would do in constructing a histogram, though that's not what I'm doing). The number of size-classes won't be great, usually fewer than 100, say. It occurred to me that using a binary search tree would be a reasonably simple approach, and I've down-loaded some code from LiteratePrograms to do this. However, before trying to use this code, I thought I'd ask whether someone has done this sort of thing using various parts of Cocoa.

Thanks, Boyd

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”.


_______________________________________________

Cocoa-dev mailing list ([email protected])

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