简体   繁体   English

D3.js用于力导向图的算法是什么?

[英]What algorithms does D3.js use for the force-directed graph?

I would be interested to know exactly what algorithms D3 uses to achieve the force-directed graph feature in the library. 我很想知道D3使用什么算法来实现库中的力导向图功能。 Having read Kobourov's summary of the history of force-directed graphs left me a bit baffled as to what is the exact algorithm or method (combination of algorithms / heuristics) used in the library. 阅读了Kobourov关于力导向图的历史的总结让我有点困惑的是,库中使用的确切算法或方法(算法/启发式的组合)是什么。

D3 API reference says Barnes-Hut algorithm is used to calculate the charges acting on bodies, an O(N*log(N)) operation. D3 API参考说Barnes-Hut算法用于计算作用于物体的电荷,O(N * log(N))操作。 Kobourov's article mentions that Quigley-Eades algorithm, and Hu's algorithm are multilevel algorithms that make use of Barnes-Hut. Kobourov的文章提到Quigley-Eades算法和Hu的算法是利用Barnes-Hut的多级算法。 Is one of them utilized in some way in D3? 其中一个是在D3中以某种方式使用的吗?

The API wiki futher says Verlet integration is used for particle positioning. API wiki进一步说,Verlet集成用于粒子定位。 The source code mentions Gauss-Seidel algorithm, which in turn is mentioned both in Hu's algorithm and Dwyer's graph layout paper . 源代码提到了Gauss-Seidel算法,而Huss 算法和Dwyer的图形布局文件都提到了这一算法 I guess the question I'm looking an answer to is what "integrative" algorithm D3 utilizes; 我想我正在寻找答案的问题是D3使用的“综合”算法; Kobourov's article lists several and D3 force-directed features don't directly seem to fit any of those. Kobourov的文章列出了几个和D3强制导向的功能似乎并不适合任何一个。

In the original d3 paper , Mike Bostock & al. 在最初的d3论文中 ,Mike Bostock等人。 wrote that Dwyer's implementation is used for the force graph layout : 写道,Dwyer的实现用于强制图布局:

The force layout combines physical simulation and iterative constraint relaxation [7] for stable graph layout. 力布局结合了物理模拟和迭代约束松弛[7],用于稳定的图形布局。

[7] T. Dwyer. [7] T. Dwyer。 Scalable, versatile and simple constrained graph layout. 可扩展,通用且简单的约束图形布局。 In EuroVis, 2009. 在EuroVis,2009年。

For more information, Dwyer's paper describes in details the whole algorithm. 有关更多信息, Dwyer的论文详细描述了整个算法。

嗯,这不是你的具体问题的答案,但在他的力导向布局的演示页面上 ,他说,“布局算法受到Tim DwyerThomas Jakobsen的启发。”

可以在https://github.com/mbostock/d3/wiki/Force-Layout上找到Force-Layout算法的概述。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM