?? page486.html
字號(hào):
<HTML>
<HEAD>
<TITLE>Sorter Class Hierarchy</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<img src="cover75.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cover75.gif" alt="Logo" align=right>
<b>Data Structures and Algorithms
with Object-Oriented Design Patterns in C++</b><br>
<A NAME="tex2html7924" HREF="page487.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page487.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="next_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/next_motif.gif"></A> <A NAME="tex2html7922" HREF="page485.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page485.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="up_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/up_motif.gif"></A> <A NAME="tex2html7918" HREF="page485.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page485.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/previous_motif.gif"></A> <A NAME="tex2html7926" HREF="page9.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page9.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/contents_motif.gif"></A> <A NAME="tex2html7927" HREF="page620.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page620.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="index_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/index_motif.gif"></A> <BR><HR>
<H3><A NAME="SECTION0016201000000000000000">Sorter Class Hierarchy</A></H3>
<P>
This chapter describes nine different sorting algorithms.
These are organized into the following five categories:
<UL><LI> insertion sorts<A NAME=34603> </A><LI> exchange sorts<A NAME=34604> </A><LI> selection sorts<A NAME=34605> </A><LI> merge sorts<A NAME=34606> </A><LI> distribution sorts<A NAME=34607> </A>.
</UL>
As shown in Figure <A HREF="page486.html#figsorters" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page486.html#figsorters"><IMG ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A>,
the sorter classes have been arranged in a class hierarchy
that reflects this classification scheme.
<P>
<P><A NAME="34614"> </A><A NAME="figsorters"> </A> <IMG WIDTH=575 HEIGHT=229 ALIGN=BOTTOM ALT="figure34610" SRC="img2105.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img2105.gif" ><BR>
<STRONG>Figure:</STRONG> Sorter Class Hierarchy<BR>
<P>
<P>
Program <A HREF="page486.html#progsorter2h" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page486.html#progsorter2h"><IMG ALIGN=BOTTOM ALT="gif" SRC="cross_ref_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/cross_ref_motif.gif"></A> defines five abstract sorter class templates:
<tt>InsertionSorter<T></tt>,
<tt>ExchangeSorter<T></tt>,
<tt>SelectionSorter<T></tt>,
<tt>MergeSorter<T></tt> and
<tt>DistributionSorter<T></tt>.
Notice that these classes are all trivial (i.e., empty)
extensions of the <tt>Sorter<T></tt> abstract base class.
<P>
<P><A NAME="34629"> </A><A NAME="progsorter2h"> </A> <IMG WIDTH=575 HEIGHT=277 ALIGN=BOTTOM ALT="program34626" SRC="img2106.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/img2106.gif" ><BR>
<STRONG>Program:</STRONG> Classes of Sorters<BR>
<P><HR><A NAME="tex2html7924" HREF="page487.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page487.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="next_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/next_motif.gif"></A> <A NAME="tex2html7922" HREF="page485.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page485.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="up_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/up_motif.gif"></A> <A NAME="tex2html7918" HREF="page485.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page485.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/previous_motif.gif"></A> <A NAME="tex2html7926" HREF="page9.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page9.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/contents_motif.gif"></A> <A NAME="tex2html7927" HREF="page620.html" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/html/page620.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="index_motif.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/index_motif.gif"></A> <P><ADDRESS>
<img src="bruno.gif" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/icons/bruno.gif" alt="Bruno" align=right>
<a href="javascript:if(confirm('http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/copyright.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/copyright.html'" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/copyright.html">Copyright © 1997</a> by <a href="javascript:if(confirm('http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/signature.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/signature.html'" tppabs="http://dictator.uwaterloo.ca/Bruno.Preiss/books/opus4/signature.html">Bruno R. Preiss, P.Eng.</a> All rights reserved.
</ADDRESS>
</BODY>
</HTML>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -