• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2<html>
3<head>
4   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5   <meta name="GENERATOR" content="Mozilla/4.77 [en] (X11; U; Linux 2.2.19 i686) [Netscape]">
6   <meta name="Author" content="Herve Bronnimann">
7   <meta name="Description" content="Small library to propose minmax_element algorithm.">
8   <title>Boost minmax library synopsis</title>
9</head>
10<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000">
11
12<center>
13<h1>
14Minmax_element complete synopsis</h1></center>
15
16<h3>
17Synopsis of <tt>&lt;boost/algorithm/minmax.hpp></tt></h3>
18
19<pre>#include &lt;boost/tuple/tuple.hpp>
20
21namespace boost {
22
23  template &lt;class T>
24  tuple&lt;T const&amp;, T const&amp;> >
25  minmax(const T&amp; a, const T&amp; b);
26
27  template &lt;class T, class <a href="https://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>>
28  tuple&lt;T const&amp;, T const&amp;> >
29  minmax(const T&amp; a, const T&amp; b, BinaryPredicate comp);
30
31}
32</pre>
33
34<h3>
35Synopsis of <tt>&lt;boost/algorithm/minmax_element.hpp></tt></h3>
36
37<pre>#include &lt;utility> //for std::pair
38
39namespace boost {
40
41  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>>
42  std::pair&lt;ForwardIterator,ForwardIterator>
43  minmax_element(ForwardIterator first, ForwardIterator last);
44
45  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="https://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>>
46  std::pair&lt;ForwardIterator,ForwardIterator>
47  minmax_element(ForwardIterator first, ForwardIterator last,
48                 BinaryPredicate comp);
49
50  // Variants
51
52  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>>
53  ForwardIterator first_min_element(ForwardIterator first, ForwardIterator last);
54
55  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="https://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>>
56  ForwardIterator first_min_element(ForwardIterator first, ForwardIterator last,
57                                    BinaryPredicate comp);
58
59  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>>
60  ForwardIterator last_min_element(ForwardIterator first, ForwardIterator last);
61
62  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="https://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>>
63  ForwardIterator last_min_element(ForwardIterator first, ForwardIterator last,
64                                   BinaryPredicate comp);
65
66  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>>
67  ForwardIterator first_max_element(ForwardIterator first, ForwardIterator last);
68
69  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="https://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>>
70  ForwardIterator first_max_element(ForwardIterator first, ForwardIterator last,
71                                    BinaryPredicate comp);
72
73  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>>
74  ForwardIterator last_max_element(ForwardIterator first, ForwardIterator last);
75
76  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="https://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>>
77  ForwardIterator last_max_element(ForwardIterator first, ForwardIterator last,
78                                   BinaryPredicate comp);
79
80  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>>
81  std::pair&lt;ForwardIterator,ForwardIterator>
82  first_min_first_max_element(ForwardIterator first, ForwardIterator last);
83
84  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="https://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>>
85  std::pair&lt;ForwardIterator,ForwardIterator>
86  first_min_first_max_element(ForwardIterator first, ForwardIterator last,
87                             BinaryPredicate comp);
88
89  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>>
90  std::pair&lt;ForwardIterator,ForwardIterator>
91  first_min_last_max_element(ForwardIterator first, ForwardIterator last);
92
93  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="https://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>>
94  std::pair&lt;ForwardIterator,ForwardIterator>
95  first_min_last_max_element(ForwardIterator first, ForwardIterator last,
96                             BinaryPredicate comp);
97
98  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>>
99  std::pair&lt;ForwardIterator,ForwardIterator>
100  last_min_first_max_element(ForwardIterator first, ForwardIterator last);
101
102  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="https://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>>
103  std::pair&lt;ForwardIterator,ForwardIterator>
104  last_min_first_max_element(ForwardIterator first, ForwardIterator last,
105                             BinaryPredicate comp);
106
107  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>>
108  std::pair&lt;ForwardIterator,ForwardIterator>
109  last_min_last_max_element(ForwardIterator first, ForwardIterator last);
110
111  template &lt;class <a href="https://www.boost.org/sgi/stl/ForwardIterator.html">ForwardIterator</a>, class <a href="https://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>>
112  std::pair&lt;ForwardIterator,ForwardIterator>
113  last_min_last_max_element(ForwardIterator first, ForwardIterator last,
114                            BinaryPredicate comp);
115
116}</pre>
117
118<hr SIZE="6">
119<br>Last modified 2002-07-01
120<p><font face="Arial,Helvetica"><font size=-1>&copy; Copyright Herv&eacute;
121Br&ouml;nnimann, Polytechnic University, 2002--2004.
122Use, modification, and distribution is subject to the Boost Software
123License, Version 1.0. (See accompanying file <a href="../../../../LICENSE_1_0.txt">License_1_0.txt</a> or copy at
124<a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)
125</font></font>
126</body>
127</html>
128