博客园试用
1. 在线编辑公式:
NOTE:
第二次引用
1.1 主要公式
(1)
$$\delta=a$$
公式带编号
$$\begin{align}a+b=c\end{align}$$
$$a^2+b=c$$
$$\begin{align}a+b=c\end{align}$$
2. 算法总结
使用 Guass-Newton 算法速度更快用reStructuredText格式写出文件,可以使txt或者rst格式的。 使用sphinx转换为html网页代码,再将html代码复制到博客的HTML代码编辑器中。 reStructuredText转为html需要有python及其插件early_install, sphinx。
| $$\begin{bmatrix} \delta x=a^{_{a}^{a}\textrm{A}} &_{a}^{c}b &ab \\ adfas &dfd &fdf \\ asd &f(x) &g(x) \end{bmatrix}$$ |
(1.1) |

终止条件
2.1 代码演示
int main(int argc, char** argv) { google::InitGoogleLogging(argv[0]); double m = 0.0; double c = 0.0; //std::vector<double*> param(&m, &c); double num[]={m,c}; ceres::Problem problem; for(int i=0; i< kNumObservations; i++){ // AutoDiffCostFunction<Cost,1,1,1> 第一个1表示残差的维度 第二个1表示输入1的维度 第三个1表示输入2的维度 // 有多少个1取决于AddResidualBlock中后面跟了多少个变量,比如现在有&m &c 就是两个输入 /* ceres::CostFunction* cost_function = new ceres::AutoDiffCostFunction<Cost,1,1,1>(new Cost(data[2*i], data[2*i+1])); problem.AddResidualBlock(cost_function, NULL, &m, &c); */ /* ceres::CostFunction* cost_function = new CostFun(data[2*i], data[2*i+1]); problem.AddResidualBlock(cost_function, NULL, &m, &c); */ ceres::CostFunction* cost_function = new CostFun2(data[2*i], data[2*i+1]); problem.AddResidualBlock(cost_function, NULL, num); } ceres::Solver::Options options; options.linear_solver_type = ceres::DENSE_QR; options.max_num_iterations = 25; options.num_threads=5; options.minimizer_type = ceres::TRUST_REGION; options.trust_region_strategy_type = ceres::DOGLEG; ceres::Solver::Summary summary; ceres::Solve(options, &problem, &summary); std::cout<<summary.FullReport()<<std::endl; std::cout<<num[0]<<std::endl; std::cout<<num[1]<<std::endl; }
段落中的代码 hall
2.2 伪代码
LM method
- $k:=0$ $v:=2$
- $Solve:(\boldsymbol{A}+\mu \boldsymbol{I})h_{lm}=-g$

浙公网安备 33010602011771号