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