5: #ifndef __IRR_HEAPSORT_H_INCLUDED__ 6: #define __IRR_HEAPSORT_H_INCLUDED__
39: //! Sorts an array with size 'size' using heapsort. 40: template<class T> 41: inline void heapsort(T* array_, s32 size) 42: {
17: def heapsort(n, ra) 18: j = i = rra = 0
53: heapsort(N, ary) 54:
36: * $DragonFly: src/lib/libc/stdlib/heapsort.c,v 1.5 2005/11/20 12:37:48 swildner Exp $ 37: * 38: * @(#)heapsort.c 8.1 (Berkeley) 6/4/93
140: int 141: heapsort(void *vbase, size_t nmemb, size_t size, 142: int (*compar)(const void *, const void *))
7: > module HeapSort (module HeapSort) 8: > where
53: > heapSort :: (Ord a) => [a] -> [a] 54: > heapSort = heapSortBy (<=) 55: > 56: > heapSortBy :: Rel a -> [a] -> [a]
22: void 23: heapsort(int n, double *ra) { 24: int i, j;
67: heapsort(N, ary); 68:
1: package Math::GSL::Heapsort::Test; 2: use base q{Test::Class};
4: use Math::GSL qw/:all/; 5: use Math::GSL::Heapsort qw/:all/; 6: use Math::GSL::Test qw/:all/;
37: #if defined(LIBC_SCCS) && !defined(lint) 38: static char sccsid[] = "@(#)heapsort.c 8.1 (Berkeley) 6/4/93"; 39: #endif /* LIBC_SCCS and not lint */
142: int 143: heapsort(vbase, nmemb, size, compar) 144: void *vbase;
57: def heapsort( array ) 58: heapify( array, 0 )
68: print_array( a ) 69: heapsort( a )
1: /* 2: A heapsort experiment implemented by Martin Richards February 1999 3: 4: This is a collection of variations on heapsort using perfectly balanced 5: heap structures with branching degree 2, 3, 4, 6, 8, 12 and 16. The
1: /* 2: * heapsort.h -- $Id$ 3: * heapsort interface 4: */
11: /* heapsort double, long, or string values 12: * n is the number of elements, s is the stride
Google Home - Google Code - Discuss - Terms of Service - Help - Submit Your Code©2010 Google - Privacy