Re: binary search trees & binning
Re: binary search trees & binning
- Subject: Re: binary search trees & binning
- From: Jean-Daniel Dupas <email@hidden>
- Date: Tue, 15 Apr 2008 23:38:41 +0200
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@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