boost
文章平均质量分 93
seamanj
这个作者很懒,什么都没留下…
展开
-
普通指针到智能指针的转换
普通指针到智能指针的转换int* iPtr = new int(42);shared_ptrint> p(iPtr);智能指针到普通指针的转换int* pI = p.get();注意的地方:那就是不要将智能指针与普通指针混用。如果项目允许,坚持使用智能指针,避免原生指针。智能指针与普通指针需要特别特别特别的小心翼翼,比如以下的情况。转载 2016-01-12 23:19:24 · 24902 阅读 · 0 评论 -
install boost 1.6.0
1. download boost 1.6.0 from the official websitehttp://www.boost.org/users/history/version_1_60_0.html2.extract the compressed file to a target directory, in my case it's:C:\work_files\boost_原创 2016-03-28 22:01:52 · 1906 阅读 · 0 评论 -
Graph Concepts
Graph ConceptsThe heart of the Boost Graph Library (BGL) is the interface, or concepts (in the parlance of generic programming), that define how a graph can be examined and manipulated in a data-str转载 2016-03-05 01:48:56 · 644 阅读 · 0 评论 -
shared_ptr and "<"
a shared_ptr implements some comparison operators- e.g., a shared_ptr implements the “- but, it doesn’t invoke “‣ instead, it just promises a stable, strict ordering‣ given two shared pointers转载 2016-03-04 22:23:44 · 403 阅读 · 0 评论 -
Boost Graph
图论是一种数学抽象,它对于解决多种计算机科学问题是非常有用的,Boost.Graph提供了一个基于图论的通用编程接口.Boost.Graph是一个图的封装,在《数据结构》的教科书里,一般都会讲到数组、链表、队列、堆栈、堆、树、图论等。其中前面几个已经在C++标准库(STL)中实现了(如vector,list,stack,queue,heap等),却没有提供一个与树或图对应的实现,实在说不过去。转载 2016-02-05 02:21:35 · 4283 阅读 · 1 评论 -
Boost Graph Library 快速入门
Boost Graph Library 快速入门图领域的数据结构和算法在某些方面比容器更为复杂,图算法在图中移动有着众多的路线,而STL使用的抽象迭代器接口不能有效的支持这些。作为替换,我们为图提供了一个的抽象的结构,其与容器迭代器的目的类似(尽管迭代器扮演着更大的角色)。图1 描述了STL 和BGL 之间的对比图1: The analogy between the STL原创 2016-02-05 02:13:53 · 3187 阅读 · 0 评论 -
something about vertex in graph
#include #include #include #include #include #include #include typedef CGAL::Simple_cartesiandouble> Kernel;typedef Kernel::Vector_3原创 2016-02-17 01:48:28 · 698 阅读 · 0 评论 -
Tuple and Tie
recently came across an interesting feature to C++11: std::tie. One of the features I love about python is that you are able to return multiple values from a function. These get returned in a struct转载 2016-02-03 00:14:44 · 553 阅读 · 0 评论 -
Property Maps
Property MapsThe main link between the abstract mathematical nature of graphs and the concrete problems they are used to solve is the properties that are attached to the vertices and edges of a grap转载 2016-02-11 09:21:54 · 974 阅读 · 0 评论 -
如何安装boost库
详细教程可以参考:http://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html#id321.下载boosthttp://sourceforge.net/projects/boost/?source=typ_redirect2.解压到目标文件夹我这里解压到D:\work_fil原创 2015-12-22 09:55:35 · 2537 阅读 · 0 评论 -
install boost on ubuntu
You can use apt-get command (requires sudo)sudo apt-get install libboost-all-devOr you can callaptitude search boostfind packages you need and install them using the apt-get command.原创 2016-02-13 07:42:25 · 639 阅读 · 0 评论