Woolz Image Processing  Version 1.7.5
AlgHeapSort.c File Reference

General purpose heap sort algorithms. More...

Functions

AlgError AlgHeapSort (void *data, unsigned nElm, unsigned elmSz, int(*cmpFn)(void *, void *))
 Sorts given data using a heapsort algorithm. More...
 
AlgError AlgHeapSortIdx (void *data, int *idx, unsigned nElm, int(*cmpFn)(void *, int *, int, int))
 Sorts given data using a heapsort algorithm only the indicies are modified. More...
 
void AlgHeapElmSwap (void *elm0, void *elm1, int cnt)
 Swaps two data elements. More...
 
int AlgHeapSortCmpCFn (void *datum0, void *datum1)
 Char comparison function for AlgHeapSort(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortCmpUFn (void *datum0, void *datum1)
 Unsigned char comparison function for AlgHeapSort(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortCmpSFn (void *datum0, void *datum1)
 Short comparison function for AlgHeapSort(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortCmpIFn (void *datum0, void *datum1)
 Int comparison function for AlgHeapSort(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortCmpLFn (void *datum0, void *datum1)
 Long long comparison function for AlgHeapSort(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortCmpFFn (void *datum0, void *datum1)
 Float comparison function for AlgHeapSort(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortCmpDFn (void *datum0, void *datum1)
 Double comparison function for AlgHeapSort(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortInvCmpCFn (void *datum0, void *datum1)
 Inverse char comparison function for AlgHeapSort(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortInvCmpUFn (void *datum0, void *datum1)
 Inverse unsigned char comparison function for AlgHeapSort(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortInvCmpSFn (void *datum0, void *datum1)
 Inverse short comparison function for AlgHeapSort(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortInvCmpIFn (void *datum0, void *datum1)
 Inverse int comparison function for AlgHeapSort(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortInvCmpLFn (void *datum0, void *datum1)
 Inverse long long comparison function for AlgHeapSort(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortInvCmpFFn (void *datum0, void *datum1)
 Inverse float comparison function for AlgHeapSort(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortInvCmpDFn (void *datum0, void *datum1)
 Inverse double comparison function for AlgHeapSort(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortCmpIdxCFn (void *data, int *idx, int id0, int id1)
 Char comparison function for AlgHeapSortIdx(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortCmpIdxUFn (void *data, int *idx, int id0, int id1)
 Unsigned char comparison function for AlgHeapSortIdx(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortCmpIdxSFn (void *data, int *idx, int id0, int id1)
 Short comparison function for AlgHeapSortIdx(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortCmpIdxIFn (void *data, int *idx, int id0, int id1)
 Int comparison function for AlgHeapSortIdx(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortCmpIdxLFn (void *data, int *idx, int id0, int id1)
 Long comparison function for AlgHeapSortIdx(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortCmpIdxFFn (void *data, int *idx, int id0, int id1)
 Float comparison function for AlgHeapSortIdx(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortCmpIdxDFn (void *data, int *idx, int id0, int id1)
 Double comparison function for AlgHeapSortIdx(). Sorted data will have smallest entry first and greatest last. More...
 
int AlgHeapSortInvCmpIdxCFn (void *data, int *idx, int id0, int id1)
 Inverse char comparison function for AlgHeapSortIdx(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortInvCmpIdxUFn (void *data, int *idx, int id0, int id1)
 Inverse unsigned char comparison function for AlgHeapSortIdx(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortInvCmpIdxSFn (void *data, int *idx, int id0, int id1)
 Inverse short comparison function for AlgHeapSortIdx(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortInvCmpIdxIFn (void *data, int *idx, int id0, int id1)
 Inverse int comparison function for AlgHeapSortIdx(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortInvCmpIdxLFn (void *data, int *idx, int id0, int id1)
 Inverse long long comparison function for AlgHeapSortIdx(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortInvCmpIdxFFn (void *data, int *idx, int id0, int id1)
 Inverse float comparison function for AlgHeapSortIdx(). Sorted data will have greatest entry first and smallest last. More...
 
int AlgHeapSortInvCmpIdxDFn (void *data, int *idx, int id0, int id1)
 Inverse double comparison function for AlgHeapSortIdx(). Sorted data will have greatest entry first and smallest last. More...
 

Detailed Description

General purpose heap sort algorithms.

Author
Bill Hill
Date
July 2000
Version
Id
7cde6295b16e97ff23b976d0938d24013cb595f9
Address: MRC Human Genetics Unit, MRC Institute of Genetics and Molecular Medicine, University of Edinburgh, Western General Hospital, Edinburgh, EH4 2XU, UK.
Copyright (C), [2012], The University Court of the University of Edinburgh, Old College, Edinburgh, UK.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.