摘要: 1. for_each( b, e, p ) 2 使用for_each() 算法遍历数据 3. 使用for_each() 和函数对象修改数据 4. 使用for_each() 的返回值 #include <iostream> #include <algorithm> #include <vector> 阅读全文
posted @ 2015-03-04 17:50 SandKing 阅读(8) 评论(0) 推荐(0)
摘要: 已序容器查找算法 1.lower_bound() 第一个可能的位置 2.upper_bound() 最后一个可能的位置 3.equal_range() 查找第一个和最后一个可能的位置 ***注意:关联式容器有等效的成员函数,性能更佳 #include <iostream> #include <alg 阅读全文
posted @ 2015-03-04 16:19 SandKing 阅读(10) 评论(0) 推荐(0)
摘要: 已序查找算法之 1. binary_search(b, e, v ) --只能找一个; 找到或没找到,不能返回位置 2. binary_search(b, e, v, p ) 3. include(b, e, sb, se ) 4. include(b, e, sb, se, p ) #includ 阅读全文
posted @ 2015-03-04 15:38 SandKing 阅读(7) 评论(0) 推荐(0)
摘要: 1. adjacent_find(b, e) //找两个连续相等的 2. adjacent_find(b, e, p ) #include <iostream> #include <algorithm> #include <vector> using namespace std; bool doub 阅读全文
posted @ 2015-03-04 15:02 SandKing 阅读(6) 评论(0) 推荐(0)
摘要: find_first_of(b, e, sb, se ) 找sb,se中间的任意一个 find_first_on(b , e, sb, se, bp ) 使用逆向迭代器 没有find_last_of算法 string和stl查找的区别 string函数 stl算法 find() find() rfi 阅读全文
posted @ 2015-03-04 14:27 SandKing 阅读(8) 评论(0) 推荐(0)
摘要: Xpdf-Linux安装教程 环境: CentOS5.X 插件:完整软件安装系统 一、 下载 Xpdf-linux 网址: http://www.foolabs.com/xpdf/download.html 要下载的文件: 注:其中,我只使用了xpdf-bin-linux-3.03.tar ,这个看 阅读全文
posted @ 2015-03-04 14:22 SandKing 阅读(97) 评论(0) 推荐(0)
摘要: 1.search() 2.find_end() 注意: 这两个算法是一对 第二个算法应该叫search_end(),但被命名为find_end() #include <iostream> #include <algorithm> #include <vector> #include <list> u 阅读全文
posted @ 2015-03-04 12:34 SandKing 阅读(7) 评论(0) 推荐(0)
摘要: search_n 查找连续匹配的 search 1. search_n(b,e, c, v) 2. search_n(b, e, c, v, p ) --p谓词 3.注意 该算法的第二种形式应该是 search_n_if(b,e,c,p) #include <iostream> #include < 阅读全文
posted @ 2015-03-04 12:03 SandKing 阅读(9) 评论(0) 推荐(0)