如何使用Neo4j查找最小生成树?

编程入门 行业动态 更新时间:2024-10-25 20:27:56
本文介绍了如何使用Neo4j查找最小生成树?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想知道如何使用Neo4j查找MST?我发现的大多数示例都是使用Hadoop进行查找的.

I am wondering how to use Neo4j to find the MST? Most examplesI found was using Hadoop to find it.

推荐答案

考虑到当前算法是如何确定MST的,我认为在Cypher中这是不可能的(如果我错了,我很乐意知道).

I don't think that this is possible in Cypher, given how current algorithms determine an MST (if I'm wrong on this, I'd love to know).

相反,我建议您实施一种用于确定MST的算法,例如普里姆算法.这很简单,并且在堆和邻接表的帮助下,性能相对较高.

Instead, I'd recommend implementing one of the algorithms used for determining an MST, e.g. Prim's Algorithm. It's quite straight forward and, with the help of heaps and adjacency lists, is relatively performant.

快速搜索该算法将打开许多链接.

A quick search for the algorithm will turn up many links.

我敢肯定,利用Neo4j的Core API或Traversal API甚至可以帮助事情进行更紧密的集成,而无需先将整个图形表示为邻接表.当然,您可以在嵌入式模式下使用Neo4j进行操作,或者在服务器模式下运行Neo4j时将其转换为服务器插件.

I'm sure leveraging Neo4j's Core API or Traversal API might even help things integrate even more closely, possibly without needing to represent the entire graph as an adjacency list first. And of course you can do that with Neo4j in Embedded Mode or turn it into a Server Plugin in case you're running Neo4j in Server Mode.

让我们知道您的想法!

更多推荐

如何使用Neo4j查找最小生成树?

本文发布于:2023-11-30 21:25:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1651514.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   最小   Neo4j

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!