libstdc++
bits/algorithmfwd.h
Go to the documentation of this file.
1 // <algorithm> declarations -*- C++ -*-
2 
3 // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
4 //
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 3, or (at your option)
9 // any later version.
10 
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 
16 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
19 
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
24 
25 /** @file bits/algorithmfwd.h
26  * This is an internal header file, included by other library headers.
27  * Do not attempt to use it directly. @headername{algorithm}
28  */
29 
30 #ifndef _GLIBCXX_ALGORITHMFWD_H
31 #define _GLIBCXX_ALGORITHMFWD_H 1
32 
33 #pragma GCC system_header
34 
35 #include <bits/c++config.h>
36 #include <bits/stl_pair.h>
38 #include <initializer_list>
39 
40 namespace std _GLIBCXX_VISIBILITY(default)
41 {
42 _GLIBCXX_BEGIN_NAMESPACE_VERSION
43 
44  /*
45  adjacent_find
46  all_of (C++0x)
47  any_of (C++0x)
48  binary_search
49  copy
50  copy_backward
51  copy_if (C++0x)
52  copy_n (C++0x)
53  count
54  count_if
55  equal
56  equal_range
57  fill
58  fill_n
59  find
60  find_end
61  find_first_of
62  find_if
63  find_if_not (C++0x)
64  for_each
65  generate
66  generate_n
67  includes
68  inplace_merge
69  is_heap (C++0x)
70  is_heap_until (C++0x)
71  is_partitioned (C++0x)
72  is_sorted (C++0x)
73  is_sorted_until (C++0x)
74  iter_swap
75  lexicographical_compare
76  lower_bound
77  make_heap
78  max
79  max_element
80  merge
81  min
82  min_element
83  minmax (C++0x)
84  minmax_element (C++0x)
85  mismatch
86  next_permutation
87  none_of (C++0x)
88  nth_element
89  partial_sort
90  partial_sort_copy
91  partition
92  partition_copy (C++0x)
93  partition_point (C++0x)
94  pop_heap
95  prev_permutation
96  push_heap
97  random_shuffle
98  remove
99  remove_copy
100  remove_copy_if
101  remove_if
102  replace
103  replace_copy
104  replace_copy_if
105  replace_if
106  reverse
107  reverse_copy
108  rotate
109  rotate_copy
110  search
111  search_n
112  set_difference
113  set_intersection
114  set_symmetric_difference
115  set_union
116  shuffle (C++0x)
117  sort
118  sort_heap
119  stable_partition
120  stable_sort
121  swap
122  swap_ranges
123  transform
124  unique
125  unique_copy
126  upper_bound
127  */
128 
129  /**
130  * @defgroup algorithms Algorithms
131  *
132  * Components for performing algorithmic operations. Includes
133  * non-modifying sequence, modifying (mutating) sequence, sorting,
134  * searching, merge, partition, heap, set, minima, maxima, and
135  * permutation operations.
136  */
137 
138  /**
139  * @defgroup mutating_algorithms Mutating
140  * @ingroup algorithms
141  */
142 
143  /**
144  * @defgroup non_mutating_algorithms Non-Mutating
145  * @ingroup algorithms
146  */
147 
148  /**
149  * @defgroup sorting_algorithms Sorting
150  * @ingroup algorithms
151  */
152 
153  /**
154  * @defgroup set_algorithms Set Operation
155  * @ingroup sorting_algorithms
156  *
157  * These algorithms are common set operations performed on sequences
158  * that are already sorted. The number of comparisons will be
159  * linear.
160  */
161 
162  /**
163  * @defgroup binary_search_algorithms Binary Search
164  * @ingroup sorting_algorithms
165  *
166  * These algorithms are variations of a classic binary search, and
167  * all assume that the sequence being searched is already sorted.
168  *
169  * The number of comparisons will be logarithmic (and as few as
170  * possible). The number of steps through the sequence will be
171  * logarithmic for random-access iterators (e.g., pointers), and
172  * linear otherwise.
173  *
174  * The LWG has passed Defect Report 270, which notes: <em>The
175  * proposed resolution reinterprets binary search. Instead of
176  * thinking about searching for a value in a sorted range, we view
177  * that as an important special case of a more general algorithm:
178  * searching for the partition point in a partitioned range. We
179  * also add a guarantee that the old wording did not: we ensure that
180  * the upper bound is no earlier than the lower bound, that the pair
181  * returned by equal_range is a valid range, and that the first part
182  * of that pair is the lower bound.</em>
183  *
184  * The actual effect of the first sentence is that a comparison
185  * functor passed by the user doesn't necessarily need to induce a
186  * strict weak ordering relation. Rather, it partitions the range.
187  */
188 
189  // adjacent_find
190 
191 #ifdef __GXX_EXPERIMENTAL_CXX0X__
192  template<typename _IIter, typename _Predicate>
193  bool
194  all_of(_IIter, _IIter, _Predicate);
195 
196  template<typename _IIter, typename _Predicate>
197  bool
198  any_of(_IIter, _IIter, _Predicate);
199 #endif
200 
201  template<typename _FIter, typename _Tp>
202  bool
203  binary_search(_FIter, _FIter, const _Tp&);
204 
205  template<typename _FIter, typename _Tp, typename _Compare>
206  bool
207  binary_search(_FIter, _FIter, const _Tp&, _Compare);
208 
209  template<typename _IIter, typename _OIter>
210  _OIter
211  copy(_IIter, _IIter, _OIter);
212 
213  template<typename _BIter1, typename _BIter2>
214  _BIter2
215  copy_backward(_BIter1, _BIter1, _BIter2);
216 
217 #ifdef __GXX_EXPERIMENTAL_CXX0X__
218  template<typename _IIter, typename _OIter, typename _Predicate>
219  _OIter
220  copy_if(_IIter, _IIter, _OIter, _Predicate);
221 
222  template<typename _IIter, typename _Size, typename _OIter>
223  _OIter
224  copy_n(_IIter, _Size, _OIter);
225 #endif
226 
227  // count
228  // count_if
229 
230  template<typename _FIter, typename _Tp>
231  pair<_FIter, _FIter>
232  equal_range(_FIter, _FIter, const _Tp&);
233 
234  template<typename _FIter, typename _Tp, typename _Compare>
235  pair<_FIter, _FIter>
236  equal_range(_FIter, _FIter, const _Tp&, _Compare);
237 
238  template<typename _FIter, typename _Tp>
239  void
240  fill(_FIter, _FIter, const _Tp&);
241 
242  template<typename _OIter, typename _Size, typename _Tp>
243  _OIter
244  fill_n(_OIter, _Size, const _Tp&);
245 
246  // find
247 
248  template<typename _FIter1, typename _FIter2>
249  _FIter1
250  find_end(_FIter1, _FIter1, _FIter2, _FIter2);
251 
252  template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
253  _FIter1
254  find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
255 
256  // find_first_of
257  // find_if
258 
259 #ifdef __GXX_EXPERIMENTAL_CXX0X__
260  template<typename _IIter, typename _Predicate>
261  _IIter
262  find_if_not(_IIter, _IIter, _Predicate);
263 #endif
264 
265  // for_each
266  // generate
267  // generate_n
268 
269  template<typename _IIter1, typename _IIter2>
270  bool
271  includes(_IIter1, _IIter1, _IIter2, _IIter2);
272 
273  template<typename _IIter1, typename _IIter2, typename _Compare>
274  bool
275  includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
276 
277  template<typename _BIter>
278  void
279  inplace_merge(_BIter, _BIter, _BIter);
280 
281  template<typename _BIter, typename _Compare>
282  void
283  inplace_merge(_BIter, _BIter, _BIter, _Compare);
284 
285 #ifdef __GXX_EXPERIMENTAL_CXX0X__
286  template<typename _RAIter>
287  bool
288  is_heap(_RAIter, _RAIter);
289 
290  template<typename _RAIter, typename _Compare>
291  bool
292  is_heap(_RAIter, _RAIter, _Compare);
293 
294  template<typename _RAIter>
295  _RAIter
296  is_heap_until(_RAIter, _RAIter);
297 
298  template<typename _RAIter, typename _Compare>
299  _RAIter
300  is_heap_until(_RAIter, _RAIter, _Compare);
301 
302  template<typename _IIter, typename _Predicate>
303  bool
304  is_partitioned(_IIter, _IIter, _Predicate);
305 
306  template<typename _FIter1, typename _FIter2>
307  bool
308  is_permutation(_FIter1, _FIter1, _FIter2);
309 
310  template<typename _FIter1, typename _FIter2,
311  typename _BinaryPredicate>
312  bool
313  is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate);
314 
315  template<typename _FIter>
316  bool
317  is_sorted(_FIter, _FIter);
318 
319  template<typename _FIter, typename _Compare>
320  bool
321  is_sorted(_FIter, _FIter, _Compare);
322 
323  template<typename _FIter>
324  _FIter
325  is_sorted_until(_FIter, _FIter);
326 
327  template<typename _FIter, typename _Compare>
328  _FIter
329  is_sorted_until(_FIter, _FIter, _Compare);
330 #endif
331 
332  template<typename _FIter1, typename _FIter2>
333  void
334  iter_swap(_FIter1, _FIter2);
335 
336  template<typename _FIter, typename _Tp>
337  _FIter
338  lower_bound(_FIter, _FIter, const _Tp&);
339 
340  template<typename _FIter, typename _Tp, typename _Compare>
341  _FIter
342  lower_bound(_FIter, _FIter, const _Tp&, _Compare);
343 
344  template<typename _RAIter>
345  void
346  make_heap(_RAIter, _RAIter);
347 
348  template<typename _RAIter, typename _Compare>
349  void
350  make_heap(_RAIter, _RAIter, _Compare);
351 
352  template<typename _Tp>
353  const _Tp&
354  max(const _Tp&, const _Tp&);
355 
356  template<typename _Tp, typename _Compare>
357  const _Tp&
358  max(const _Tp&, const _Tp&, _Compare);
359 
360  // max_element
361  // merge
362 
363  template<typename _Tp>
364  const _Tp&
365  min(const _Tp&, const _Tp&);
366 
367  template<typename _Tp, typename _Compare>
368  const _Tp&
369  min(const _Tp&, const _Tp&, _Compare);
370 
371  // min_element
372 
373 #ifdef __GXX_EXPERIMENTAL_CXX0X__
374  template<typename _Tp>
375  pair<const _Tp&, const _Tp&>
376  minmax(const _Tp&, const _Tp&);
377 
378  template<typename _Tp, typename _Compare>
379  pair<const _Tp&, const _Tp&>
380  minmax(const _Tp&, const _Tp&, _Compare);
381 
382  template<typename _FIter>
383  pair<_FIter, _FIter>
384  minmax_element(_FIter, _FIter);
385 
386  template<typename _FIter, typename _Compare>
387  pair<_FIter, _FIter>
388  minmax_element(_FIter, _FIter, _Compare);
389 
390  template<typename _Tp>
391  _Tp
392  min(initializer_list<_Tp>);
393 
394  template<typename _Tp, typename _Compare>
395  _Tp
396  min(initializer_list<_Tp>, _Compare);
397 
398  template<typename _Tp>
399  _Tp
400  max(initializer_list<_Tp>);
401 
402  template<typename _Tp, typename _Compare>
403  _Tp
404  max(initializer_list<_Tp>, _Compare);
405 
406  template<typename _Tp>
407  pair<_Tp, _Tp>
408  minmax(initializer_list<_Tp>);
409 
410  template<typename _Tp, typename _Compare>
411  pair<_Tp, _Tp>
412  minmax(initializer_list<_Tp>, _Compare);
413 #endif
414 
415  // mismatch
416 
417  template<typename _BIter>
418  bool
419  next_permutation(_BIter, _BIter);
420 
421  template<typename _BIter, typename _Compare>
422  bool
423  next_permutation(_BIter, _BIter, _Compare);
424 
425 #ifdef __GXX_EXPERIMENTAL_CXX0X__
426  template<typename _IIter, typename _Predicate>
427  bool
428  none_of(_IIter, _IIter, _Predicate);
429 #endif
430 
431  // nth_element
432  // partial_sort
433 
434  template<typename _IIter, typename _RAIter>
435  _RAIter
436  partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter);
437 
438  template<typename _IIter, typename _RAIter, typename _Compare>
439  _RAIter
440  partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare);
441 
442  // partition
443 
444 #ifdef __GXX_EXPERIMENTAL_CXX0X__
445  template<typename _IIter, typename _OIter1,
446  typename _OIter2, typename _Predicate>
447  pair<_OIter1, _OIter2>
448  partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate);
449 
450  template<typename _FIter, typename _Predicate>
451  _FIter
452  partition_point(_FIter, _FIter, _Predicate);
453 #endif
454 
455  template<typename _RAIter>
456  void
457  pop_heap(_RAIter, _RAIter);
458 
459  template<typename _RAIter, typename _Compare>
460  void
461  pop_heap(_RAIter, _RAIter, _Compare);
462 
463  template<typename _BIter>
464  bool
465  prev_permutation(_BIter, _BIter);
466 
467  template<typename _BIter, typename _Compare>
468  bool
469  prev_permutation(_BIter, _BIter, _Compare);
470 
471  template<typename _RAIter>
472  void
473  push_heap(_RAIter, _RAIter);
474 
475  template<typename _RAIter, typename _Compare>
476  void
477  push_heap(_RAIter, _RAIter, _Compare);
478 
479  // random_shuffle
480 
481  template<typename _FIter, typename _Tp>
482  _FIter
483  remove(_FIter, _FIter, const _Tp&);
484 
485  template<typename _FIter, typename _Predicate>
486  _FIter
487  remove_if(_FIter, _FIter, _Predicate);
488 
489  template<typename _IIter, typename _OIter, typename _Tp>
490  _OIter
491  remove_copy(_IIter, _IIter, _OIter, const _Tp&);
492 
493  template<typename _IIter, typename _OIter, typename _Predicate>
494  _OIter
495  remove_copy_if(_IIter, _IIter, _OIter, _Predicate);
496 
497  // replace
498 
499  template<typename _IIter, typename _OIter, typename _Tp>
500  _OIter
501  replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&);
502 
503  template<typename _Iter, typename _OIter, typename _Predicate, typename _Tp>
504  _OIter
505  replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&);
506 
507  // replace_if
508 
509  template<typename _BIter>
510  void
511  reverse(_BIter, _BIter);
512 
513  template<typename _BIter, typename _OIter>
514  _OIter
515  reverse_copy(_BIter, _BIter, _OIter);
516 
517  template<typename _FIter>
518  void
519  rotate(_FIter, _FIter, _FIter);
520 
521  template<typename _FIter, typename _OIter>
522  _OIter
523  rotate_copy(_FIter, _FIter, _FIter, _OIter);
524 
525  // search
526  // search_n
527  // set_difference
528  // set_intersection
529  // set_symmetric_difference
530  // set_union
531 
532 #if defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
533  template<typename _RAIter, typename _UGenerator>
534  void
535  shuffle(_RAIter, _RAIter, _UGenerator&&);
536 #endif
537 
538  template<typename _RAIter>
539  void
540  sort_heap(_RAIter, _RAIter);
541 
542  template<typename _RAIter, typename _Compare>
543  void
544  sort_heap(_RAIter, _RAIter, _Compare);
545 
546  template<typename _BIter, typename _Predicate>
547  _BIter
548  stable_partition(_BIter, _BIter, _Predicate);
549 
550  template<typename _Tp>
551  void
552  swap(_Tp&, _Tp&);
553 
554  template<typename _Tp, size_t _Nm>
555  void
556  swap(_Tp (&)[_Nm], _Tp (&)[_Nm]);
557 
558  template<typename _FIter1, typename _FIter2>
559  _FIter2
560  swap_ranges(_FIter1, _FIter1, _FIter2);
561 
562  // transform
563 
564  template<typename _FIter>
565  _FIter
566  unique(_FIter, _FIter);
567 
568  template<typename _FIter, typename _BinaryPredicate>
569  _FIter
570  unique(_FIter, _FIter, _BinaryPredicate);
571 
572  // unique_copy
573 
574  template<typename _FIter, typename _Tp>
575  _FIter
576  upper_bound(_FIter, _FIter, const _Tp&);
577 
578  template<typename _FIter, typename _Tp, typename _Compare>
579  _FIter
580  upper_bound(_FIter, _FIter, const _Tp&, _Compare);
581 
582 _GLIBCXX_END_NAMESPACE_VERSION
583 
584 _GLIBCXX_BEGIN_NAMESPACE_ALGO
585 
586  template<typename _FIter>
587  _FIter
588  adjacent_find(_FIter, _FIter);
589 
590  template<typename _FIter, typename _BinaryPredicate>
591  _FIter
592  adjacent_find(_FIter, _FIter, _BinaryPredicate);
593 
594  template<typename _IIter, typename _Tp>
595  typename iterator_traits<_IIter>::difference_type
596  count(_IIter, _IIter, const _Tp&);
597 
598  template<typename _IIter, typename _Predicate>
599  typename iterator_traits<_IIter>::difference_type
600  count_if(_IIter, _IIter, _Predicate);
601 
602  template<typename _IIter1, typename _IIter2>
603  bool
604  equal(_IIter1, _IIter1, _IIter2);
605 
606  template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
607  bool
608  equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
609 
610  template<typename _IIter, typename _Tp>
611  _IIter
612  find(_IIter, _IIter, const _Tp&);
613 
614  template<typename _FIter1, typename _FIter2>
615  _FIter1
616  find_first_of(_FIter1, _FIter1, _FIter2, _FIter2);
617 
618  template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
619  _FIter1
620  find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
621 
622  template<typename _IIter, typename _Predicate>
623  _IIter
624  find_if(_IIter, _IIter, _Predicate);
625 
626  template<typename _IIter, typename _Funct>
627  _Funct
628  for_each(_IIter, _IIter, _Funct);
629 
630  template<typename _FIter, typename _Generator>
631  void
632  generate(_FIter, _FIter, _Generator);
633 
634  template<typename _OIter, typename _Size, typename _Generator>
635  _OIter
636  generate_n(_OIter, _Size, _Generator);
637 
638  template<typename _IIter1, typename _IIter2>
639  bool
640  lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
641 
642  template<typename _IIter1, typename _IIter2, typename _Compare>
643  bool
644  lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
645 
646  template<typename _FIter>
647  _FIter
648  max_element(_FIter, _FIter);
649 
650  template<typename _FIter, typename _Compare>
651  _FIter
652  max_element(_FIter, _FIter, _Compare);
653 
654  template<typename _IIter1, typename _IIter2, typename _OIter>
655  _OIter
656  merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
657 
658  template<typename _IIter1, typename _IIter2, typename _OIter,
659  typename _Compare>
660  _OIter
661  merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
662 
663  template<typename _FIter>
664  _FIter
665  min_element(_FIter, _FIter);
666 
667  template<typename _FIter, typename _Compare>
668  _FIter
669  min_element(_FIter, _FIter, _Compare);
670 
671  template<typename _IIter1, typename _IIter2>
672  pair<_IIter1, _IIter2>
673  mismatch(_IIter1, _IIter1, _IIter2);
674 
675  template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
676  pair<_IIter1, _IIter2>
677  mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
678 
679  template<typename _RAIter>
680  void
681  nth_element(_RAIter, _RAIter, _RAIter);
682 
683  template<typename _RAIter, typename _Compare>
684  void
685  nth_element(_RAIter, _RAIter, _RAIter, _Compare);
686 
687  template<typename _RAIter>
688  void
689  partial_sort(_RAIter, _RAIter, _RAIter);
690 
691  template<typename _RAIter, typename _Compare>
692  void
693  partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
694 
695  template<typename _BIter, typename _Predicate>
696  _BIter
697  partition(_BIter, _BIter, _Predicate);
698 
699  template<typename _RAIter>
700  void
701  random_shuffle(_RAIter, _RAIter);
702 
703  template<typename _RAIter, typename _Generator>
704  void
705  random_shuffle(_RAIter, _RAIter,
706 #ifdef __GXX_EXPERIMENTAL_CXX0X__
707  _Generator&&);
708 #else
709  _Generator&);
710 #endif
711 
712  template<typename _FIter, typename _Tp>
713  void
714  replace(_FIter, _FIter, const _Tp&, const _Tp&);
715 
716  template<typename _FIter, typename _Predicate, typename _Tp>
717  void
718  replace_if(_FIter, _FIter, _Predicate, const _Tp&);
719 
720  template<typename _FIter1, typename _FIter2>
721  _FIter1
722  search(_FIter1, _FIter1, _FIter2, _FIter2);
723 
724  template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
725  _FIter1
726  search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
727 
728  template<typename _FIter, typename _Size, typename _Tp>
729  _FIter
730  search_n(_FIter, _FIter, _Size, const _Tp&);
731 
732  template<typename _FIter, typename _Size, typename _Tp,
733  typename _BinaryPredicate>
734  _FIter
735  search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate);
736 
737  template<typename _IIter1, typename _IIter2, typename _OIter>
738  _OIter
739  set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
740 
741  template<typename _IIter1, typename _IIter2, typename _OIter,
742  typename _Compare>
743  _OIter
744  set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
745 
746  template<typename _IIter1, typename _IIter2, typename _OIter>
747  _OIter
748  set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
749 
750  template<typename _IIter1, typename _IIter2, typename _OIter,
751  typename _Compare>
752  _OIter
753  set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
754 
755  template<typename _IIter1, typename _IIter2, typename _OIter>
756  _OIter
757  set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
758 
759  template<typename _IIter1, typename _IIter2, typename _OIter,
760  typename _Compare>
761  _OIter
762  set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2,
763  _OIter, _Compare);
764 
765  template<typename _IIter1, typename _IIter2, typename _OIter>
766  _OIter
767  set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
768 
769  template<typename _IIter1, typename _IIter2, typename _OIter,
770  typename _Compare>
771  _OIter
772  set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
773 
774  template<typename _RAIter>
775  void
776  sort(_RAIter, _RAIter);
777 
778  template<typename _RAIter, typename _Compare>
779  void
780  sort(_RAIter, _RAIter, _Compare);
781 
782  template<typename _RAIter>
783  void
784  stable_sort(_RAIter, _RAIter);
785 
786  template<typename _RAIter, typename _Compare>
787  void
788  stable_sort(_RAIter, _RAIter, _Compare);
789 
790  template<typename _IIter, typename _OIter, typename _UnaryOperation>
791  _OIter
792  transform(_IIter, _IIter, _OIter, _UnaryOperation);
793 
794  template<typename _IIter1, typename _IIter2, typename _OIter,
795  typename _BinaryOperation>
796  _OIter
797  transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation);
798 
799  template<typename _IIter, typename _OIter>
800  _OIter
801  unique_copy(_IIter, _IIter, _OIter);
802 
803  template<typename _IIter, typename _OIter, typename _BinaryPredicate>
804  _OIter
805  unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate);
806 
807 _GLIBCXX_END_NAMESPACE_ALGO
808 } // namespace std
809 
810 #ifdef _GLIBCXX_PARALLEL
811 # include <parallel/algorithmfwd.h>
812 #endif
813 
814 #endif
815 
pair< _InputIterator, _OutputIterator > copy_n(_InputIterator __first, _Size __count, _OutputIterator __result)
Copies the range [first,first+count) into [result,result+count).
Definition: ext/algorithm:122
const _Tp & max(const _Tp &, const _Tp &)
This does what you think it does.
Definition: stl_algobase.h:210
pair< const _Tp &, const _Tp & > minmax(const _Tp &, const _Tp &)
Determines min and max at once as an ordered pair.
Definition: stl_algo.h:4004
size_t count() const
Returns the number of bits which are set.
Definition: bitset:1270
const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
Definition: stl_algobase.h:187