简体   繁体   English

图形数据结构的C语言实现

[英]Graph data structure implementation in C

I have learned the basics of graph data structures. 我已经了解了图形数据结构的基础。 Now I want to implement all the structure/algorithms/operations that can be performed on graphs. 现在,我想实现所有可以在图形上执行的结构/算法/操作。

Please share some useful links wherein I can get started doing graph implementations in C. 请分享一些有用的链接,在这些链接中,我可以开始使用C实现图实现。

adjacency list and adjacency matrix are the two most classic alternatives for implementing graphs. 邻接表邻接矩阵是实现图的两个最经典的选择。 I'm not sure if there are many examples of each online in C, but here is one for the adjacency matrix representation. 我不知道是否有在C中的每个网上的例子很多,但这里是一个邻接矩阵表示。

The book, The Algorithm Design Manual [PDF] has C code implementing a graph. 算法设计手册》 [PDF]一书包含实现图形的C代码。

For a more thorough textbook on graphs and related algorithms (DFS, Bellman-Ford etc) Introduction to Algorithms (excellent) has pseudocode implementations that you could implement. 有关图形和相关算法(DFS,Bellman-Ford等)的更全面的教科书,“算法简介” (优秀)提供了可以实现的伪代码实现。

The standard adjacency list or matrix representations mentioned by Alex are described in both. 两者都描述了Alex提到的标准邻接表或矩阵表示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM