Skip navigation.
 
mlRe: binary search trees & binning
FROM : Jean-Daniel Dupas
DATE : Tue Apr 15 23:38:41 2008

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

Related mailsAuthorDate
mlbinary search trees & binning Boyd Collier Apr 15, 21:02
mlRe: binary search trees & binning Jean-Daniel Dupas Apr 15, 23:38
mlRe: binary search trees & binning Jens Alfke Apr 15, 23:56
mlRe: binary search trees & binning John Stiles Apr 16, 00:07
mlRe: binary search trees & binning Michael Ash Apr 16, 04:14
mlRe: binary search trees & binning Jean-Daniel Dupas Apr 16, 09:56
mlRe: binary search trees & binning Jean-Daniel Dupas Apr 16, 09:59
mlRe: binary search trees & binning Army Research Lab Apr 16, 13:31
mlRe: binary search trees & binning John Stiles Apr 16, 18:25
mlRe: binary search trees & binning John Stiles Apr 16, 19:20
mlRe: binary search trees & binning Boyd Collier Apr 16, 19:37
mlRe: binary search trees & binning Scott Ribe Apr 16, 21:35
mlRe: binary search trees & binning Michael Ash Apr 16, 22:35
mlRe: binary search trees & binning John Stiles Apr 16, 23:34
mlRe: binary search trees & binning Mike Abdullah Apr 17, 00:27
mlRe: binary search trees & binning Michael Ash Apr 17, 00:58
mlRe: binary search trees & binning Army Research Lab Apr 17, 13:00