# bits/algorithmfwd.h

Go to the documentation of this file.

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