shelli_c |
Table of contents
Procedureshelli_c ( Shell sort an integer array ) void shelli_c ( SpiceInt ndim, SpiceInt * array ) AbstractSort an integer array using the Shell Sort algorithm. Required_ReadingNone. KeywordsARRAY SORT Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- ndim I Dimension of the array. array I-O The array. Detailed_Inputndim is the number of elements in the array to be sorted. array on input, is the array to be sorted. Detailed_Outputarray on output, contains the same elements, sorted in increasing order. The actual sorting is done in place in array. ParametersNone. ExceptionsError free. 1) If ndim < 2, this routine does not modify the array. FilesNone. ParticularsThe Shell Sort Algorithm is well known. ExamplesLet array contain the following elements: 99 33 55 44 -77 66 Then after a call to shelli_c, the array would be ordered as follows: -77 33 44 55 66 99 RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) I.M. Underwood (JPL) Version-CSPICE Version 1.0.1, 05-JUL-2021 (JDR) Edited the header to comply with NAIF standard. -CSPICE Version 1.0.0, 08-JUL-2002 (NJB) (IMU) Index_Entriesshell sort an integer array |
Fri Dec 31 18:41:12 2021