- C++ Reference

cplusplus.com
  • TUTORIALS
  • REFERENCE
  • ARTICLES
  • FORUM

C++

  • Tutorials
  • Reference
  • Articles
  • Forum

Reference

  • C library:

    • <cassert> (assert.h)
    • <cctype> (ctype.h)
    • <cerrno> (errno.h)
    • C++11 <cfenv> (fenv.h)
    • <cfloat> (float.h)
    • C++11 <cinttypes> (inttypes.h)
    • <ciso646> (iso646.h)
    • <climits> (limits.h)
    • <clocale> (locale.h)
    • <cmath> (math.h)
    • <csetjmp> (setjmp.h)
    • <csignal> (signal.h)
    • <cstdarg> (stdarg.h)
    • C++11 <cstdbool> (stdbool.h)
    • <cstddef> (stddef.h)
    • C++11 <cstdint> (stdint.h)
    • <cstdio> (stdio.h)
    • <cstdlib> (stdlib.h)
    • <cstring> (string.h)
    • C++11 <ctgmath> (tgmath.h)
    • <ctime> (time.h)
    • C++11 <cuchar> (uchar.h)
    • <cwchar> (wchar.h)
    • <cwctype> (wctype.h)
  • Containers:

    • C++11 <array>
    • <deque>
    • C++11 <forward_list>
    • <list>
    • <map>
    • <queue>
    • <set>
    • <stack>
    • C++11 <unordered_map>
    • C++11 <unordered_set>
    • <vector>
  • Input/Output:

    • <fstream>
    • <iomanip>
    • <ios>
    • <iosfwd>
    • <iostream>
    • <istream>
    • <ostream>
    • <sstream>
    • <streambuf>
  • Multi-threading:

    • C++11 <atomic>
    • C++11 <condition_variable>
    • C++11 <future>
    • C++11 <mutex>
    • C++11 <thread>
  • Other:

    • <algorithm>
    • <bitset>
    • C++11 <chrono>
    • C++11 <codecvt>
    • <complex>
    • <exception>
    • <functional>
    • C++11 <initializer_list>
    • <iterator>
    • <limits>
    • <locale>
    • <memory>
    • <new>
    • <numeric>
    • C++11 <random>
    • C++11 <ratio>
    • C++11 <regex>
    • <stdexcept>
    • <string>
    • C++11 <system_error>
    • C++11 <tuple>
    • C++11 <type_traits>
    • C++11 <typeindex>
    • <typeinfo>
    • <utility>
    • <valarray>

<algorithm>

  • adjacent_find
  • C++11 all_of
  • C++11 any_of
  • binary_search
  • copy
  • copy_backward
  • C++11 copy_if
  • C++11 copy_n
  • count
  • count_if
  • equal
  • equal_range
  • fill
  • fill_n
  • find
  • find_end
  • find_first_of
  • find_if
  • C++11 find_if_not
  • for_each
  • generate
  • generate_n
  • includes
  • inplace_merge
  • C++11 is_heap
  • C++11 is_heap_until
  • C++11 is_partitioned
  • C++11 is_permutation
  • C++11 is_sorted
  • C++11 is_sorted_until
  • iter_swap
  • lexicographical_compare
  • lower_bound
  • make_heap
  • max
  • max_element
  • merge
  • min
  • min_element
  • C++11 minmax
  • C++11 minmax_element
  • mismatch
  • C++11 move
  • C++11 move_backward
  • next_permutation
  • C++11 none_of
  • nth_element
  • partial_sort
  • partial_sort_copy
  • partition
  • C++11 partition_copy
  • C++11 partition_point
  • pop_heap
  • prev_permutation
  • push_heap
  • random_shuffle
  • remove
  • remove_copy
  • remove_copy_if
  • remove_if
  • replace
  • replace_copy
  • replace_copy_if
  • replace_if
  • reverse
  • reverse_copy
  • rotate
  • rotate_copy
  • search
  • search_n
  • set_difference
  • set_intersection
  • set_symmetric_difference
  • set_union
  • C++11 shuffle
  • sort
  • sort_heap
  • stable_partition
  • stable_sort
  • swap
  • swap_ranges
  • transform
  • unique
  • unique_copy
  • upper_bound
  • Reference
  • <algorithm>
library <algorithm> <algorithm> Standard Template Library: Algorithms The header <algorithm> defines a collection of functions especially designed to be used on ranges of elements. A range is any sequence of objects that can be accessed through iterators or pointers, such as an array or an instance of some of the STL containers. Notice though, that algorithms operate through iterators directly on the values, not affecting in any way the structure of any possible container (it never affects the size or storage allocation of the container).

Functions in <algorithm>

Non-modifying sequence operations: all_of Test condition on all elements in range (function template)any_of Test if any element in range fulfills condition (function template)none_of Test if no elements fulfill condition (function template)for_eachApply function to range (function template)findFind value in range (function template)find_ifFind element in range (function template)find_if_not Find element in range (negative condition) (function template)find_endFind last subsequence in range (function template)find_first_ofFind element from set in range (function template)adjacent_findFind equal adjacent elements in range (function template)countCount appearances of value in range (function template)count_ifReturn number of elements in range satisfying condition (function template)mismatchReturn first position where two ranges differ (function template)equalTest whether the elements in two ranges are equal (function template)is_permutation Test whether range is permutation of another (function template)searchSearch range for subsequence (function template)search_nSearch range for elements (function template) Modifying sequence operations: copyCopy range of elements (function template)copy_n Copy elements (function template)copy_if Copy certain elements of range (function template)copy_backwardCopy range of elements backward (function template)move Move range of elements (function template)move_backward Move range of elements backward (function template)swapExchange values of two objects (function template)swap_rangesExchange values of two ranges (function template)iter_swapExchange values of objects pointed to by two iterators (function template)transformTransform range (function template)replaceReplace value in range (function template)replace_ifReplace values in range (function template)replace_copyCopy range replacing value (function template)replace_copy_ifCopy range replacing value (function template)fillFill range with value (function template)fill_nFill sequence with value (function template)generateGenerate values for range with function (function template)generate_nGenerate values for sequence with function (function template)removeRemove value from range (function template)remove_ifRemove elements from range (function template)remove_copyCopy range removing value (function template)remove_copy_ifCopy range removing values (function template)uniqueRemove consecutive duplicates in range (function template)unique_copyCopy range removing duplicates (function template)reverseReverse range (function template)reverse_copyCopy range reversed (function template)rotateRotate left the elements in range (function template)rotate_copyCopy range rotated left (function template)random_shuffleRandomly rearrange elements in range (function template)shuffle Randomly rearrange elements in range using generator (function template) Partitions: is_partitioned Test whether range is partitioned (function template)partitionPartition range in two (function template)stable_partitionPartition range in two - stable ordering (function template)partition_copy Partition range into two (function template)partition_point Get partition point (function template) Sorting: sortSort elements in range (function template)stable_sortSort elements preserving order of equivalents (function template)partial_sortPartially sort elements in range (function template)partial_sort_copyCopy and partially sort range (function template)is_sorted Check whether range is sorted (function template)is_sorted_until Find first unsorted element in range (function template)nth_elementSort element in range (function template) Binary search (operating on partitioned/sorted ranges): lower_boundReturn iterator to lower bound (function template)upper_boundReturn iterator to upper bound (function template)equal_rangeGet subrange of equal elements (function template)binary_searchTest if value exists in sorted sequence (function template) Merge (operating on sorted ranges): mergeMerge sorted ranges (function template)inplace_mergeMerge consecutive sorted ranges (function template)includesTest whether sorted range includes another sorted range (function template)set_unionUnion of two sorted ranges (function template)set_intersectionIntersection of two sorted ranges (function template)set_differenceDifference of two sorted ranges (function template)set_symmetric_differenceSymmetric difference of two sorted ranges (function template) Heap: push_heapPush element into heap range (function template)pop_heapPop element from heap range (function template)make_heapMake heap from range (function template)sort_heapSort elements of heap (function template)is_heap Test if range is heap (function template)is_heap_until Find first element not in heap order (function template) Min/max: minReturn the smallest (function template)maxReturn the largest (function template)minmax Return smallest and largest elements (function template)min_elementReturn smallest element in range (function template)max_elementReturn largest element in range (function template)minmax_element Return smallest and largest elements in range (function template) Other: lexicographical_compareLexicographical less-than comparison (function template)next_permutationTransform range to next permutation (function template)prev_permutationTransform range to previous permutation (function template) Home page | Privacy policy© cplusplus.com, 2000-2023 - All rights reserved - v3.3.4s Spotted an error? contact us

Từ khóa » Thư Viện Algorithm