【文件属性】:
文件名称:tarjan:使用Tarjan算法在Go中进行图形循环检测
文件大小:9KB
文件格式:ZIP
更新时间:2021-05-06 23:50:57
go graph tarjan tarjan-algorithm Go
塔里扬
Tarjan是使用Tarjan算法的图循环检测功能。
该算法获取输入图并生成一个切片,其中每个项目都是一个高度连接的顶点的切片。 输入图采用地图的形式,其中键是图形顶点,值是一个切片的for的边。
算法说明: :
基于Gustavo Niemeyer的实施(在mgo / txn中): ://bazaar.launchpad.net/+branch/mgo/v2/view/head:
古斯塔沃·尼迈耶(Gustavo Niemeyer): :
有关API文档和示例,请参见
例子
graph := make ( map [ interface {}][] interface {})
graph [ "1" ] = [] interface {}{ "2" }
graph [ "2" ] = [] interface {}{ "3" }
graph [ "3" ]
【文件预览】:
tarjan-main
----go.mod(42B)
----.github()
--------workflows()
----tarjan_test.go(4KB)
----LICENSE(10KB)
----README.md(2KB)
----tarjan.go(3KB)
----.gitignore(311B)