algorithm
标准库标头<algorithm>
此标头是算法图书馆。
功能
非修改序列运算
*。
全[医]任何[医]无[医]在%28C++11%29%28C+11%29%28C+11%29中,检查一个谓词是否对所有人都是正确的,范围%28函数模板%29中的任何元素或任何元素都不适用。
为[医]每个函数都将一个函数应用到元素的范围%28函数模板%29
数数[医]如果返回满足特定条件的元素数%28函数模板%29
不匹配找到两个范围不同的第一个位置:%28函数模板%29
等于确定两组元素是否为相同的%28函数模板%29
发现[医]艾芬德[医]如果[医]非%28C++11%29找到满足特定标准的第一个元素%28函数模板%29
找出[医]在一定范围内查找元素的最后序列%28函数模板%29
找出[医]第一[医]搜索一组元素中的任何一个元素%28函数模板%29
相邻[医]查找等于%28或满足给定谓词%29%28函数模板%29的三个相邻项
搜索元素范围%28功能模板%29
搜索[医]n在范围%28函数模板%29中搜索元素的连续数副本
修改序列操作
抄袭[医]如果%28C++11%29将一系列元素复制到新位置%28函数模板%29
复制[医]n%28C++11%29将多个元素复制到新位置%28函数模板%29
复制[医]向后复制一系列元素,顺序为%28函数模板%29
移动%28C++11%29将一系列元素移动到新位置%28功能模板%29
移动[医]向后%28C++11%29向后移动一系列元素到新位置,顺序为%28函数模板%29
填充复制-将给定的值分配给范围%28的函数模板%29中的每个元素
填充[医]n拷贝-在范围%28的函数模板%29中将给定的值分配给N个元素
转换将函数应用于元素范围%28函数模板%29
生成将连续函数调用的结果分配给范围%28的函数模板%29中的每个元素
生成[医]n在范围%28的函数模板%29中分配对N元素的连续函数调用的结果
移除[医]如果删除满足特定条件的元素%28函数模板%29
移除[医]版权删除[医]复制[医]如果复制一系列元素,忽略满足特定条件的元素%28函数模板%29
替代物[医]如果用另一个值%28函数模板%29替换所有满足特定条件的值
取代[医]版权替换[医]复制[医]如果复制范围,则用另一个值%28函数模板%29替换满足特定条件的元素
交换两个对象的值%28函数模板%29
互换[医]范围交换两个元素范围%28函数模板%29
ITER[医]交换交换两个迭代器所指向的元素%28函数模板%29
反转范围%28函数模板%29中元素的顺序
倒向[医]复制创建一个范围的副本,该范围反转为%28功能模板%29
旋转旋转范围内元素的顺序%28功能模板%29
旋转[医]复制、复制和旋转元素范围%28功能模板%29
随机[医]直到C++17%29%28C+11%29随机重排序元素在范围%28功能模板%29
唯一删除范围%28函数模板%29中的连续重复元素
独树一帜[医]复制创建一个元素范围的副本,其中不包含连续重复的%28函数模板%29
分区操作
是[医]分区%28C++11%29确定区域是否由给定谓词%28函数模板%29划分
分区将元素范围分成两组:%28函数模板%29
隔断[医]复制%28C++11%29复制一个范围,将元素分成两组:%28函数模板%29
稳定[医]分区将元素分成两组,同时保持它们的相对顺序%28函数模板%29
隔断[医]点%28C++11%29定位分区范围%28函数模板%29的分区点
排序操作%28对排序范围%29
是[医]排序%28C++11%29检查范围是否按升序排序%28函数模板%29
是[医]分门别类[医]直到%28C++11%29找到最大的排序子范围%28功能模板%29
排序将范围排序为升序%28函数模板%29
部分[医]排序范围%28函数模板%29的前N元素
部分[医]排序[医]复制、复制和部分排序元素范围%28功能模板%29
稳定[医]排序在保持等号元素之间顺序的同时对元素的范围进行排序,%28函数模板%29
nth[医]元素对给定范围进行部分排序,确保它由给定元素%28函数模板%29进行分区。
二进制搜索操作%28对排序范围%29
较低[医]绑定将迭代器返回给第一个元素,不少于给定值%28函数模板%29。
上层[医]绑定将迭代器返回到大于某个值%28函数模板%29的第一个元素。
二进制[医]搜索确定元素是否存在于某个范围%28函数模板%29
平等[医]范围返回匹配特定键%28函数模板%29的元素范围
设置操作%28对排序范围%29
合并两个排序范围%28功能模板%29
内置[医]合并两个按顺序排列的区域%28功能模板%29
如果一个集合是另一个%28函数模板%29的子集,则包括返回true。
集[医]差异计算两组之间的差异%28函数模板%29
集[医]交集计算两组的交集%28函数模板%29
集[医]对称[医]差分计算两组之间的对称差%28函数模板%29
集[医]UNION计算两组的合并%28函数模板%29
堆操作
是[医]堆%28C++11%29检查给定范围是否为最大堆%28功能模板%29
是[医]堆[医]直到%28C++11%29找到最大的子范围,即最大堆%28功能模板%29
制造[医]堆在元素%28函数模板%29的范围内创建最大堆
推[医]堆向最大堆%28函数模板%29添加一个元素
波普[医]堆从最大堆%28函数模板%29中移除最大元素
排序[医]堆将最大堆转换为按升序排序的元素范围%28函数模板%29
最小/最高操作
夹紧%28C++17%29夹紧值在一对边界值%28函数模板%29之间
MAX返回给定值%28函数模板%29中的较大值
马克斯[医]元素返回范围%28函数模板%29中最大的元素。
min返回给定值%28函数模板%29中的较小值。
敏[医]元素返回范围%28函数模板%29中最小的元素。
minmax%28C++11%29返回两个元素中的一个又一个又一个,即%28函数模板%29
极小[医]元素%28C++11%29返回范围%28函数模板%29中最小和最大的元素
词典学[医]如果一个范围按字典顺序小于另一个%28函数模板%29,则比较返回true。
是[医]置换%28C++11%29确定一个序列是否是另一个序列%28功能模板%29的置换
下一个[医]置换将生成一系列元素的下一次更大的字典置换:%28函数模板%29。
普雷夫[医]置换将生成一系列元素的下一个较小的字典排列(%28功能模板%29)。
简介
二次
#include <initializer_list>
namespace std
{
// non-modifying sequence operations:
template <class InputIterator, class Predicate>
bool all_of(InputIterator first, InputIterator last, Predicate pred
template <class InputIterator, class Predicate>
bool any_of(InputIterator first, InputIterator last, Predicate pred
template <class InputIterator, class Predicate>
bool none_of(InputIterator first, InputIterator last, Predicate pred
template<class InputIterator, class Function>
Function for_each(InputIterator first, InputIterator last, Function f
template<class InputIterator, class T>
InputIterator find(InputIterator first, InputIterator last,
const T& value
template<class InputIterator, class Predicate>
InputIterator find_if(InputIterator first, InputIterator last,
Predicate pred
template<class InputIterator, class Predicate>
InputIterator find_if_not(InputIterator first, InputIterator last,
Predicate pred
template<class ForwardIterator1, class ForwardIterator2>
ForwardIterator1
find_end(ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
template<class ForwardIterator1, class ForwardIterator2,
class BinaryPredicate>
ForwardIterator1
find_end(ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
template<class InputIterator, class ForwardIterator>
InputIterator
find_first_of(InputIterator first1, InputIterator last1,
ForwardIterator first2, ForwardIterator last2
template<class InputIterator, class ForwardIterator,
class BinaryPredicate>
InputIterator
find_first_of(InputIterator first1, InputIterator last1,
ForwardIterator first2, ForwardIterator last2,
BinaryPredicate pred
template<class ForwardIterator>
ForwardIterator adjacent_find(ForwardIterator first,
ForwardIterator last
template<class ForwardIterator, class BinaryPredicate>
ForwardIterator adjacent_find(ForwardIterator first,
ForwardIterator last,
BinaryPredicate pred
template<class InputIterator, class T>
typename iterator_traits<InputIterator>::difference_type
count(InputIterator first, InputIterator last, const T& value
template<class InputIterator, class Predicate>
typename iterator_traits<InputIterator>::difference_type
count_if(InputIterator first, InputIterator last, Predicate pred
template<class InputIterator1, class InputIterator2>
pair<InputIterator1, InputIterator2>
mismatch(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2
template<class InputIterator1, class InputIterator2, class BinaryPredicate>
pair<InputIterator1, InputIterator2>
mismatch(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, BinaryPredicate pred
template<class InputIterator1, class InputIterator2>
bool equal(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2
template<class InputIterator1, class InputIterator2, class BinaryPredicate>
bool equal(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, BinaryPredicate pred
template<class ForwardIterator1, class ForwardIterator2>
bool is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2
template<class ForwardIterator1, class ForwardIterator2,
class BinaryPredicate>
bool is_permutation(ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, BinaryPredicate pred
template<class ForwardIterator1, class ForwardIterator2>
ForwardIterator1 search(
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
template<class ForwardIterator1, class ForwardIterator2,
class BinaryPredicate>
ForwardIterator1 search(
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
template<class ForwardIterator, class Size, class T>
ForwardIterator search_n(ForwardIterator first, ForwardIterator last,
Size count, const T& value
template<class ForwardIterator, class Size, class T, class BinaryPredicate>
ForwardIterator1 search_n(ForwardIterator first, ForwardIterator last,
Size count, const T& value,
BinaryPredicate pred
// modifying sequence operations:
// copy:
template<class InputIterator, class OutputIterator>
OutputIterator copy(InputIterator first, InputIterator last,
OutputIterator result
template<class InputIterator, class Size, class OutputIterator>
OutputIterator copy_n(InputIterator first, Size n,
OutputIterator result
template<class InputIterator, class OutputIterator, class Predicate>
OutputIterator copy_if(InputIterator first, InputIterator last,
OutputIterator result, Predicate pred
template<class BidirectionalIterator1, class BidirectionalIterator2>
BidirectionalIterator2 copy_backward(
BidirectionalIterator1 first, BidirectionalIterator1 last,
BidirectionalIterator2 result
// move:
template<class InputIterator, class OutputIterator>
OutputIterator move(InputIterator first, InputIterator last,
OutputIterator result
template<class BidirectionalIterator1, class BidirectionalIterator2>
BidirectionalIterator2 move_backward(
BidirectionalIterator1 first, BidirectionalIterator1 last,
BidirectionalIterator2 result
// swap:
template<class ForwardIterator1, class ForwardIterator2>
ForwardIterator2 swap_ranges(ForwardIterator1 first1,
ForwardIterator1 last1, ForwardIterator2 first2
template<class ForwardIterator1, class ForwardIterator2>
void iter_swap(ForwardIterator1 a, ForwardIterator2 b
template<class InputIterator, class OutputIterator, class UnaryOperation>
OutputIterator transform(InputIterator first, InputIterator last,
OutputIterator result, UnaryOperation op
template<class InputIterator1, class InputIterator2, class OutputIterator,
class BinaryOperation>
OutputIterator transform(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, OutputIterator result,
BinaryOperation binary_op
template<class ForwardIterator, class T>
void replace(ForwardIterator first, ForwardIterator last,
const T& old_value, const T& new_value
template<class ForwardIterator, class Predicate, class T>
void replace_if(ForwardIterator first, ForwardIterator last,
Predicate pred, const T& new_value
template<class InputIterator, class OutputIterator, class T>
OutputIterator replace_copy(InputIterator first, InputIterator last,
OutputIterator result,
const T& old_value, const T& new_value
template<class InputIterator, class OutputIterator, class Predicate, class T>
OutputIterator replace_copy_if(InputIterator first, InputIterator last,
OutputIterator result,
Predicate pred, const T& new_value
template<class ForwardIterator, class T>
void fill(ForwardIterator first, ForwardIterator last, const T& value
template<class OutputIterator, class Size, class T>
OutputIterator fill_n(OutputIterator first, Size n, const T& value
template<class ForwardIterator, class Generator>
void generate(ForwardIterator first, ForwardIterator last,
Generator gen
template<class OutputIterator, class Size, class Generator>
OutputIterator generate_n(OutputIterator first, Size n, Generator gen
template<class ForwardIterator, class T>
ForwardIterator remove(ForwardIterator first, ForwardIterator last,
const T& value
template<class ForwardIterator, class Predicate>
ForwardIterator remove_if(ForwardIterator first, ForwardIterator last,
Predicate pred
template<class InputIterator, class OutputIterator, class T>
OutputIterator remove_copy(InputIterator first, InputIterator last,
OutputIterator result, const T& value
template<class InputIterator, class OutputIterator, class Predicate>
OutputIterator remove_copy_if(InputIterator first, InputIterator last,
OutputIterator result, Predicate pred
template<class ForwardIterator>
ForwardIterator unique(ForwardIterator first, ForwardIterator last
template<class ForwardIterator, class BinaryPredicate>
ForwardIterator unique(ForwardIterator first, ForwardIterator last,
BinaryPredicate pred
template<class InputIterator, class OutputIterator>
OutputIterator unique_copy(InputIterator first, InputIterator last,
OutputIterator result
template<class InputIterator, class OutputIterator, class BinaryPredicate>
OutputIterator unique_copy(InputIterator first, InputIterator last,
OutputIterator result, BinaryPredicate pred
template<class BidirectionalIterator>
void reverse(BidirectionalIterator first, BidirectionalIterator last
template<class BidirectionalIterator, class OutputIterator>
OutputIterator reverse_copy(BidirectionalIterator first,
BidirectionalIterator last,
OutputIterator result
template<class ForwardIterator>
ForwardIterator rotate(ForwardIterator first, ForwardIterator middle,
ForwardIterator last
template<class ForwardIterator, class OutputIterator>
OutputIterator rotate_copy(
ForwardIterator first, ForwardIterator middle,
ForwardIterator last, OutputIterator result
template<class RandomAccessIterator>
void random_shuffle(RandomAccessIterator first,
RandomAccessIterator last
template<class RandomAccessIterator, class RandomNumberGenerator>
void random_shuffle(RandomAccessIterator first,
RandomAccessIterator last,
RandomNumberGenerator&& rand
template<class RandomAccessIterator, class UniformRandomNumberGenerator>
void shuffle(RandomAccessIterator first,
RandomAccessIterator last,
UniformRandomNumberGenerator&& rand
// partitions:
template <class InputIterator, class Predicate>
bool is_partitioned(InputIterator first, InputIterator last, Predicate pred
template<class ForwardIterator, class Predicate>
ForwardIterator partition(ForwardIterator first,
ForwardIterator last,
Predicate pred
template<class BidirectionalIterator, class Predicate>
BidirectionalIterator stable_partition(BidirectionalIterator first,
BidirectionalIterator last,
Predicate pred
template <class InputIterator, class OutputIterator1,
class OutputIterator2, class Predicate>
pair<OutputIterator1, OutputIterator2>
partition_copy(InputIterator first, InputIterator last,
OutputIterator1 out_true, OutputIterator2 out_false,
Predicate pred
template<class ForwardIterator, class Predicate>
ForwardIterator partition_point(ForwardIterator first,
ForwardIterator last,
Predicate pred
// sorting and related operations:
// sorting:
template<class RandomAccessIterator>
void sort(RandomAccessIterator first, RandomAccessIterator last
template<class RandomAccessIterator, class Compare>
void sort(RandomAccessIterator first, RandomAccessIterator last,
Compare comp
template<class RandomAccessIterator>
void stable_sort(RandomAccessIterator first, RandomAccessIterator last
template<class RandomAccessIterator, class Compare>
void stable_sort(RandomAccessIterator first, RandomAccessIterator last,
Compare comp
template<class RandomAccessIterator>
void partial_sort(RandomAccessIterator first,
RandomAccessIterator middle,
RandomAccessIterator last
template<class RandomAccessIterator, class Compare>
void partial_sort(RandomAccessIterator first,
RandomAccessIterator middle,
RandomAccessIterator last, Compare comp
template<class InputIterator, class RandomAccessIterator>
RandomAccessIterator partial_sort_copy(
InputIterator first, InputIterator last,
RandomAccessIterator result_first,
RandomAccessIterator result_last
template<class InputIterator, class RandomAccessIterator, class Compare>
RandomAccessIterator partial_sort_copy(
InputIterator first, InputIterator last,
RandomAccessIterator result_first,
RandomAccessIterator result_last,
Compare comp
template<class ForwardIterator>
bool is_sorted(ForwardIterator first, ForwardIterator last
template<class ForwardIterator, class Compare>
bool is_sorted(ForwardIterator first, ForwardIterator last,
Compare comp
template<class ForwardIterator>
ForwardIterator is_sorted_until(ForwardIterator first, ForwardIterator last
template<class ForwardIterator, class Compare>
ForwardIterator is_sorted_until(ForwardIterator first, ForwardIterator last,
Compare comp
template<class RandomAccessIterator>
void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
RandomAccessIterator last
template<class RandomAccessIterator, class Compare>
void nth_element(RandomAccessIterator first, RandomAccessIterator nth,
RandomAccessIterator last, Compare comp
// binary search:
template<class ForwardIterator, class T>
ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
const T& value
template<class ForwardIterator, class T, class Compare>
ForwardIterator lower_bound(ForwardIterator first, ForwardIterator last,
const T& value, Compare comp
template<class ForwardIterator, class T>
ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
const T& value
template<class ForwardIterator, class T, class Compare>
ForwardIterator upper_bound(ForwardIterator first, ForwardIterator last,
const T& value, Compare comp
template<class ForwardIterator, class T>
pair<ForwardIterator, ForwardIterator>
equal_range(ForwardIterator first, ForwardIterator last,
const T& value
template<class ForwardIterator, class T, class Compare>
pair<ForwardIterator, ForwardIterator>
equal_range(ForwardIterator first, ForwardIterator last,
const T& value, Compare comp
template<class ForwardIterator, class T>
bool binary_search(ForwardIterator first, ForwardIterator last,
const T& value
template<class ForwardIterator, class T, class Compare>
bool binary_search(ForwardIterator first, ForwardIterator last,
const T& value, Compare comp
// merge:
template<class InputIterator1, class InputIterator2, class OutputIterator>
OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result
template<class InputIterator1, class InputIterator2, class OutputIterator,
class Compare>
OutputIterator merge(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result, Compare comp
template<class BidirectionalIterator>
void inplace_merge(BidirectionalIterator first,
BidirectionalIterator middle,
BidirectionalIterator last
template<class BidirectionalIterator, class Compare>
void inplace_merge(BidirectionalIterator first,
BidirectionalIterator middle,
BidirectionalIterator last, Compare comp
// set operations:
template<class InputIterator1, class InputIterator2>
bool includes(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2
template<class InputIterator1, class InputIterator2, class Compare>
bool includes(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2, Compare comp
template<class InputIterator1, class InputIterator2, class OutputIterator>
OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result
template<class InputIterator1, class InputIterator2, class OutputIterator,
class Compare>
OutputIterator set_union(InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result, Compare comp
template<class InputIterator1, class InputIterator2, class OutputIterator>
OutputIterator set_intersection(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result
template<class InputIterator1, class InputIterator2, class OutputIterator,
class Compare>
OutputIterator set_intersection(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result, Compare comp
template<class InputIterator1, class InputIterator2, class OutputIterator>
OutputIterator set_difference(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result
template<class InputIterator1, class InputIterator2, class OutputIterator,
class Compare>
OutputIterator set_difference(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result, Compare comp
template<class InputIterator1, class InputIterator2, class OutputIterator>
OutputIterator set_symmetric_difference(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result
template<class InputIterator1, class InputIterator2, class OutputIterator,
class Compare>
OutputIterator set_symmetric_difference(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
OutputIterator result, Compare comp
// heap operations:
template<class RandomAccessIterator>
void push_heap(RandomAccessIterator first, RandomAccessIterator last
template<class RandomAccessIterator, class Compare>
void push_heap(RandomAccessIterator first, RandomAccessIterator last,
Compare comp
template<class RandomAccessIterator>
void pop_heap(RandomAccessIterator first, RandomAccessIterator last
template<class RandomAccessIterator, class Compare>
void pop_heap(RandomAccessIterator first, RandomAccessIterator last,
Compare comp
template<class RandomAccessIterator>
void make_heap(RandomAccessIterator first, RandomAccessIterator last
template<class RandomAccessIterator, class Compare>
void make_heap(RandomAccessIterator first, RandomAccessIterator last,
Compare comp
template<class RandomAccessIterator>
void sort_heap(RandomAccessIterator first, RandomAccessIterator last
template<class RandomAccessIterator, class Compare>
void sort_heap(RandomAccessIterator first, RandomAccessIterator last,
Compare comp
template<class RandomAccessIterator>
bool is_heap(RandomAccessIterator first, RandomAccessIterator last
template<class RandomAccessIterator, class Compare>
bool is_heap(RandomAccessIterator first, RandomAccessIterator last, Compare comp
template<class RandomAccessIterator>
RandomAccessIterator is_heap_until(RandomAccessIterator first, RandomAccessIterator last
template<class RandomAccessIterator, class Compare>
RandomAccessIterator is_heap_until(RandomAccessIterator first, RandomAccessIterator last,
Compare comp
// minimum and maximum:
template<class T> const T& min(const T& a, const T& b
template<class T, class Compare>
const T& min(const T& a, const T& b, Compare comp
template<class T>
T min(initializer_list<T> t
template<class T, class Compare>
T min(initializer_list<T> t, Compare comp
template<class T> const T& max(const T& a, const T& b
template<class T, class Compare>
const T& max(const T& a, const T& b, Compare comp
template<class T>
T max(initializer_list<T> t
template<class T, class Compare>
T max(initializer_list<T> t, Compare comp
template<class T> pair<const T&, const T&> minmax(const T& a, const T& b
template<class T, class Compare>
pair<const T&, const T&> minmax(const T& a, const T& b, Compare comp
template<class T>
pair<T, T> minmax(initializer_list<T> t
template<class T, class Compare>
pair<T, T> minmax(initializer_list<T> t, Compare comp
template<class ForwardIterator>
ForwardIterator min_element(ForwardIterator first, ForwardIterator last
template<class ForwardIterator, class Compare>
ForwardIterator min_element(ForwardIterator first, ForwardIterator last,
Compare comp
template<class ForwardIterator>
ForwardIterator max_element(ForwardIterator first, ForwardIterator last
template<class ForwardIterator, class Compare>
ForwardIterator max_element(ForwardIterator first, ForwardIterator last,
Compare comp
template<class ForwardIterator>
pair<ForwardIterator, ForwardIterator>
minmax_element(ForwardIterator first, ForwardIterator last
template<class ForwardIterator, class Compare>
pair<ForwardIterator, ForwardIterator>
minmax_element(ForwardIterator first, ForwardIterator last, Compare comp
template<class InputIterator1, class InputIterator2>
bool lexicographical_compare(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2
template<class InputIterator1, class InputIterator2, class Compare>
bool lexicographical_compare(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
Compare comp
// permutations:
template<class BidirectionalIterator>
bool next_permutation(BidirectionalIterator first,
BidirectionalIterator last
template<class BidirectionalIterator, class Compare>
bool next_permutation(BidirectionalIterator first,
BidirectionalIterator last, Compare comp
template<class BidirectionalIterator>
bool prev_permutation(BidirectionalIterator first,
BidirectionalIterator last
template<class BidirectionalIterator, class Compare>
bool prev_permutation(BidirectionalIterator first,
BidirectionalIterator last, Compare comp
}
二次
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。