如何最小化 C++使用升压功能?
所以我有一个函数,比如
int f(int i, int j, int c, double d) {
/*...any operations with i, j, c, d affect on some return int we have*/
}
boost 或 STD 中是否有任何东西可以接受我的函数并找到最小化函数输出的输入参数?
so I have a function like
int f(int i, int j, int c, double d) {
/*...any operations with i, j, c, d affect on some return int we have*/
}
Is there any thing in boost or STD that would take my function and find the input arguments that minimize my function output?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我假设您正在尝试进行“简单”数学多维最小化。
GSL 有一些函数可以帮助您实现此目的。我不会再看
;)
I assume you're trying to do a "simple" mathematical multi-dimensional minimization.
GSL has some functions to help you with this. I wouldn't look any further
;)
据我了解,您正在寻找执行数学优化的代码。
据我所知,Boost 没有任何东西可以做到这一点,标准库也没有。但是,NLopt 可能就是您正在寻找的。
I understand you to be looking for code to perform mathematical optimization.
Boost does not have anything to do this as far as I know, and neither does the standard library; however, NLopt may be what you're looking for.
您可以使用布伦特算法来最小化简单函数。
http://www. boost.org/doc/libs/1_65_0/libs/math/doc/html/math_toolkit/roots/brent_minima.html
You can use Brent's algorithm to minimise simple functions.
http://www.boost.org/doc/libs/1_65_0/libs/math/doc/html/math_toolkit/roots/brent_minima.html