HEAP SORT

2000-02-22 Thread Fábio Favaro
I AM A STUDANT AT P.U.C . UNIVERSITY IN BRAZIL AND I WOULD LIKE TO GET SOME INFORMATION ABOUT HEAP SORT METHOD. JUST TO LET YOU NOW, THE REASON THAT MAKES ME FEEL LIKE TO KNOW MORE ABOUT IT, IS BECAUSE I AM DEVELOPING A PAPER WORK ABOUT METHODS AND ORGANIZATION. THEREFORE I HAVE SOME

Re: heap sort or the wonder of abstraction

1997-10-09 Thread Ralf Hinze
Lennart wrote > Well, I'm a sucker for a benchmark so I ran all of these with hbc. > I also added the smooth merge sort that comes with hbc. > ... > As you can see there is no clear winner, but I see no real reason > to change the sort that comes with hbc to something else at this > moment. You

Re: heap sort or the wonder of abstraction

1997-10-09 Thread Lennart Augustsson
Oh, Chris, here's a line for your splay sort: splay 0.636 2.625 0.952 - 0.603 2.698 - 3.582 5.731 2.350 - BTW, I don't think the test program does the right thing. It prints the last element of the sorted list, but there is nothing that says that computing this

Re: heap sort or the wonder of abstraction

1997-10-09 Thread Lennart Augustsson
Ralf wrote: 10 | < |<= | > |>= |== | 1 2* | 1..100* | 2 1* | 100..1* | 1 2 2 1* |random merge | 3.15 | 9.16 | 2.83 | 8.96 | 3.18 | 6.65 | 9.60 | 6.64 | 9.46 | 6.58 |

Re: heap sort or the wonder of abstraction

1997-10-08 Thread Ralf Hinze
Sorting is a hobby-horse of mine, so I cannot resist the temptation to elaborate on the subject. I was motivated to write this rather long reply by Carsten Kehler Holst saying `As far as I can see the difference between merge sort and heap sort as described by Jon is almost non existing'. Ca

Re: heap sort or the wonder of abstraction

1997-10-08 Thread Chris Okasaki
--167E2781446B Content-Type: text/plain; charset="us-ascii" Ralf Hinze wrote: > Practitioners are probably surprised to learn that `pairingSort' is the > algorithm of choice for sorting. Any objections to this recommendation? > I was surprised to see that it performs so well: sorting

Re: Heap Sort

1997-10-07 Thread Jon . Fairbairn
On 4 Oct , Chris Okasaki wrote: > But the heapsort you give is nothing like the standard imperative > heapsort! Point taken, although I think 'nothing like' is overstating the case. > Yes, it uses a heap, but not the binary heap used by standard > heapsort. Perfectly true. I only said that yo

Re: Heap Sort

1997-10-04 Thread Chris Okasaki
[EMAIL PROTECTED] wrote: > Here is my version: > [...] > > On 21 Sep , Chris Dornan wrote: > > When would a heap sort be preferable to a merge sort? > > a) When you want to explain the imperative heapsort But the heapsort you give is nothing like the standard imper

RE: Heap Sort

1997-10-04 Thread Jon . Fairbairn
On 2 Oct , Carsten Kehler Holst wrote: > Merge Sort vs. Heap Sort (ala Jon) > As far as I can see the difference between merge sort and heap sort as > described by Jon is almost non existing. I'm afraid you need to look a little harder :-) At first let me note that heapsort a

RE: Heap Sort

1997-10-02 Thread Carsten Kehler Holst
Merge Sort vs. Heap Sort (ala Jon) As far as I can see the difference between merge sort and heap sort as described by Jon is almost non existing. Merge sort as I wrote it in 92 (it might have been 93 :-). Using Jon's naming: runify x = [x] merge [] ys = ys merge xs [] = xs merge xrun@

Re: Heap Sort

1997-10-01 Thread Jon . Fairbairn
heap node_a@(Node a heaps_a) node_b@(Node b heaps_b) | a < b = Node a (node_b: heaps_a) | otherwise = Node b (node_a: heaps_b) -- end On 21 Sep , Chris Dornan wrote: > When would a heap sort be preferable to a merge sort? a) When you want to explai

Re: Heap Sort

1997-09-21 Thread Chris Dornan
On 19 Sep, Nicholas Bleakly wrote: > Does any body have a heap sort algorithm (i.e. takes a single unsorted > list and applies a heap sort to it)? On 20 Sep, [EMAIL PROTECTED] replied: > If you mean a functional one, I have. I could email it to you. Or > post it here if wanted.

Re: Heap sort

1997-09-20 Thread Jon . Fairbairn
On 19 Sep, Nicholas Bleakly wrote: > Does any body have a heap sort algorithm (i.e. takes a single unsorted > list and applies a heap sort to it)? If you mean a functional one, I have. I could email it to you. Or post it here if wanted. Does anyone else have one? -- Jon Fai

Heap sort

1997-09-19 Thread Nicholas Bleakly
Does any body have a heap sort algorithm (i.e. takes a single unsorted list and applies a heap sort to it)? Thanks -- Nicholas Bleakly [EMAIL PROTECTED] [EMAIL PROTECTED] LINUX! The choice of a GNU generation.