Fixes to user's guide.
This commit is contained in:
Salvatore Filippone
2012-02-24 17:30:40 +00:00
parent 9d5dcc5259
commit 4da9bf0d01
189 changed files with 5280 additions and 4595 deletions
+16 -16
View File
@@ -73,7 +73,7 @@ call psb_hsort(x,ix,dir,flag)
<P>
These serial routines sort a sequence <IMG
WIDTH="19" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img109.png"
SRC="img108.png"
ALT="$X$"> into ascending or
descending order. The argument meaning is identical for the three
calls; the only difference is the algorithm used to accomplish the
@@ -99,7 +99,7 @@ Type:<B>optional</B>.
<BR>
Specified as: an integer array of (at least) the same size as <IMG
WIDTH="19" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img109.png"
SRC="img108.png"
ALT="$X$">.
</DD>
<DT><STRONG>dir</STRONG></DT>
@@ -123,7 +123,7 @@ default <code>psb_lsort_up_</code>.
<DT><STRONG>flag</STRONG></DT>
<DD>Whether to keep the original values in <IMG
WIDTH="26" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img110.png"
SRC="img109.png"
ALT="$IX$">.
<BR>
Type:<B>optional</B>.
@@ -154,7 +154,7 @@ Type: <B>Optional</B>
<BR>
An integer array of rank 1, whose entries are moved to the same
position as the corresponding entries in <IMG
WIDTH="14" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img25.png"
ALT="$x$">.
</DD>
@@ -185,16 +185,16 @@ position as the corresponding entries in <IMG
-->
<IMG
WIDTH="181" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img111.png"
SRC="img110.png"
ALT="$flag = psb\_sort\_ovw\_idx\_$"> then the entries in <IMG
WIDTH="61" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img112.png"
SRC="img111.png"
ALT="$ix(1:n)$">
where <IMG
WIDTH="13" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
WIDTH="13" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img16.png"
ALT="$n$"> is the size of <IMG
WIDTH="14" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
WIDTH="14" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
SRC="img25.png"
ALT="$x$"> are initialized to <!-- MATH
$ix(i) \leftarrow
@@ -202,7 +202,7 @@ position as the corresponding entries in <IMG
-->
<IMG
WIDTH="67" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img113.png"
SRC="img112.png"
ALT="$ix(i) \leftarrow
i$">; thus, upon return from the subroutine, for each
index <IMG
@@ -210,10 +210,10 @@ i$">; thus, upon return from the subroutine, for each
SRC="img4.png"
ALT="$i$"> we have in <IMG
WIDTH="36" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img114.png"
SRC="img113.png"
ALT="$ix(i)$"> the position that the item <IMG
WIDTH="31" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img115.png"
SRC="img114.png"
ALT="$x(i)$">
occupied in the original data sequence;
</LI>
@@ -222,16 +222,16 @@ i$">; thus, upon return from the subroutine, for each
-->
<IMG
WIDTH="184" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
SRC="img116.png"
SRC="img115.png"
ALT="$flag = psb\_sort\_keep\_idx\_$"> the routine will assume that
the entries in <IMG
WIDTH="36" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img117.png"
SRC="img116.png"
ALT="$ix(:)$"> have already been initialized by the user;
</LI>
<LI>The three sorting algorithms have a similar <IMG
WIDTH="74" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img118.png"
SRC="img117.png"
ALT="$O(n \log n)$"> expected
running time; in the average case quicksort will be the
fastest and merge-sort the slowest. However note that:
@@ -239,7 +239,7 @@ i$">; thus, upon return from the subroutine, for each
<OL>
<LI>The worst case running time for quicksort is <IMG
WIDTH="46" HEIGHT="34" ALIGN="MIDDLE" BORDER="0"
SRC="img119.png"
SRC="img118.png"
ALT="$O(n^2)$">; the algorithm
implemented here follows the well-known median-of-three heuristics,
but the worst case may still apply;
@@ -247,7 +247,7 @@ i$">; thus, upon return from the subroutine, for each
<LI>The worst case running time for merge-sort and heap-sort is
<IMG
WIDTH="74" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
SRC="img118.png"
SRC="img117.png"
ALT="$O(n \log n)$"> as the average case;
</LI>
<LI>The merge-sort algorithm is implemented to take advantage of