2 Star 5 Fork 1

libprima / prima

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
NEWS.md 709 Bytes
一键复制 编辑 原始数据 按行查看 历史
Nickolai Belakovski 提交于 2024-01-24 21:44 . PR feedback

New C API

The solver options and problem definition options moved to a new structs that must be initialized before use and the results moved also:

prima_problem problem;
prima_init_problem(&problem, n);
problem.x0 = x0;
prima_options options;  
prima_init_options(&options);  
options.iprint = PRIMA_MSG_EXIT;  
options.rhoend= 1e-3;  
options.maxfun = 200*n;  
prima_result result;
const int rc = prima_bobyqa(&fun, &problem, &options, &result);
// print results, or copy them, or use them in computations
prima_free_result(&result);

Result struct should be freed after use with its dedicated free function. Make sure to either use the results or copy them into your own structure before freeing.

1
https://gitee.com/libprima/prima.git
git@gitee.com:libprima/prima.git
libprima
prima
prima
main

搜索帮助