<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Mozilla/4.77 [en] (X11; U; Linux 2.2.19 i686) [Netscape]"> <meta name="Author" content="Herve Bronnimann"> <meta name="Description" content="Small library to propose minmax_element algorithm."> <title>Boost minmax library synopsis</title> </head> <body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000"> <center> <h1> Minmax_element complete synopsis</h1></center> <h3> Synopsis of <tt><boost/algorithm/minmax.hpp></tt></h3> <pre>#include <boost/tuple/tuple.hpp> namespace boost { template <class T> tuple<T const&, T const&> > minmax(const T& a, const T& b); template <class T, class <a href="http://www.sgi.com/tech/stl/ BinaryPredicate.html">BinaryPredicate</a>> tuple<T const&, T const&> > minmax(const T& a, const T& b, BinaryPredicate comp); } </pre> <h3> Synopsis of <tt><boost/algorithm/minmax_element.hpp></tt></h3> <pre>#include <utility> //for std::pair namespace boost { template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>> std::pair<ForwardIterator,ForwardIterator> minmax_element(ForwardIterator first, ForwardIterator last); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">BinaryPredicate</a>> std::pair<ForwardIterator,ForwardIterator> minmax_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); // Variants template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>> ForwardIterator first_min_element(ForwardIterator first, ForwardIterator last); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">BinaryPredicate</a>> ForwardIterator first_min_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>> ForwardIterator last_min_element(ForwardIterator first, ForwardIterator last); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">BinaryPredicate</a>> ForwardIterator last_min_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>> ForwardIterator first_max_element(ForwardIterator first, ForwardIterator last); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">BinaryPredicate</a>> ForwardIterator first_max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>> ForwardIterator last_max_element(ForwardIterator first, ForwardIterator last); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">BinaryPredicate</a>> ForwardIterator last_max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>> std::pair<ForwardIterator,ForwardIterator> first_min_first_max_element(ForwardIterator first, ForwardIterator last); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">BinaryPredicate</a>> std::pair<ForwardIterator,ForwardIterator> first_min_first_max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>> std::pair<ForwardIterator,ForwardIterator> first_min_last_max_element(ForwardIterator first, ForwardIterator last); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">BinaryPredicate</a>> std::pair<ForwardIterator,ForwardIterator> first_min_last_max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>> std::pair<ForwardIterator,ForwardIterator> last_min_first_max_element(ForwardIterator first, ForwardIterator last); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">BinaryPredicate</a>> std::pair<ForwardIterator,ForwardIterator> last_min_first_max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>> std::pair<ForwardIterator,ForwardIterator> last_min_last_max_element(ForwardIterator first, ForwardIterator last); template <class <a href="http://www.sgi.com/tech/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">BinaryPredicate</a>> std::pair<ForwardIterator,ForwardIterator> last_min_last_max_element(ForwardIterator first, ForwardIterator last, BinaryPredicate comp); }</pre> <hr SIZE="6"> <br>Last modified 2002-07-01 <p><font face="Arial,Helvetica"><font size=-1>© Copyright Hervé Brönnimann, Polytechnic University, 2002--2004. Use, modification, and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">License_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>) </font></font> </body> </html>