C++stl Algorithm Quick Check

Source: Internet
Author: User
Tags ranges

Non-variable Easy algorithm

/*21st Non-variable easy algorithm non-modifying sequence operations 21.0 advance, distance in order to understand the template, first understand the two iterator operation function 21.1 container-by-element for_each For_each Apply function to range (template function) 21.2 Find container element find Find Find value in range (function Templ ATE) 21.3-piece lookup container element find_if find_if find element in range (function template) 21.4 Neighbor Lookup container element adjacent_find Adjace Nt_find find equal adjacent elements in range (function template) 21.5 range Lookup container element find_first_of find_first_of find El Ement from set in range (function template) 21.6 counts the number of container elements equal to a value count count count appearances of value in range (func tion template) 21.7 items statistics container elements count_if count_if Return number of elements in range satisfying condition (function t Emplate) 21.8 element mismatch find mismatch mismatch Return first position where, ranges differ (function template) 21.9 element phase  Equal equal Test whether the elements in the ranges is equal (function template) 21.10 sub-sequence search Find subsequence in RangE (function template) 21.11 repeating element sub-sequence search Search_n search_n Find succession of equal values in range (function template) 21.12 Final sub-sequence search Find_end find_end find last subsequence in range (function template) 21.13 Chapter Summary:*/
View Code


Variable Ease algorithm

/*22nd Chapter Modifying sequence operations 22.1 element copy copycopy copy range of elements (function template) 22.2 Reverse copy Co Py_backwardcopy_backward Copy range of elements backwards (function template) 22.3 element Exchange Swapswap Exchange values of The objects (function template) 22.4 Iterator Exchange Iter_swapiter_swap Exchange values of objects pointed by and iterators (FU Nction template) 22.5 interval element Exchange Swap_rangesswap_ranges Exchange values of the ranges (function template) 22.6 element transform T Ransformtransform Apply function to range (function template) 22.7 replaces Replacereplace replace value in range (functio N template) 22.8-piece replacement replace_ifreplace_if replace values in range (function template) 22.9 Replace and copy Replace_copyrep Lace_copy copy range replacing value (function template) 22.1-piece replacement and replication replace_copy_ifreplace_copy_if copy range Rep Lacing value (function template) 22.11 fills Fillfill fill range with value (function template) 22.12 N-Times fills Fill_nfil L_n Fill sequence withValue (function template) 22.13 randomly generated elements generategenerate Generate values for range with function (function template) 22.14 randomly generated n elements generate_ngenerate_n Generate values for sequence with function template 22.15 remove replication Remo Ve_copyremove_copy Copy range removing value (function template) 22.16-piece Remove copy remove_copy_ifremove_copy_if copy range R Emoving values (function template) 22.17 Remove Removeremove Remove value from range (function template) 22.18 strip remove_ Ifremove_if Remove elements from range (function template) 22.19 discontinuous duplicate element copy unique_copyunique_copy copy range removing D Uplicates (function template) 22.20 culling of continuous repeating elements Uniqueunique Remove consecutive duplicates in range (function template) 2 2.21 element Reverse Reversereverse Reverse range (function template) 22.22 reverse copy reverse_copyreverse_copy copy range reversed (func tion template) 22.23 rotation rotaterotate Rotate elements in range (function template) 22.24 rotation copy rotate_copyrotate_copy Co PY Rotated Range (functiOn template) 22.25 random jitter random_shufflerandom_shuffle rearrangle elements in range randomly (function template) 22.2   6 Random sampling Random_sample ...   22.27 Container split partitionpartition Partition range in (function template) 22.28 container stable split stable_partitionstable_partition Divide range in groups-stable ordering (function template) 22.29 Chapter Summary*/
View Code


Sorting algorithms

/*23rd Chapter Sorting algorithm sorting:1 sort sort elements in range (function template) 2 Stable_sort sort elements preserving order of Equiva Lents (function template) 3 Partial_sort partially sort elements in range (function template) 4 partial_sort_copy copy and P artially sort range (function template) 5 Nth_element sort element in range (function template) Binary Search (operating On sorted ranges): 6 lower_bound return iterator to lower bound (function template) 7 Upper_bound Return iterator to Upper Bound (function template) 8 Equal_range Get subrange of equal elements (function template) 9 Binary_search Test if value Exi STS in sorted array (function template) merge (operating on sorted ranges): Merge merge sorted ranges (function Templ ATE) Inplace_merge merge consecutive sorted ranges (function template) includes Test whether sorted range includes Ano Ther sorted range (function template) Set_union Union of the sorted ranges (function template) set_intersection Inters Ection of Sorted ranGES (function template) set_difference difference of the sorted ranges (function template) set_symmetric_difference Sy Mmetric difference of the sorted ranges (function template) heap:17 Push_heap push element into Heap range (function te mplate) pop_heap pop element from the heap range (function template) Make_heap make heap from range (function template) 20 Sort_heap Sort Elements of heap (function template) min/max:21 Min Return The lesser of the arguments (function Templat e) Max return the greater of arguments (function template) min_element return smallest element in range (function Template) Max_element Return largest element in range (function template) Lexicographical_compare lexicographical les S-than comparison (function template) next_permutation Transform range to next permutation (function template) Prev_pe Rmutation Transform Range to previous permutation (function template)*/
View Code


Numerical algorithms

TOP

C++stl Algorithm Quick Check

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.