Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 39476 invoked from network); 7 Apr 2009 22:47:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Apr 2009 22:47:19 -0000 Received: (qmail 77291 invoked by uid 500); 7 Apr 2009 22:47:19 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 77261 invoked by uid 500); 7 Apr 2009 22:47:19 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 77252 invoked by uid 99); 7 Apr 2009 22:47:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2009 22:47:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2009 22:47:18 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BAF5523889C4; Tue, 7 Apr 2009 22:46:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r763021 - /stdcxx/trunk/doc/stdlibug/14-3.html Date: Tue, 07 Apr 2009 22:46:58 -0000 To: commits@stdcxx.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090407224658.BAF5523889C4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebor Date: Tue Apr 7 22:46:58 2009 New Revision: 763021 URL: http://svn.apache.org/viewvc?rev=763021&view=rev Log: 2009-04-07 Martin Sebor STDCXX-1033 * doc/stdlibug/14-3.html: Corrected a typo. Modified: stdcxx/trunk/doc/stdlibug/14-3.html (contents, props changed) Modified: stdcxx/trunk/doc/stdlibug/14-3.html URL: http://svn.apache.org/viewvc/stdcxx/trunk/doc/stdlibug/14-3.html?rev=763021&r1=763020&r2=763021&view=diff ============================================================================== --- stdcxx/trunk/doc/stdlibug/14-3.html (original) +++ stdcxx/trunk/doc/stdlibug/14-3.html Tue Apr 7 22:46:58 2009 @@ -44,8 +44,8 @@ [, Compare ] ); } -

Following the call on std::nth_element(), the nth largest value is copied into the position denoted by the middle iterator. The region between the first iterator and the middle iterator will have values no larger than the nth element, while the region between the middle iterator and the end will hold values no smaller than the nth element.

-

The example program illustrates finding the fifth largest value in a vector of random numbers.

+

Following the call on std::nth_element(), the nth smallest value (as determined by the optional Compare predicate, or by std::less, when none is specified) is copied into the position denoted by the middle iterator. The region between the first iterator and the middle iterator will have values no larger than the nth element, while the region between the middle iterator and the end will hold values no smaller than the nth element.

+

The example program illustrates finding the fifth smallest value in a vector of random numbers.

    @@ -57,11 +57,11 @@
       std::vector<int> aVec(10);
       std::generate(aVec.begin(), aVec.end(), randomValue);
     
    -  // now find the 5th largest
    +  // now find the 5th smallest value
       std::vector<int>::iterator nth = aVec.begin() + 4;
       std::nth_element(aVec.begin(), nth, aVec.end());
     
    -  std::cout << "fifth largest is " << *nth << std::endl;
    +  std::cout << "fifth smallest is " << *nth << std::endl;
     }
     
Propchange: stdcxx/trunk/doc/stdlibug/14-3.html ------------------------------------------------------------------------------ svn:mergeinfo = /stdcxx/branches/4.2.x/doc/stdlibug/14-3.html:763018