请使用提供的“ Edge.h”和“ Tree.h”头文件在C ++中创建“ Graph.h”类并实现城市拓扑图的输入并显示城市之间的邻接矩阵。
Please use the “Edge.h” and “Tree.h” header files provided to create the classes of “Graph.h” in C++ and to implement the input of the city topology map and display the Adjacency matrix between cities. Sample output: Adjacency matrix for graph: 0 1 0 1 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 请使用提供的“ Edge.h”和“ Tree.h”头文件在C ++中创建“ Graph.h”类,并实现城市拓扑图的输入并显示城市之间的邻接矩阵。 样本输出: 图的邻接矩阵: 0 1 0 1 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0
用户评论