> For the complete documentation index, see [llms.txt](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/05.0/05.1.md).

# 05.1 图和节点

图G(V,E)是由一组有限的，非空的顶点集V（或者节点）以及一组边E组成。有两种主要的类型：有环图和无环图。有环图是指其全部或者部分顶点集存在闭环。在无环中，没有闭环。有向图是其边有方向性，有向无环图是没有闭环的有向图。

通常一个节点（node)包含很多信息，所以node一般使用Go的数据结构来实现
