libstdc++
algorithmfwd.h
Go to the documentation of this file.
00001 // <algorithm> Forward declarations  -*- C++ -*-
00002 
00003 // Copyright (C) 2007-2019 Free Software Foundation, Inc.
00004 //
00005 // This file is part of the GNU ISO C++ Library.  This library is free
00006 // software; you can redistribute it and/or modify it under the
00007 // terms of the GNU General Public License as published by the
00008 // Free Software Foundation; either version 3, or (at your option)
00009 // any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 
00016 // Under Section 7 of GPL version 3, you are granted additional
00017 // permissions described in the GCC Runtime Library Exception, version
00018 // 3.1, as published by the Free Software Foundation.
00019 
00020 // You should have received a copy of the GNU General Public License and
00021 // a copy of the GCC Runtime Library Exception along with this program;
00022 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
00023 // <http://www.gnu.org/licenses/>.
00024 
00025 /** @file bits/algorithmfwd.h
00026  *  This is an internal header file, included by other library headers.
00027  *  Do not attempt to use it directly. @headername{algorithm}
00028  */
00029 
00030 #ifndef _GLIBCXX_ALGORITHMFWD_H
00031 #define _GLIBCXX_ALGORITHMFWD_H 1
00032 
00033 #pragma GCC system_header
00034 
00035 #include <bits/c++config.h>
00036 #include <bits/stl_pair.h>
00037 #include <bits/stl_iterator_base_types.h>
00038 #if __cplusplus >= 201103L
00039 #include <initializer_list>
00040 #endif
00041 
00042 namespace std _GLIBCXX_VISIBILITY(default)
00043 {
00044 _GLIBCXX_BEGIN_NAMESPACE_VERSION
00045 
00046   /*
00047     adjacent_find
00048     all_of (C++11)
00049     any_of (C++11)
00050     binary_search
00051     clamp (C++17)
00052     copy
00053     copy_backward
00054     copy_if (C++11)
00055     copy_n (C++11)
00056     count
00057     count_if
00058     equal
00059     equal_range
00060     fill
00061     fill_n
00062     find
00063     find_end
00064     find_first_of
00065     find_if
00066     find_if_not (C++11)
00067     for_each
00068     generate
00069     generate_n
00070     includes
00071     inplace_merge
00072     is_heap (C++11)
00073     is_heap_until (C++11)
00074     is_partitioned (C++11)
00075     is_sorted (C++11)
00076     is_sorted_until (C++11)
00077     iter_swap
00078     lexicographical_compare
00079     lower_bound
00080     make_heap
00081     max
00082     max_element
00083     merge
00084     min
00085     min_element
00086     minmax (C++11)
00087     minmax_element (C++11)
00088     mismatch
00089     next_permutation
00090     none_of (C++11)
00091     nth_element
00092     partial_sort
00093     partial_sort_copy
00094     partition
00095     partition_copy (C++11)
00096     partition_point (C++11)
00097     pop_heap
00098     prev_permutation
00099     push_heap
00100     random_shuffle
00101     remove
00102     remove_copy
00103     remove_copy_if
00104     remove_if
00105     replace
00106     replace_copy
00107     replace_copy_if
00108     replace_if
00109     reverse
00110     reverse_copy
00111     rotate
00112     rotate_copy
00113     search
00114     search_n
00115     set_difference
00116     set_intersection
00117     set_symmetric_difference
00118     set_union
00119     shuffle (C++11)
00120     sort
00121     sort_heap
00122     stable_partition
00123     stable_sort
00124     swap
00125     swap_ranges
00126     transform
00127     unique
00128     unique_copy
00129     upper_bound
00130   */
00131 
00132   /**
00133    * @defgroup algorithms Algorithms
00134    *
00135    * Components for performing algorithmic operations. Includes
00136    * non-modifying sequence, modifying (mutating) sequence, sorting,
00137    * searching, merge, partition, heap, set, minima, maxima, and
00138    * permutation operations.
00139    */
00140 
00141   /**
00142    * @defgroup mutating_algorithms Mutating
00143    * @ingroup algorithms
00144    */
00145 
00146   /**
00147    * @defgroup non_mutating_algorithms Non-Mutating
00148    * @ingroup algorithms
00149    */
00150 
00151   /**
00152    * @defgroup sorting_algorithms Sorting
00153    * @ingroup algorithms
00154    */
00155 
00156   /**
00157    * @defgroup set_algorithms Set Operation
00158    * @ingroup sorting_algorithms
00159    *
00160    * These algorithms are common set operations performed on sequences
00161    * that are already sorted. The number of comparisons will be
00162    * linear.
00163    */
00164 
00165   /**
00166    * @defgroup binary_search_algorithms Binary Search
00167    * @ingroup sorting_algorithms
00168    *
00169    * These algorithms are variations of a classic binary search, and
00170    * all assume that the sequence being searched is already sorted.
00171    *
00172    * The number of comparisons will be logarithmic (and as few as
00173    * possible).  The number of steps through the sequence will be
00174    * logarithmic for random-access iterators (e.g., pointers), and
00175    * linear otherwise.
00176    *
00177    * The LWG has passed Defect Report 270, which notes: <em>The
00178    * proposed resolution reinterprets binary search. Instead of
00179    * thinking about searching for a value in a sorted range, we view
00180    * that as an important special case of a more general algorithm:
00181    * searching for the partition point in a partitioned range.  We
00182    * also add a guarantee that the old wording did not: we ensure that
00183    * the upper bound is no earlier than the lower bound, that the pair
00184    * returned by equal_range is a valid range, and that the first part
00185    * of that pair is the lower bound.</em>
00186    *
00187    * The actual effect of the first sentence is that a comparison
00188    * functor passed by the user doesn't necessarily need to induce a
00189    * strict weak ordering relation.  Rather, it partitions the range.
00190    */
00191 
00192   // adjacent_find
00193 
00194 #if __cplusplus >= 201103L
00195   template<typename _IIter, typename _Predicate>
00196     bool
00197     all_of(_IIter, _IIter, _Predicate);
00198 
00199   template<typename _IIter, typename _Predicate>
00200     bool
00201     any_of(_IIter, _IIter, _Predicate);
00202 #endif
00203 
00204   template<typename _FIter, typename _Tp>
00205     bool
00206     binary_search(_FIter, _FIter, const _Tp&);
00207 
00208   template<typename _FIter, typename _Tp, typename _Compare>
00209     bool
00210     binary_search(_FIter, _FIter, const _Tp&, _Compare);
00211 
00212 #if __cplusplus > 201402L
00213   template<typename _Tp>
00214     _GLIBCXX14_CONSTEXPR
00215     const _Tp&
00216     clamp(const _Tp&, const _Tp&, const _Tp&);
00217 
00218   template<typename _Tp, typename _Compare>
00219     _GLIBCXX14_CONSTEXPR
00220     const _Tp&
00221     clamp(const _Tp&, const _Tp&, const _Tp&, _Compare);
00222 #endif
00223 
00224   template<typename _IIter, typename _OIter>
00225     _OIter
00226     copy(_IIter, _IIter, _OIter);
00227 
00228   template<typename _BIter1, typename _BIter2>
00229     _BIter2
00230     copy_backward(_BIter1, _BIter1, _BIter2);
00231 
00232 #if __cplusplus >= 201103L
00233   template<typename _IIter, typename _OIter, typename _Predicate>
00234     _OIter
00235     copy_if(_IIter, _IIter, _OIter, _Predicate);
00236 
00237   template<typename _IIter, typename _Size, typename _OIter>
00238     _OIter
00239     copy_n(_IIter, _Size, _OIter);
00240 #endif
00241 
00242   // count
00243   // count_if
00244 
00245   template<typename _FIter, typename _Tp>
00246     pair<_FIter, _FIter>
00247     equal_range(_FIter, _FIter, const _Tp&);
00248 
00249   template<typename _FIter, typename _Tp, typename _Compare>
00250     pair<_FIter, _FIter>
00251     equal_range(_FIter, _FIter, const _Tp&, _Compare);
00252 
00253   template<typename _FIter, typename _Tp>
00254     void
00255     fill(_FIter, _FIter, const _Tp&);
00256 
00257   template<typename _OIter, typename _Size, typename _Tp>
00258     _OIter
00259     fill_n(_OIter, _Size, const _Tp&);
00260 
00261   // find
00262 
00263   template<typename _FIter1, typename _FIter2>
00264     _FIter1
00265     find_end(_FIter1, _FIter1, _FIter2, _FIter2);
00266 
00267   template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
00268     _FIter1
00269     find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
00270 
00271   // find_first_of
00272   // find_if
00273 
00274 #if __cplusplus >= 201103L
00275   template<typename _IIter, typename _Predicate>
00276     _IIter
00277     find_if_not(_IIter, _IIter, _Predicate);
00278 #endif
00279 
00280   // for_each
00281   // generate
00282   // generate_n
00283 
00284   template<typename _IIter1, typename _IIter2>
00285     bool
00286     includes(_IIter1, _IIter1, _IIter2, _IIter2);
00287 
00288   template<typename _IIter1, typename _IIter2, typename _Compare>
00289     bool
00290     includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
00291 
00292   template<typename _BIter>
00293     void
00294     inplace_merge(_BIter, _BIter, _BIter);
00295 
00296   template<typename _BIter, typename _Compare>
00297     void
00298     inplace_merge(_BIter, _BIter, _BIter, _Compare);
00299 
00300 #if __cplusplus >= 201103L
00301   template<typename _RAIter>
00302     bool
00303     is_heap(_RAIter, _RAIter);
00304 
00305   template<typename _RAIter, typename _Compare>
00306     bool
00307     is_heap(_RAIter, _RAIter, _Compare);
00308 
00309   template<typename _RAIter>
00310     _RAIter
00311     is_heap_until(_RAIter, _RAIter);
00312 
00313   template<typename _RAIter, typename _Compare>
00314     _RAIter
00315     is_heap_until(_RAIter, _RAIter, _Compare);
00316 
00317   template<typename _IIter, typename _Predicate>
00318     bool
00319     is_partitioned(_IIter, _IIter, _Predicate);
00320 
00321   template<typename _FIter1, typename _FIter2>
00322     bool
00323     is_permutation(_FIter1, _FIter1, _FIter2);
00324 
00325   template<typename _FIter1, typename _FIter2,
00326            typename _BinaryPredicate>
00327     bool
00328     is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate);
00329 
00330   template<typename _FIter>
00331     bool
00332     is_sorted(_FIter, _FIter);
00333 
00334   template<typename _FIter, typename _Compare>
00335     bool
00336     is_sorted(_FIter, _FIter, _Compare);
00337 
00338   template<typename _FIter>
00339     _FIter
00340     is_sorted_until(_FIter, _FIter);
00341 
00342   template<typename _FIter, typename _Compare>
00343     _FIter
00344     is_sorted_until(_FIter, _FIter, _Compare);
00345 #endif
00346 
00347   template<typename _FIter1, typename _FIter2>
00348     void
00349     iter_swap(_FIter1, _FIter2);
00350 
00351   template<typename _FIter, typename _Tp>
00352     _FIter
00353     lower_bound(_FIter, _FIter, const _Tp&);
00354 
00355   template<typename _FIter, typename _Tp, typename _Compare>
00356     _FIter
00357     lower_bound(_FIter, _FIter, const _Tp&, _Compare);
00358 
00359   template<typename _RAIter>
00360     void
00361     make_heap(_RAIter, _RAIter);
00362 
00363   template<typename _RAIter, typename _Compare>
00364     void
00365     make_heap(_RAIter, _RAIter, _Compare);
00366 
00367   template<typename _Tp>
00368     _GLIBCXX14_CONSTEXPR
00369     const _Tp&
00370     max(const _Tp&, const _Tp&);
00371 
00372   template<typename _Tp, typename _Compare>
00373     _GLIBCXX14_CONSTEXPR
00374     const _Tp&
00375     max(const _Tp&, const _Tp&, _Compare);
00376 
00377   // max_element
00378   // merge
00379 
00380   template<typename _Tp>
00381     _GLIBCXX14_CONSTEXPR
00382     const _Tp&
00383     min(const _Tp&, const _Tp&);
00384 
00385   template<typename _Tp, typename _Compare>
00386     _GLIBCXX14_CONSTEXPR
00387     const _Tp&
00388     min(const _Tp&, const _Tp&, _Compare);
00389 
00390   // min_element
00391 
00392 #if __cplusplus >= 201103L
00393   template<typename _Tp>
00394     _GLIBCXX14_CONSTEXPR
00395     pair<const _Tp&, const _Tp&>
00396     minmax(const _Tp&, const _Tp&);
00397 
00398   template<typename _Tp, typename _Compare>
00399     _GLIBCXX14_CONSTEXPR
00400     pair<const _Tp&, const _Tp&>
00401     minmax(const _Tp&, const _Tp&, _Compare);
00402 
00403   template<typename _FIter>
00404     _GLIBCXX14_CONSTEXPR
00405     pair<_FIter, _FIter>
00406     minmax_element(_FIter, _FIter);
00407 
00408   template<typename _FIter, typename _Compare>
00409     _GLIBCXX14_CONSTEXPR
00410     pair<_FIter, _FIter>
00411     minmax_element(_FIter, _FIter, _Compare);
00412 
00413   template<typename _Tp>
00414     _GLIBCXX14_CONSTEXPR
00415     _Tp
00416     min(initializer_list<_Tp>);
00417 
00418   template<typename _Tp, typename _Compare>
00419     _GLIBCXX14_CONSTEXPR
00420     _Tp
00421     min(initializer_list<_Tp>, _Compare);
00422 
00423   template<typename _Tp>
00424     _GLIBCXX14_CONSTEXPR
00425     _Tp
00426     max(initializer_list<_Tp>);
00427 
00428   template<typename _Tp, typename _Compare>
00429     _GLIBCXX14_CONSTEXPR
00430     _Tp
00431     max(initializer_list<_Tp>, _Compare);
00432 
00433   template<typename _Tp>
00434     _GLIBCXX14_CONSTEXPR
00435     pair<_Tp, _Tp>
00436     minmax(initializer_list<_Tp>);
00437 
00438   template<typename _Tp, typename _Compare>
00439     _GLIBCXX14_CONSTEXPR
00440     pair<_Tp, _Tp>
00441     minmax(initializer_list<_Tp>, _Compare);
00442 #endif
00443 
00444   // mismatch
00445 
00446   template<typename _BIter>
00447     bool
00448     next_permutation(_BIter, _BIter);
00449 
00450   template<typename _BIter, typename _Compare>
00451     bool
00452     next_permutation(_BIter, _BIter, _Compare);
00453 
00454 #if __cplusplus >= 201103L
00455   template<typename _IIter, typename _Predicate>
00456     bool
00457     none_of(_IIter, _IIter, _Predicate);
00458 #endif
00459 
00460   // nth_element
00461   // partial_sort
00462 
00463   template<typename _IIter, typename _RAIter>
00464     _RAIter
00465     partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter);
00466 
00467   template<typename _IIter, typename _RAIter, typename _Compare>
00468     _RAIter
00469     partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare);
00470 
00471   // partition
00472 
00473 #if __cplusplus >= 201103L
00474   template<typename _IIter, typename _OIter1,
00475            typename _OIter2, typename _Predicate>
00476     pair<_OIter1, _OIter2>
00477     partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate);
00478 
00479   template<typename _FIter, typename _Predicate>
00480     _FIter
00481     partition_point(_FIter, _FIter, _Predicate);
00482 #endif
00483 
00484   template<typename _RAIter>
00485     void
00486     pop_heap(_RAIter, _RAIter);
00487 
00488   template<typename _RAIter, typename _Compare>
00489     void
00490     pop_heap(_RAIter, _RAIter, _Compare);
00491 
00492   template<typename _BIter>
00493     bool
00494     prev_permutation(_BIter, _BIter);
00495 
00496   template<typename _BIter, typename _Compare>
00497     bool
00498     prev_permutation(_BIter, _BIter, _Compare);
00499 
00500   template<typename _RAIter>
00501     void
00502     push_heap(_RAIter, _RAIter);
00503 
00504   template<typename _RAIter, typename _Compare>
00505     void
00506     push_heap(_RAIter, _RAIter, _Compare);
00507 
00508   // random_shuffle
00509 
00510   template<typename _FIter, typename _Tp>
00511     _FIter
00512     remove(_FIter, _FIter, const _Tp&);
00513 
00514   template<typename _FIter, typename _Predicate>
00515     _FIter
00516     remove_if(_FIter, _FIter, _Predicate);
00517 
00518   template<typename _IIter, typename _OIter, typename _Tp>
00519     _OIter
00520     remove_copy(_IIter, _IIter, _OIter, const _Tp&);
00521 
00522   template<typename _IIter, typename _OIter, typename _Predicate>
00523     _OIter
00524     remove_copy_if(_IIter, _IIter, _OIter, _Predicate);
00525 
00526   // replace
00527 
00528   template<typename _IIter, typename _OIter, typename _Tp>
00529     _OIter
00530     replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&);
00531 
00532   template<typename _Iter, typename _OIter, typename _Predicate, typename _Tp>
00533     _OIter
00534     replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&);
00535 
00536   // replace_if
00537 
00538   template<typename _BIter>
00539     void
00540     reverse(_BIter, _BIter);
00541 
00542   template<typename _BIter, typename _OIter>
00543     _OIter
00544     reverse_copy(_BIter, _BIter, _OIter);
00545 
00546   inline namespace _V2
00547   {
00548     template<typename _FIter>
00549       _FIter
00550       rotate(_FIter, _FIter, _FIter);
00551   }
00552 
00553   template<typename _FIter, typename _OIter>
00554     _OIter
00555     rotate_copy(_FIter, _FIter, _FIter, _OIter);
00556 
00557   // search
00558   // search_n
00559   // set_difference
00560   // set_intersection
00561   // set_symmetric_difference
00562   // set_union
00563 
00564 #if (__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
00565   template<typename _RAIter, typename _UGenerator>
00566     void
00567     shuffle(_RAIter, _RAIter, _UGenerator&&);
00568 #endif
00569 
00570   template<typename _RAIter>
00571     void
00572     sort_heap(_RAIter, _RAIter);
00573 
00574   template<typename _RAIter, typename _Compare>
00575     void
00576     sort_heap(_RAIter, _RAIter, _Compare);
00577 
00578   template<typename _BIter, typename _Predicate>
00579     _BIter
00580     stable_partition(_BIter, _BIter, _Predicate);
00581 
00582 #if __cplusplus < 201103L
00583   // For C++11 swap() is declared in <type_traits>.
00584 
00585   template<typename _Tp, size_t _Nm>
00586     inline void
00587     swap(_Tp& __a, _Tp& __b);
00588 
00589   template<typename _Tp, size_t _Nm>
00590     inline void
00591     swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]);
00592 #endif
00593 
00594   template<typename _FIter1, typename _FIter2>
00595     _FIter2
00596     swap_ranges(_FIter1, _FIter1, _FIter2);
00597 
00598   // transform
00599 
00600   template<typename _FIter>
00601     _FIter
00602     unique(_FIter, _FIter);
00603 
00604   template<typename _FIter, typename _BinaryPredicate>
00605     _FIter
00606     unique(_FIter, _FIter, _BinaryPredicate);
00607 
00608   // unique_copy
00609 
00610   template<typename _FIter, typename _Tp>
00611     _FIter
00612     upper_bound(_FIter, _FIter, const _Tp&);
00613 
00614   template<typename _FIter, typename _Tp, typename _Compare>
00615     _FIter
00616     upper_bound(_FIter, _FIter, const _Tp&, _Compare);
00617 
00618 _GLIBCXX_BEGIN_NAMESPACE_ALGO
00619 
00620   template<typename _FIter>
00621     _FIter
00622     adjacent_find(_FIter, _FIter);
00623 
00624   template<typename _FIter, typename _BinaryPredicate>
00625     _FIter
00626     adjacent_find(_FIter, _FIter, _BinaryPredicate);
00627 
00628   template<typename _IIter, typename _Tp>
00629     typename iterator_traits<_IIter>::difference_type
00630     count(_IIter, _IIter, const _Tp&);
00631 
00632   template<typename _IIter, typename _Predicate>
00633     typename iterator_traits<_IIter>::difference_type
00634     count_if(_IIter, _IIter, _Predicate);
00635 
00636   template<typename _IIter1, typename _IIter2>
00637     bool
00638     equal(_IIter1, _IIter1, _IIter2);
00639 
00640   template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
00641     bool
00642     equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
00643 
00644   template<typename _IIter, typename _Tp>
00645     _IIter
00646     find(_IIter, _IIter, const _Tp&);
00647 
00648   template<typename _FIter1, typename _FIter2>
00649     _FIter1
00650     find_first_of(_FIter1, _FIter1, _FIter2, _FIter2);
00651 
00652   template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
00653     _FIter1
00654     find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
00655 
00656   template<typename _IIter, typename _Predicate>
00657     _IIter
00658     find_if(_IIter, _IIter, _Predicate);
00659 
00660   template<typename _IIter, typename _Funct>
00661     _Funct
00662     for_each(_IIter, _IIter, _Funct);
00663 
00664   template<typename _FIter, typename _Generator>
00665     void
00666     generate(_FIter, _FIter, _Generator);
00667 
00668   template<typename _OIter, typename _Size, typename _Generator>
00669     _OIter
00670     generate_n(_OIter, _Size, _Generator);
00671 
00672   template<typename _IIter1, typename _IIter2>
00673     bool
00674     lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
00675 
00676   template<typename _IIter1, typename _IIter2, typename _Compare>
00677     bool
00678     lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
00679 
00680   template<typename _FIter>
00681     _GLIBCXX14_CONSTEXPR
00682     _FIter
00683     max_element(_FIter, _FIter);
00684 
00685   template<typename _FIter, typename _Compare>
00686     _GLIBCXX14_CONSTEXPR
00687     _FIter
00688     max_element(_FIter, _FIter, _Compare);
00689 
00690   template<typename _IIter1, typename _IIter2, typename _OIter>
00691     _OIter
00692     merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
00693 
00694   template<typename _IIter1, typename _IIter2, typename _OIter,
00695            typename _Compare>
00696     _OIter
00697     merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
00698 
00699   template<typename _FIter>
00700     _GLIBCXX14_CONSTEXPR
00701     _FIter
00702     min_element(_FIter, _FIter);
00703 
00704   template<typename _FIter, typename _Compare>
00705     _GLIBCXX14_CONSTEXPR
00706     _FIter
00707     min_element(_FIter, _FIter, _Compare);
00708 
00709   template<typename _IIter1, typename _IIter2>
00710     pair<_IIter1, _IIter2>
00711     mismatch(_IIter1, _IIter1, _IIter2);
00712 
00713   template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
00714     pair<_IIter1, _IIter2>
00715     mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
00716 
00717   template<typename _RAIter>
00718     void
00719     nth_element(_RAIter, _RAIter, _RAIter);
00720 
00721   template<typename _RAIter, typename _Compare>
00722     void
00723     nth_element(_RAIter, _RAIter, _RAIter, _Compare);
00724 
00725   template<typename _RAIter>
00726     void
00727     partial_sort(_RAIter, _RAIter, _RAIter);
00728 
00729   template<typename _RAIter, typename _Compare>
00730     void
00731     partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
00732 
00733   template<typename _BIter, typename _Predicate>
00734     _BIter
00735     partition(_BIter, _BIter, _Predicate);
00736 
00737   template<typename _RAIter>
00738     void
00739     random_shuffle(_RAIter, _RAIter);
00740 
00741   template<typename _RAIter, typename _Generator>
00742     void
00743     random_shuffle(_RAIter, _RAIter,
00744 #if __cplusplus >= 201103L
00745                    _Generator&&);
00746 #else
00747                    _Generator&);
00748 #endif
00749 
00750   template<typename _FIter, typename _Tp>
00751     void
00752     replace(_FIter, _FIter, const _Tp&, const _Tp&);
00753 
00754   template<typename _FIter, typename _Predicate, typename _Tp>
00755     void
00756     replace_if(_FIter, _FIter, _Predicate, const _Tp&);
00757 
00758   template<typename _FIter1, typename _FIter2>
00759     _FIter1
00760     search(_FIter1, _FIter1, _FIter2, _FIter2);
00761 
00762   template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
00763     _FIter1
00764     search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
00765 
00766   template<typename _FIter, typename _Size, typename _Tp>
00767     _FIter
00768     search_n(_FIter, _FIter, _Size, const _Tp&);
00769 
00770   template<typename _FIter, typename _Size, typename _Tp,
00771            typename _BinaryPredicate>
00772     _FIter
00773     search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate);
00774 
00775   template<typename _IIter1, typename _IIter2, typename _OIter>
00776     _OIter
00777     set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
00778 
00779   template<typename _IIter1, typename _IIter2, typename _OIter,
00780            typename _Compare>
00781     _OIter
00782     set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
00783 
00784   template<typename _IIter1, typename _IIter2, typename _OIter>
00785     _OIter
00786     set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
00787 
00788   template<typename _IIter1, typename _IIter2, typename _OIter,
00789            typename _Compare>
00790     _OIter
00791     set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
00792 
00793   template<typename _IIter1, typename _IIter2, typename _OIter>
00794     _OIter
00795     set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
00796 
00797   template<typename _IIter1, typename _IIter2, typename _OIter,
00798            typename _Compare>
00799     _OIter
00800     set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2,
00801                              _OIter, _Compare);
00802 
00803   template<typename _IIter1, typename _IIter2, typename _OIter>
00804     _OIter
00805     set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
00806 
00807   template<typename _IIter1, typename _IIter2, typename _OIter,
00808            typename _Compare>
00809     _OIter
00810     set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
00811 
00812   template<typename _RAIter>
00813     void
00814     sort(_RAIter, _RAIter);
00815 
00816   template<typename _RAIter, typename _Compare>
00817     void
00818     sort(_RAIter, _RAIter, _Compare);
00819 
00820   template<typename _RAIter>
00821     void
00822     stable_sort(_RAIter, _RAIter);
00823 
00824   template<typename _RAIter, typename _Compare>
00825     void
00826     stable_sort(_RAIter, _RAIter, _Compare);
00827 
00828   template<typename _IIter, typename _OIter, typename _UnaryOperation>
00829     _OIter
00830     transform(_IIter, _IIter, _OIter, _UnaryOperation);
00831 
00832   template<typename _IIter1, typename _IIter2, typename _OIter,
00833            typename _BinaryOperation>
00834     _OIter
00835     transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation);
00836 
00837   template<typename _IIter, typename _OIter>
00838     _OIter
00839     unique_copy(_IIter, _IIter, _OIter);
00840 
00841   template<typename _IIter, typename _OIter, typename _BinaryPredicate>
00842     _OIter
00843     unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate);
00844 
00845 _GLIBCXX_END_NAMESPACE_ALGO
00846 _GLIBCXX_END_NAMESPACE_VERSION
00847 } // namespace std
00848 
00849 #ifdef _GLIBCXX_PARALLEL
00850 # include <parallel/algorithmfwd.h>
00851 #endif
00852 
00853 #endif
00854