摘要: # unique_ptr 的使用 `std::unique_ptr`是c++11起引入的智能指针,为什么必须要在c++11起才有该特性,主要还是c++11增加了move语义,否则无法对对象的所有权进行传递。 ## unique_ptr 介绍 - unique_ptr 不共享它的指针。它无法复制到其他 阅读全文
posted @ 2023-08-07 11:30 weihao-ysgs 阅读(157) 评论(0) 推荐(0) 编辑
摘要: # weak_ptr 的使用 $\quad$关于为什么使用 `weak_ptr`,以及他的使用场景,我们在[这篇文章](https://www.cnblogs.com/weihao-ysgs/p/shared_ptr-weak_ptr.html)中已经进行了介绍。而对于其具体的使用方法,比如说如何通 阅读全文
posted @ 2023-08-07 10:47 weihao-ysgs 阅读(153) 评论(0) 推荐(0) 编辑
摘要: # Ceres 求解 Powell’s function 的最小化 $\quad$现在考虑一个稍微复杂一点的例子—鲍威尔函数的最小化。 $\quad{}$ $x=[x_1,x_2,x_3,x_4]$ 并且 $$ \begin{array}{l} f_{1}(x)=x_{1}+10 x_{2} \\ 阅读全文
posted @ 2023-08-07 10:16 weihao-ysgs 阅读(51) 评论(0) 推荐(0) 编辑