# bits/algorithmfwd.h

Go to the documentation of this file.

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