📄 tu.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 + -