Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Algorithm to Monitor the Completion of a Quick Sort

IP.com Disclosure Number: IPCOM000099416D
Original Publication Date: 1990-Jan-01
Included in the Prior Art Database: 2005-Mar-14
Document File: 2 page(s) / 31K

Publishing Venue

IBM

Related People

Redpath, R: AUTHOR

Abstract

In the function quicksort(), the placement of My_Idea_To_Monitor_Qsort() enables the programmer to obtain information to monitor the completion of the quicksort algorithm. In My_Idea_To_Monitor_Qsort(), the graph routine is called after every sixteen points to limit I/O for efficiency. This does not assist in obtaining information to monitor the sort, it is necessary to consider for optimizing.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 100% of the total text.

Algorithm to Monitor the Completion of a Quick Sort

       In the function quicksort(), the placement of
My_Idea_To_Monitor_Qsort() enables the programmer to obtain
information to monitor the completion of the quicksort algorithm.  In
My_Idea_To_Monitor_Qsort(), the graph routine is called after every
sixteen points to limit I/O for efficiency.  This does not assist in
obtaining information to monitor the sort, it is necessary to
consider for optimizing.

      int qsort(base,nel,size,comp,field,flag) char far *base;
unsigned nel; unsigned size; int (*comp)(); char *field; { qs_comp  =
comp; qa_base  = base; qs_size  = size; sortfinish  = 0; totalelm  =
nel; quicksort(0,nel-1); }

      graph(numerator,denominator) int numerator,denominator; {
/*display graph percentage*/ } My_Idea_To_Monitor_Qsort() { if( ((+
+sortfinish%16)= =0) && (totalelm> =sortfinish) )
graph(sortfinish,totalelm); }

      quicksort(lb,ub) int lb,ub; {int j; while(lb  < ub) {
My_Idea_To_Monitor_Qsort();/*Disclosure Technique*/ j = _rearr(lb,
ub); if (j < < 1 < = lb + ub) {if (lb < j-1)
quicksort(lb,j-1); 1b = j+1; } else { if (j+1 < ub) quicksort(j+1,
ub); ub = j-1; } } }