第1行: |
第1行: |
− | --[[用户:趣木木|趣木木]]([[用户讨论:趣木木|讨论]])在篇首写下 本词条由[[用户名]]初步翻译
| + | '''粗体文字''' --[[用户:趣木木|趣木木]]([[用户讨论:趣木木|讨论]])在篇首写下 本词条由[[用户名]]初步翻译 |
| + | 本词条由信白初步翻译 |
| 此词条暂由彩云小译翻译,未经人工整理和审校,带来阅读不便,请见谅。 | | 此词条暂由彩云小译翻译,未经人工整理和审校,带来阅读不便,请见谅。 |
| | | |
第23行: |
第24行: |
| A graph data structure consists of a finite (and possibly mutable) set of vertices (also called nodes or points), together with a set of unordered pairs of these vertices for an undirected graph or a set of ordered pairs for a directed graph. These pairs are known as edges (also called links or lines), and for a directed graph are also known as arrows. The vertices may be part of the graph structure, or may be external entities represented by integer indices or references. | | A graph data structure consists of a finite (and possibly mutable) set of vertices (also called nodes or points), together with a set of unordered pairs of these vertices for an undirected graph or a set of ordered pairs for a directed graph. These pairs are known as edges (also called links or lines), and for a directed graph are also known as arrows. The vertices may be part of the graph structure, or may be external entities represented by integer indices or references. |
| | | |
− | 一个图的数据结构由一个有限的(也可能是可变的)顶点集(也称为节点或点) ,以及一组无向图的无序顶点对或有向图的有序对组成。这些对称为边(也称为链接或直线) ,对于有向图,也称为箭头。顶点可以是图结构的一部分,也可以是由整数索引或引用表示的外部实体。 | + | 一个图的数据结构由一个有限的(也可能是可变的)顶点集(也称为节点或点) ,以及一组无向图的无序顶点对或有向图的有序对组成。这些连线称为边(也称为链接或直线) ,对于有向图,也称为箭头。顶点可以是图结构的一部分,也可以是由整数索引或引用表示的外部实体。 |
| | | |
| | | |
第36行: |
第37行: |
| | | |
| ==Operations== | | ==Operations== |
| + | 操作 |
| --[[用户:趣木木|趣木木]]([[用户讨论:趣木木|讨论]])章节名记得翻译 | | --[[用户:趣木木|趣木木]]([[用户讨论:趣木木|讨论]])章节名记得翻译 |
| The basic operations provided by a graph data structure ''G'' usually include:<ref name="gt-ops">See, e.g. {{harvtxt|Goodrich|Tamassia|2015}}, Section 13.1.2: Operations on graphs, p. 360. For a more detailed set of operations, see {{citation|contribution=Chapter 6: Graphs and their data structures|pages=240–282|title=LEDA: A platform for combinatorial and geometric computing|first1=K.|last1=Mehlhorn|author1-link=Kurt Mehlhorn|first2=S.|last2=Näher|publisher=Cambridge University Press|year=1999}}.</ref> | | The basic operations provided by a graph data structure ''G'' usually include:<ref name="gt-ops">See, e.g. {{harvtxt|Goodrich|Tamassia|2015}}, Section 13.1.2: Operations on graphs, p. 360. For a more detailed set of operations, see {{citation|contribution=Chapter 6: Graphs and their data structures|pages=240–282|title=LEDA: A platform for combinatorial and geometric computing|first1=K.|last1=Mehlhorn|author1-link=Kurt Mehlhorn|first2=S.|last2=Näher|publisher=Cambridge University Press|year=1999}}.</ref> |
第43行: |
第45行: |
| 图形数据结构 G 提供的基本操作通常包括: | | 图形数据结构 G 提供的基本操作通常包括: |
| --[[用户:趣木木|趣木木]]([[用户讨论:趣木木|讨论]])变量斜体 | | --[[用户:趣木木|趣木木]]([[用户讨论:趣木木|讨论]])变量斜体 |
− | * <code>adjacent</code>(''G'', ''x'', ''y''): tests whether there is an edge from the vertex ''x'' to the vertex ''y''; | + | * <code>adjacent</code>(''''G'''', ''''x'''', ''''y''''): tests whether there is an edge from the vertex ''x'' to the vertex ''y''; |
| | | |
| * <code>neighbors</code>(''G'', ''x''): lists all vertices ''y'' such that there is an edge from the vertex ''x'' to the vertex ''y''; | | * <code>neighbors</code>(''G'', ''x''): lists all vertices ''y'' such that there is an edge from the vertex ''x'' to the vertex ''y''; |