邻接矩阵有向
2017-05-15 12:22:27 0 举报
有向邻接矩阵
作者其他创作
大纲/内容
jNUM
F
T
printf(\"%d \
printf(\"此邻接关系已经添加过了!\\");
printf(\"请输入结点下标为%d的顶点\\
scanf_s(\"%d %d\
i num_arc;
void CreateGraph(Graph *s)
其他
iNUM
i num_node;
s-arcs[x][y] = 1;
i=0
printf(\"请输入顶点数与边数【空格隔开】!\\");
print_node(&shiyan);
printf(\"\\");i++
j num_node;
chose==2
CreateGraph(&shiyan);
print_node(Graph *s)
i++
输入边x-y
chose==3
j=0
int chose;\tGraph shiyan;
printf(\"弧头或弧尾给定的数超出的结点范围!\\");
void init_node(Graph *s)
i num_node;
chose==1
1 == s-arcs[x][y]
init_node(&shiyan);
s-arcs[i][j] = 0;j++
T
输入chose
printf(\"请输给定的数字!\\");
printf(\"请输入弧头弧尾对应结点下标【格式:x-y,如0-3】!\\");
x s-num_node || y s-num_node
0 条评论
下一页