Created 11/9/1995 Heikki Tuuri
***********************************************************************/
#ifndef ut0sort_h #define ut0sort_h
/* This module gives a macro definition of the body of astandardsortfunctionforanarrayofelementsofany type.Thecomparisonfunctionisgivenasaparameterto themacro.Thesortalgorithmismergesortwhichhaslogarithmic worstcase.
*/
/*******************************************************************//** This macro expands to the body of a standard sort function.
The sort function uses mergesort and must be defined separately for each type of array.
Also the comparison function has to be defined individually for each array cell type. SORT_FUN is the sort function name.
The function takes the array to be sorted (ARR),
the array of auxiliary space (AUX_ARR) of same size, and the low (LOW), inclusive, and high (HIGH), noninclusive,
limits for the sort interval as arguments.
CMP_FUN is the comparison function name. It takes as arguments
two elements from the array and returns 1, if the first is bigger, 0if equal, and -1if the second bigger. */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.