Graph Layout Algorithm of Neo4j

五迷三道 提交于 2021-02-08 11:57:29

问题


What is the graph layout algorithm that is used in Neo4j? I would like to have the paper that explain the graph layout algorithm that is shown in NEO4J. I wan to know why the nodes are organized in the way Neo4j presents them.


回答1:


To visualize a graph in the neo4j-browser is used d3 library.

View implementation of d3.layout.force here: layout.ts.




回答2:


The layout algorithm used for visualizing graphs in the Neo4j browser is a force directed algorithm. From Wikipedia:

Their purpose is to position the nodes of a graph in two-dimensional or three-dimensional space so that all the edges are of more or less equal length and there are as few crossing edges as possible, by assigning forces among the set of edges and the set of nodes, based on their relative positions, and then using these forces either to simulate the motion of the edges and nodes or to minimize their energy.

For academic references, there is a chapter from the Handbook of Graph Drawing and Visualization that covers much of the literature here.

In addition to the Neo4j Browser code linked in stdod--'s answer there is a D3 example of force directed layout here.



来源:https://stackoverflow.com/questions/38708570/graph-layout-algorithm-of-neo4j

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!