⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tu.head

📁 严版(c语言)数据结构中图的实验
💻 HEAD
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -