STL常用算法之其他算法汇总2018.8.17

@单纯的数据处理

@adjacent_find:adjacent_find(first, last); adjacent_find(fist, last, binary_pred());

二元谓词参考:https://blog.csdn.net/caroline_wendy/article/details/15378055

@count:count(first, last, T);

@count_if:count_if(first, last, pred());

@find:find(first, last, T);

@find_if:find_if(first, last, pred());

@find_end:find_end(first1, last1, first2, last2);

@find_first_of:find_first_of(first1, last1, first2, last2); find_first_of(first1, last1, first2, last2, comp());

@for_each:for_each(first, last, f);

@generate:generate(first last, gen());

@generate_n:generate_n(first, n, gen());

@max_element:max_element(first, last);

@merge:merge(first1, last1, first2, last2, result); merge(first1, last1, first2, last2, result, comp);

 @min_element:min_element(first, last); min_element(first, last, comp);

@partition:partition(firtm last, pred);

@remove:remove(first, last, T);

@remove_copy:remove_copy(first, last, result, T);

@remove_if:remove(first, last, pred);

@remove_copy_if:remove_copy_if(first, last, result, pred);

@replace:replace(firstm last, old_value, new_value);

@replace_copy:replace_copy(first, last, result, old_value, new_value);

@replace_if:replace_if(first, last, pred, new_value);

@replace_copy_if(first, last, result, pred, new_value);

@reverse:reverse(first, last);

@reverse_copy:reverse_copy(first, last, result);

@rotate:rotate(first, middle, last);

@rotate_copy:rotate(first, middle, last, result);

@search:search(first1, last1, first2, last2); search(first1, last1, first2, last2, binary_pred);

@search_n:search_n(first, last, count, T);

@swap_ranges:swap_ranges(first1, last1, first2, last2);

@transform:transform(first,last, result, op); transform(first, last, binary_op);

@unique:unique(first, last);

@unique_copy:unique_copy(first, last, result);

@lower_bound:lower_bound(first, last, T);

@upper_bound:upper_bound(first, last, T);

@binary_search:binary_search(first, last, T);

@next_permutation:next_permutation(first, last);

@prev_permutation:prev_permutation(first, last);

@random_shuffle:random_shuffle(first, last);

@partial_sort:partial_sort(first, middle, last);

@partial_sort_copy:partial_sort_copy(first, last, result_first, result_last);

猜你喜欢

转载自blog.csdn.net/KristinaXu/article/details/81779469
今日推荐