#include #include #define M 10 typedef struct node { int vex; struct node *next; }JD; typedef struct tnode { int…
VEX 源代码
汇集 VEX 相关的电路原理图、PCB工程文件、单片机/FPGA源代码、数据手册与应用设计方案。
#include #include #define M 20 #define MAX 100 typedef struct node { int vex; int length; struct node *next; }…
/*打印图的邻接矩阵*/ void printgraph(Graph *g) { int i,j; for(i=1;ivexnum;i++) { for(j=1;jvexnum;j++) { printf("%…
/*获取下一个未被访问的邻接节点(深度遍历)*/ int nextadjvex(Graph *g,int vex,int w) { int t; t=firstadjvex(g,w); return t; }
/*深度递归遍历*/ void dfs(Graph *g,int vex) { int w; visited[vex]=1; visitvex(g,vex); for(w=firstadjvex…
#include #include #define M 10 typedef struct node { int vex; struct node *next; }JD; typedef struct tnode { int…
#include #include #define M 20 #define MAX 100 typedef struct node { int vex; int length; struct node *next; }…
/*交通图最短路径程序*/ #include "string.h" #include "stdio.h" typedef struct ArcCell{ int adj; /*相邻接的城市序号*/ }ArcCell; /*定义边的类型…
#include #include #define M 10 typedef struct node { int vex; struct node *next; }JD; typedef struct tnode { int…
#include #include #define M 20 #define MAX 100 typedef struct node { int vex; int length; struct node *next; }…