如何最小化 C++使用升压功能?

发布于 2024-10-16 01:52:52 字数 214 浏览 10 评论 0原文

所以我有一个函数,比如

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

不再让梦枯萎 2024-10-23 01:52:52

我假设您正在尝试进行“简单”数学多维最小化。

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 ;)

过潦 2024-10-23 01:52:52

据我了解,您正在寻找执行数学优化的代码。

据我所知,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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文