📄 tree.h
字号:
#ifndef TREE_H
#define TREE_H
#include "list.h"
#include "poly.h"
#include "string.h"
typedef struct treeType
{
list vertices;
mystring treeName;
}*tree;
typedef struct vertexType
{
list edges;
int level;
poly vInfo;
}*vertex;
typedef struct edgeType
{
vertex from;
vertex to;
poly eInfo;
}*edge;
tree newTree(mystring name);
vertex newVertex(poly el);
edge newEdge(vertex start,vertex end);
void treeInsertVertex (tree t, poly v);
vertex searchVertex(tree t,poly x);
void treeInsertEdge (tree t, poly from, poly to);
edge searchEdge(tree t,poly start,poly end);
void treeInsertEdgeInfo (tree t, poly from, poly to, poly info);
void visit(poly x);
void treePreOrder (tree t, vertex root);
void treeInOrder (tree t, vertex root);
void treePostOrder (tree t, vertex root);
void treeLevelOrder (tree t); //从根开始遍历
/*
void treeToJpg (tree t, char *fileName);
*/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -