gpt4 book ai didi

javascript - 图的初始节点位置是否会影响 ForceAtlas2 算法中的渐近图配置?

转载 作者:塔克拉玛干 更新时间:2023-11-03 06:23:11 31 4
gpt4 key购买 nike

我正在尝试使用 sigma.js 可视化我的图形它提供了ForceAtlas2 algorithm plugin用于图形绘制。

我想知道节点的初始位置(x 和 y 坐标)是否会影响渐近结果图的布置。

我在使用这个算法插件时没有深入了解,所以我把有初始坐标的节点放在我自己的算法中粗略地绘制出我的目标图形形状的蓝图,然后让ForceAtlas2算法来调整并美化它。

如果图形的初始配置不影响 ForceAtlas2 生成的结果图形形状,那么我就不必为设置这些初始坐标进行不必要的计算。

最佳答案

是的 - 查看 the documentation :

The force-directed drawing has the specificity of placing each node depending on the other nodes. This process depends only on the connections between nodes. Eventual attributes of nodes are never taken into account. This strategy has its drawbacks. The result varies depending on the initial state. The process can get stuck in a local minimum. It is not deterministic, and the coordinates of each point do not reflect any specific variable. The result cannot be read as a Cartesian projection. The position of a node cannot be interpreted on its own, it has to be compared to the others.

举个例子,两个节点由一条边相连。 FA2会改变它们之间的距离,但不会影响边缘与水平面的 Angular ,所以这取决于初始值

举一个更有趣的例子,假设一个系统有五个节点,O、A、B、C 和 D,连接 O-A、O-B、O-C 和 O-D。一个渐近位置是 O 在原点,A、B、C 和 D 围绕它形成一个四 Angular 星。另一个将点按 B、A、C 和 D 的顺序排列。因此,结果同样取决于初始条件,但这次不能轻易转换。

关于javascript - 图的初始节点位置是否会影响 ForceAtlas2 算法中的渐近图配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30068291/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com