stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r763020 - /stdcxx/branches/4.3.x/doc/stdlibug/14-3.html
Date Tue, 07 Apr 2009 22:46:46 GMT
Author: sebor
Date: Tue Apr  7 22:46:46 2009
New Revision: 763020

URL: http://svn.apache.org/viewvc?rev=763020&view=rev
Log:
2009-04-07  Martin Sebor  <sebor@apache.org>

	STDCXX-1033
	* doc/stdlibug/14-3.html: Corrected a typo.

Modified:
    stdcxx/branches/4.3.x/doc/stdlibug/14-3.html   (contents, props changed)

Modified: stdcxx/branches/4.3.x/doc/stdlibug/14-3.html
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/doc/stdlibug/14-3.html?rev=763020&r1=763019&r2=763020&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/doc/stdlibug/14-3.html (original)
+++ stdcxx/branches/4.3.x/doc/stdlibug/14-3.html Tue Apr  7 22:46:46 2009
@@ -44,8 +44,8 @@
                    [, Compare ] );
 }
 </PRE></UL>
-<P>Following the call on <SAMP>std::nth_element()</SAMP>, the nth largest
value is copied into the position denoted by the middle <B><I><A HREF="../stdlibref/iterator.html">iterator</A></I></B>.
The region between the first <B><I>iterator</I></B> and the middle
iterator will have values no larger than the nth element, while the region between the middle
<B><I>iterator</I></B> and the end will hold values no smaller than
the nth element.</P>
-<P>The example program illustrates finding the fifth largest value in a <B><I><A
HREF="../stdlibref/vector.html">vector</A></I></B> of random numbers.</P>
+<P>Following the call on <SAMP>std::nth_element()</SAMP>, the nth smallest
value (as determined by the optional <SAMP>Compare</SAMP> predicate, or by <SAMP>std::less</SAMP>,
when none is specified) is copied into the position denoted by the middle <B><I><A
HREF="../stdlibref/iterator.html">iterator</A></I></B>. The region between
the first <B><I>iterator</I></B> and the middle iterator will have
values no larger than the nth element, while the region between the middle <B><I>iterator</I></B>
and the end will hold values no smaller than the nth element.</P>
+<P>The example program illustrates finding the fifth smallest value in a <B><I><A
HREF="../stdlibref/vector.html">vector</A></I></B> of random numbers.</P>
 
 <A NAME="idx355"><!></A>
 <UL><PRE>
@@ -57,11 +57,11 @@
   std::vector&lt;int&gt; aVec(10);
   std::generate(aVec.begin(), aVec.end(), randomValue);
 
-  // now find the 5th largest
+  // now find the 5th smallest value
   std::vector&lt;int&gt;::iterator nth = aVec.begin() + 4;
   std::nth_element(aVec.begin(), nth, aVec.end());
 
-  std::cout &lt;&lt; "fifth largest is " &lt;&lt; *nth &lt;&lt; std::endl;
+  std::cout &lt;&lt; "fifth smallest is " &lt;&lt; *nth &lt;&lt;
std::endl;
 }
 </PRE></UL>
 

Propchange: stdcxx/branches/4.3.x/doc/stdlibug/14-3.html
------------------------------------------------------------------------------
    svn:mergeinfo = /stdcxx/branches/4.2.x/doc/stdlibug/14-3.html:763018



Mime
View raw message