std::ranges:: nth_element - cppreference.com
en.cppreference.com/w/cpp/algorithm/ranges/nth_element
2025-02-12T00:00:00.0000000
The
element
pointed at by nth is changed to whatever
element
would occur in that position if [first,last) were sorted with respect to comp and proj. All of the
elements
before this new nth
element
are less than or equal to the
elements
after the new nth
element
. That is, for every iterator i, j in the ranges [first,nth), [nth,last) respectively, the expression std::invoke(comp, std::invoke ...
Algorithms library - cppreference.com
en.cppreference.com/w/cpp/algorithm.html
2025-02-14T00:00:00.0000000
The algorithms library defines functions for a variety of purposes (e.g. searching, sorting, counting, manipulating) that operate on ranges of
elements
. Note that a range is defined as [first,last) where last refers to the
element
past the last
element
to inspect or modify. 1Constrained algorithms (since C++20) 2Execution policies (since C++17) 3Non-modifying sequence operations Batch ...
Constrained algorithms (since C++20) - cppreference.com
en.cppreference.com/w/cpp/algorithm/ranges.html
2024-11-27T00:00:00.0000000
C++20 provides constrained versions of most algorithms in the namespace std::ranges. In these algorithms, a range can be specified as either an iterator - sentinel pair or as a single range argument, and projections and pointer-to-member callables are supported. Additionally, the return types of most algorithms have been changed to return all potentially useful information computed during the ...
Ranges library (since C++20) - cppreference.com
en.cppreference.com/w/cpp/ranges.html
2025-02-20T00:00:00.0000000
The ranges library is an extension and generalization of the algorithms and iterator libraries that makes them more powerful by making them composable and less error-prone.
std:: nth_element - cppreference.com
en.cppreference.com/w/cpp/algorithm/nth_element.html
2025-02-10T00:00:00.0000000
The
element
pointed at by nth is changed to whatever
element
would occur in that position if [first,last) were sorted. For every iterator i in [first,nth) and every iterator j in [nth,last), the following condition is met:
std::ranges:: find, std::ranges:: find_if, std::ranges:: find_if_not
en.cppreference.com/w/cpp/algorithm/ranges/find
2025-02-12T00:00:00.0000000
nth_element partial_sort_copy Binary search operations (on sorted ranges) lower_bound upper_bound binary_search equal_range Set operations (on sorted ranges) merge inplace_merge set_difference set_intersection set_union includes set_symmetric_difference Heap operations is_heap is_heap_until make_heap sort_heap push_heap pop_heap Minimum/maximum ...
std::ranges::partial_sort - cppreference.com
en.cppreference.com/w/cpp/algorithm/ranges/partial_sort
2025-02-12T00:00:00.0000000
The order of the remaining
elements
in the range [middle, last) is unspecified. The
elements
are compared using the given binary comparison function comp and projected using proj function object. 2) Same as (1), but uses r as the range, as if using ranges::begin(r) as first and ranges::end(r) as last.
std::ranges:: all_of, std::ranges:: any_of, std::ranges:: none_of
en.cppreference.com/w/cpp/algorithm/ranges/all_any_none_of
2025-02-10T00:00:00.0000000
nth_element partial_sort_copy Binary search operations (on sorted ranges) lower_bound upper_bound binary_search equal_range Set operations (on sorted ranges) merge inplace_merge set_difference set_intersection set_union includes set_symmetric_difference Heap operations is_heap is_heap_until make_heap sort_heap push_heap pop_heap Minimum/maximum ...
std::ranges::generate_n - cppreference.com
en.cppreference.com/w/cpp/algorithm/ranges/generate_n
2024-04-17T00:00:00.0000000
Assigns the result of successive invocations of the function object gen to each
element
in the range [first, first + n), if 0 < n. Does nothing otherwise. The function-like entities described on this page are algorithm function objects (informally known as niebloids), that is: Explicit template argument lists cannot be specified when calling any of them. None of them are visible to argument ...
std::ranges::find_last, std::ranges::find_last_if, std::ranges::find ...
en.cppreference.com/w/cpp/algorithm/ranges/find_last
2025-02-13T00:00:00.0000000
Returns the last
element
in the range [first, last) that satisfies specific criteria: 1) find_last searches for an
element
equal to value. 3) find_last_if searches for the last
element
in the range [first, last) for which predicate pred returns true.
Feedback