|
Post by account_disabled on Mar 19, 2024 9:25:28 GMT
理想的图库应该支持多种不同类型的图。但随后需要花费大量时间来支持人们想要的所有功能。正确实现图算法非常困难。在这篇文章中的创建者描述了创建他自己的算法该算法必须修改五次我比较过的每一个实现都是错误的。那么库中应该存在哪些算法呢人们想要用图表解决的问题数量之多是荒谬的凯利告诉我。这与我的经历以及我采访过的每个人的经历都是一致的。有时图表似乎具有太多的功能超出了我的理解范围。 问题是你决定在哪里划清界限凯利总结道。对于来说边缘意味着大约种不同的图码。相比之下由 亚美尼亚电报号码数据 个包组成的整个标准库包含大约行。鉴于这一切您在标准库中看不到图形也就不足为奇了。语言维护者必须决定支持哪些类型的图将哪些拓扑分类为特殊情况以及要包含哪些算法。将这种维护工作外包是有意义的这已经是语言开发的主导趋势。即使是以自带电池而闻名的也去掉了块电池。第三方可以就如何设计图形以及包含哪些算法做出明确的决定。 但接下来他们面临另一个问题如何表示图形界面太多的实现选项假设我们只支持最简单的有向图节点有标识符边没有也没有关联的数据。如何对这样的图进行编码源以下是编程语言在内部存储它的四种可能的方式边列表。邻接表。邻接矩阵。一组三个相互链接的结构。不同表示中的不同图操作具有不同的性能特征。我们以一个有个节点和条边的图为例。如果使用邻接矩阵表示则需要一个包含个和个的矩阵。如果我们采用边列表则只需要对节点。
|
|