Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request 合并请求准备清单
详情参见此处
具体内容
rm::fminbnd
,使用黄金分割法实现了该功能;rm::fminunc
,使用共轭梯度法和下山单纯形法实现了该功能;rm::derivative
和rm::grad
;optimal.hpp
#84 建议的开设新的optimal.hpp
文件,而是在numcal.hpp
文件中添加的以上内容,但源文件做了区分;rm::fmincon
,需求暂时不高,后续版本继续完善optimal.hpp
#84 .本地单元测试
分别对以下内容做了准确性测试
测试结果如下
详细内容可参考
<project>/modules/core/test/test_optimal.cpp
文件本地基准测试结果
其中
cv::ConjGradSolver
快近3
倍,容许误差、最大迭代次数均相同;RosenBrock
函数,比 OpenCV 慢约3.7
倍,容许误差、最大迭代次数均相同。