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