ocamlgraph中的Goldberg算法可以用来找到最小成本流图吗?

发布于 2024-09-01 00:09:58 字数 600 浏览 2 评论 0原文

我正在寻找 OCaml 中最小成本流图问题的实现。

OCaml 库 ocamlgraph 具有 Goldberg 算法实现

论文名为高效实施Goldberg-Tarjan最小成本流算法指出Goldberg-Tarjan算法可以找到最小成本图。问题是,ocamlgraph 算法也能找到最小成本吗?库文档仅声明它至少适用于最大流量问题。

如果没有,是否有人有一个很好的最小成本优化算法代码的链接?然后我会手动将其翻译成 OCaml。如果我在维基百科上错过了,请原谅我:第一天流网络上的算法太多了!

I'm looking for an implementation to the Minimum Cost Flow graph problem in OCaml.

OCaml library ocamlgraph has Goldberg algorithm implementation.

The paper called Efficient implementation of the Goldberg-Tarjan minimum-cost flow algorithm is noting that Goldberg-Tarjan algorithm can find minimum cost graph. Question is, does ocamlgraph algorithm also find the minimum cost? Library documentation only states, that it's suitable at least for the maximum flow problem.

If not, does anybody have a good link to a nice any minimum cost optimization algorithm code? I will manually translate it into OCaml then. Forgive me, if I missed it on Wikipedia: there are too many algos on flow networks for the first day!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

飘落散花 2024-09-08 00:09:58

ocamlgraph 目前不提供这样的算法。这是一个经过充分研究的问题,网上有大量的代码和描述,维基百科 指出了几种可能的方法。

ocamlgraph currently doesn't provide such algorithm. This is a well-studied problem and there is plenty of code and descriptions on the net, also Wikipedia points to several possible approaches.

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