You can find all cpp references on websites:

http://zh.cppreference.com/

http://www.cplusplus.com/reference/

泛型算法:

所有算法的前两个参数都是一对iterators:[first,last),用来指出容器内一个范围内的元素。

每个算法的声明中,都表现出它所需要的最低层次的iterator类型。

常用算法:

accumulate() 元素累加

adjacent_difference() 相邻元素的差额

adjacent_find() 搜寻相邻的重复元素

binary_search() 二元搜寻

copy() 复制

copy_backward() 逆向复制

count() 计数

count_if() 在特定条件下计数

equal() 判断相等与否

equal_range() 判断相等与否(传回一个上下限区间范围)

fill() 改填元素值

fill_n() 改填元素值,n 次

find() 搜寻

find_if() 在特定条件下搜寻

find_end() 搜寻某个子序列的最后一次出现地点

find_first_of() 搜寻某些元素的首次出现地点

for_each() 对范围内的每一个元素施行某动作

generate() 以指定动作的运算结果充填特定范围内的元素

generate_n() 以指定动作的运算结果充填 n 个元素内容

includes() 涵盖於

inner_product() 内积

inplace_merge() 合并并取代(覆写)

iter_swap() 元素互换

lexicographical_compare() 以字典排列方式做比较

lower_bound() 下限

max() 最大值

max_element() 最大值所在位置

min() 最小值

min_element() 最小值所在位置

merge() 合并两个序列

mismatch() 找出不吻合点

next_permutation() 获得下一个排列组合

泛型演算法(Generic Algorithms)与 Function Obje4 cts

nth_element() 重新安排序列中第n个元素的左右两端

partial_sort() 局部排序

partial_sort_copy() 局部排序并复制到它处

partial_sum() 局部总和

partition() 切割

prev_permutation() 获得前一个排列组合

random_shuffle() 随机重排

remove() 移除某种元素(但不删除)

remove_copy() 移除某种元素并将结果复制到另一个 container

remove_if() 有条件地移除某种元素

remove_copy_if() 有条件地移除某种元素并将结果复制到另一个 container

replace() 取代某种元素

replace_copy() 取代某种元素,并将结果复制到另一个 container

replace_if() 有条件地取代

replace_copy_if() 有条件地取代,并将结果复制到另一个 container

reverse() 颠倒元素次序

reverse_copy() 颠倒元素次序并将结果复制到另一个 container

rotate() 旋转

rotate_copy() 旋转,并将结果复制到另一个 container

search() 搜寻某个子序列

search_n() 搜寻「连续发生 n 次」的子序列

set_difference() 差集

set_intersection() 交集

set_symmetric_difference() 对称差集

set_union() 联集

sort() 排序

stable_partition() 切割并保持元素相对次序

stable_sort() 排序并保持等值元素的相对次序

swap() 置换(对调)

swap_range() 置换(指定范围)

transform() 以两个序列为基础,交互作用产生第三个序列

unique() 将重复的元素摺叠缩编,使成唯一

unique_copy() 将重复的元素摺叠缩编,使成唯一,并复制到他处

upper_bound() 上限

How to learn C++ and find all STL Algorithm reference的更多相关文章

  1. STL algorithm 头文件下的常用函数

    algorithm 头文件下的常用函数 1. max(), min()和abs() //max(x,y)和min(x,y)分别返回x和y中的最大值和最小值,且参数必须时两个(可以是浮点数) //返回3 ...

  2. STL algorithm算法merge(34)

    merge原型: std::merge default (1) template <class InputIterator1, class InputIterator2, class Outpu ...

  3. STL algorithm算法mismatch(37)

    mismatch原型: std::mismatch equality (1) template <class InputIterator1, class InputIterator2> p ...

  4. STL algorithm算法is_permutation(27)

    is_permutation原型: std::is_permutation equality (1) template <class ForwardIterator1, class Forwar ...

  5. STL algorithm算法lower_bound和upper_bound(31)

    lower_bound原型: function template <algorithm> std::lower_bound default (1) template <class F ...

  6. c++ stl algorithm: std::fill, std::fill_n

    std::fill 在[first, last)范围内填充值 #include <iostream> #include <vector> #include <algori ...

  7. STL algorithm算法minmax,minmax_element(36)

    minmax原型: std::minmax C++11 C++14 default (1) template <class T> pair <const T&,const T ...

  8. c++ stl algorithm: std::find, std::find_if

    std::find: 查找容器元素, find仅仅能查找容器元素为<基本数据类型> [cpp] view plaincopy #include <iostream> #incl ...

  9. STL algorithm算法min,min_element(35)

    min样板: std::min C++98 C++11 C++14 default (1) template <class T> const T& min (const T& ...

随机推荐

  1. Apple MDM Supported configurable settings

    导读:可以通过MDM实现的配置:Apple MDM Supported configurable settings 一.Accounts(账户信息) 1.Exchange ActiveSync(交换a ...

  2. 好用的ssh工具oh-my-zsh / iterm2

    The manual way 1. Clone the repository: git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh- ...

  3. Ecshop实现仿Taobao地区运费模板

    目录: 1.Ecshop后台配送方式创建 2.商品绑定配送方式的运费模板 2.1 数据表“ecs_goods”增加一个字段,执行下面SQL语句: 2.2 后台添加/编辑 商品 调出已经安装配送方式 & ...

  4. window2003安全设置

    1.    网上邻居->右键 属性->本地连接 右键属性->Microsoft网络的文件和打印机共享去掉选中   (影响端口: 139,445) 2.    禁止ADMIN$缺省共享 ...

  5. Hello Stacked Column Chart

    <navigation:Page xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/to ...

  6. 传统ASP.NET开发和MVC的设计思想

    传统ASP.NET开发 第一步:客户端请求服务器: 第二步:服务器从数据库取得数据处理后响应给客户端页面. MVC的设计思想 第一步:客户端请求控制器(里面的一个方法): 第二步:控制器从数据库里取得 ...

  7. 浏览器对象模型BOM(Browser Object Model)

    1.结构 BOM是Browser Object Model的缩写,简称浏览器对象模型 BOM提供了独立于内容而与浏览器窗口进行交互的对象 由于BOM主要用于管理窗口与窗口之间的通讯,因此其核心对象是w ...

  8. git/ TortoiseGit 在bitbucket.org 使用证书登陆

    背景:使用https协议在bitbucket中进行pull,push 时每次都要输入密码,比较麻烦还耽误时间,在网上找了下保存密码的方式 使用在用户环境变量中配置_netrc 文件的方式(http:/ ...

  9. Android中Linux suspend/resume流程

    Android中Linux suspend/resume流程首先我们从linux kernel 的suspend说起,不管你是使用echo mem > /sys/power/state 或者使用 ...

  10. 明晰三种常见存储技术:DAS、SAN和NAS

    随着企业网络应用的时间和应用的数据量的加大,企业已经感觉到存储容量和性能落后与网络的应用发展需求,特别是流媒体企业,在这种应用条件下满足用户的存储需求的技术应用诞生,DAS.NAS和SAN三种存储技术 ...