?? sorthead.h
字號:
#include<stdlib.h>
#define MAX_VERTER_NUM 20
#define STACK_INIT_SIZE 20
#define STACKINCREMENT 10
/*********************************************************************
*Created on 2007.7.12
*Creared by pdw
*CopyRight pdw
*version 1.1
*********************************************************************/
typedef struct ArcNode{
int adjvex ; //該弧指向的節點在圖中的位置
struct ArcNode *nextArc ; //指向下一條弧
}ArcNode;
typedef struct VNode{
int data;
ArcNode *firstArc; //指向該節點的第一條弧
}VNode,AdjList[MAX_VERTER_NUM];
typedef struct {
AdjList vertices ;
int verNum ,arcNum;
}ALGraph;
typedef struct {
int *base ;
int *top ;
int stacksize ;
}SqStack;
void InitStack(SqStack *S) ; //初始化棧
void Pop(SqStack *S , int *e) ; //節點數據域出棧
void Push(SqStack *S , int e) ; //節點數據域入棧
void AccountInDegree(ALGraph g ,int *indegree[]); //求節點入度
bool StackEmpty(SqStack *S); //判斷存儲入度為0的當前節點的棧是否為空
void CreateGraph_AdjList(ALGraph *g); //建立有向無環圖
void ToPuSort(ALGraph g); //對有向無環圖進行拓撲排序
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -