tu.head
来自「严版(c语言)数据结构中图的实验」· HEAD 代码 · 共 56 行
HEAD
56 行
#define INFINITY INT_MAX
#define MAX_VERTEX_NUM 20
#define MAXQSIZE 10 //最大队列长度
#define FALSE 0
#define TRUE 1
typedef int VRType;
typedef char VertexType;
typedef int Status;
typedef int QElemType;
typedef struct
{
QElemType *base;
int front;
int rear;
} SqQueue;
typedef struct ArcNode
{
int adjvex;
struct ArcNode *nextarc;
}ArcNode;
typedef struct VNode
{
VertexType data;
ArcNode *firstarc;
}VNode, AdjList[MAX_VERTEX_NUM];
typedef struct
{
AdjList vertices;
int vexnum, arcnum;
}ALGraph;
Status (*VisitFunc)(int v);
int w;
void CreateGraph(ALGraph &G);
void BFSTraverse(ALGraph G, Status (*Visit)(int v));
void DFSTraverse(ALGraph G, Status (*Visit)(int v));
Status printGraph(int v);
int FirstAdjVex(ALGraph G, int v);
int NextAdjVex(ALGraph G, int v, int w);
void DFS(ALGraph G, int v);
Status InitQueue(SqQueue &);
Status EnQueue(SqQueue &, QElemType);
Status DeQueue(SqQueue &, QElemType &);
Status QueueEmpty(SqQueue);
void Bprint(ALGraph G);
void Dprint(ALGraph G);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?