The creation of graph model is the basis of many problems, and the way of storing a graph is the precondition of every algo- rithm. Adjacency matrix, in the form of two - dimensional array, is one of the popular methods of storing a graph. On this basis, the initialization of adjacency matrix is discussed in the following situations : topological sort, shortest path and status changing.%图的应用问题的求解前提是图的模型的创建,而图在计算机中的存储方式是各类算法的使用前提。用二维数组表示的邻接矩阵来存储图,是常用的方式。在此基础上,探讨了拓扑排序、最短路径及状态转换问题的图的邻接矩阵的初始化问题。
展开▼