上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页
摘要: 1.简介 除了固定大小的array外,其他容器都提供高效、灵活的内存管理 string 和 vector是连续内存,由下标访问非常快速,但是在中间删除和添加元素非常耗时,在一次插入或删除后,需要移动所有元素来保持连续存储 list 和 forward_list是添加和删除非常快速,但是,不支持元素的 阅读全文
posted @ 2019-10-17 11:35 penuel 阅读(110) 评论(0) 推荐(0)
摘要: Eigen帮助文档的地址:http://eigen.tuxfamily.org/dox/pages.html Eigen的论坛:http://forum.kde.org/viewforum.php?f=74 ### 1.一些基本运算 ``` #include using namespace std; 阅读全文
posted @ 2019-10-10 19:46 penuel 阅读(6067) 评论(0) 推荐(0)
摘要: 1.等待事件 std::mutex m; void wait() { std::unique_lock<std::mutex> lk(m); lk.unlock(); std::this_thread::sleep_for(std::chrono::millisenconds(100));//休眠1 阅读全文
posted @ 2019-09-23 20:14 penuel 阅读(399) 评论(0) 推荐(0)
摘要: 1.初始化 2.string的一些操作 + empty:返回一个布尔值来判断是否非空 + size:返回对象的长度,无符号整形 + 关系运算:== = 80 ) cout 阅读全文
posted @ 2019-09-23 19:49 penuel 阅读(596) 评论(0) 推荐(0)
摘要: 1.std::mutex类 1.构造函数,std::mutex不允许拷贝构造,也不允许 move 拷贝,最初产生的 mutex 对象是处于 unlocked 状态的。 2.lock(),调用线程将锁住该互斥量。线程调用该函数会发生下面 3 种情况:①如果该互斥量当前没有被锁住,则调用线程将该互斥量锁 阅读全文
posted @ 2019-09-23 11:33 penuel 阅读(417) 评论(0) 推荐(0)
摘要: 1.先上几个视频网站 1. "英文" 2. "中文" 阅读全文
posted @ 2019-09-23 11:26 penuel 阅读(155) 评论(0) 推荐(0)
摘要: void function(); void function1(); std::thread t1( function ); //启动一个新线程t1与function关联 std::thread t2 = std::move(t1); //将t1限行的转移给t2 t1 = std::thread( 阅读全文
posted @ 2019-09-04 19:49 penuel 阅读(254) 评论(0) 推荐(0)
摘要: #include <iostream>#include <thread>#include <windows.h> using namespace std;void switch_ab (int &a, int &b) //参数是引用可更改 //void switch_ab (int &a, int 阅读全文
posted @ 2019-09-04 19:22 penuel 阅读(347) 评论(0) 推荐(0)
摘要: #include <iostream>#include <thread>#include <unistd.h>void hello(){ while(1) { std::cout << "hello world" << std::endl; for(int i=0;i<999999999;i++); 阅读全文
posted @ 2019-09-04 19:11 penuel 阅读(194) 评论(0) 推荐(0)
摘要: 工作空间名为catkin_cart 1.安装步骤: https://google-cartographer-ros.readthedocs.io/en/latest/compilation.html 2.按照他的步骤来,会在最后编译的时候出错 3.解决思路。 删除掉之前安装的cere和protobu 阅读全文
posted @ 2019-08-30 11:42 penuel 阅读(812) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页