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”.
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 mails | Author | Date |
|---|---|---|
| Boyd Collier | Apr 15, 21:02 | |
| Jean-Daniel Dupas | Apr 15, 23:38 | |
| Jens Alfke | Apr 15, 23:56 | |
| John Stiles | Apr 16, 00:07 | |
| Michael Ash | Apr 16, 04:14 | |
| Jean-Daniel Dupas | Apr 16, 09:56 | |
| Jean-Daniel Dupas | Apr 16, 09:59 | |
| Army Research Lab | Apr 16, 13:31 | |
| John Stiles | Apr 16, 18:25 | |
| John Stiles | Apr 16, 19:20 | |
| Boyd Collier | Apr 16, 19:37 | |
| Scott Ribe | Apr 16, 21:35 | |
| Michael Ash | Apr 16, 22:35 | |
| John Stiles | Apr 16, 23:34 | |
| Mike Abdullah | Apr 17, 00:27 | |
| Michael Ash | Apr 17, 00:58 | |
| Army Research Lab | Apr 17, 13:00 |






Cocoa mail archive

