更改

删除1字节 、 2020年11月8日 (日) 17:50
无编辑摘要
第25行: 第25行:     
* Cormen et al. suggest an implementation in which the vertices are represented by index numbers.<ref>{{cite book| title = Introduction to Algorithms, Second Edition| publisher = MIT Press and McGraw-Hill | year = 2001|author1 = Thomas H. Cormen|author2 = Charles E. Leiserson| author3 = Ronald L. Rivest| author4 = Clifford Stein }}</ref> Their representation uses an array indexed by vertex number, in which the array cell for each vertex points to a [[singly linked list]] of the neighboring vertices of that vertex. In this representation, the nodes of the singly linked list may be interpreted as edge objects; however, they do not store the full information about each edge (they only store one of the two endpoints of the edge) and in undirected graphs there will be two different linked list nodes for each edge (one within the lists for each of the two endpoints of the edge).
 
* Cormen et al. suggest an implementation in which the vertices are represented by index numbers.<ref>{{cite book| title = Introduction to Algorithms, Second Edition| publisher = MIT Press and McGraw-Hill | year = 2001|author1 = Thomas H. Cormen|author2 = Charles E. Leiserson| author3 = Ronald L. Rivest| author4 = Clifford Stein }}</ref> Their representation uses an array indexed by vertex number, in which the array cell for each vertex points to a [[singly linked list]] of the neighboring vertices of that vertex. In this representation, the nodes of the singly linked list may be interpreted as edge objects; however, they do not store the full information about each edge (they only store one of the two endpoints of the edge) and in undirected graphs there will be two different linked list nodes for each edge (one within the lists for each of the two endpoints of the edge).
Cormen等人提出了一种用索引号来表示顶点的实现方法。Leiserson|作者3 = Ronald L. Rivest|作者4 = Clifford Stein }}</ref>他们的表示方法使用了一个按顶点编号索引的数组,其中每个顶点的数组单元指向该顶点的相邻顶点的[[单链列表]]。在这种表示方式中,单链表的节点可以被解释为边缘对象;但是,它们并不存储每个边缘的全部信息(它们只存储边缘两个端点中的一个),在非定向图中,每个边缘将有两个不同的链表节点(边缘两个端点中的每一个在列表中)。
+
Cormen等人提出了一种用索引号来表示顶点的实现方法。Leiserson|作者3 = Ronald L. Rivest|作者4 = Clifford Stein }}</ref>他们的表示方法使用了一个按顶点编号索引的数组,其中每个顶点的数组单元指向该顶点的相邻顶点的[[单链列表]]。在这种表示方式中,单链表的节点可以被解释为边缘对象;但是,它们并不存储每个边缘的全部信息(它们只存储边缘两个端点中的一个),在非定向图中,每个边缘将有两个不同的链表节点(边缘两个端点中的每一个在列表中)。
     
7,129

个编辑