MGraph BuildGraph()
{
MGraph Graph;
Edge E;
Vertex V;
int Nv,i;
scanf("%d",&Nv);
Graph=CreateGraph(Nv);
scanf("%d",&Graph->Ne);
if (Graph->Ne!=0)
{
E=(Edge)malloc(sizeof(struct ENode));
for (i=0;i<Graph->Ne;i++)
{
scanf("%d %d %d",&E->v1,&E->v2,&E->v3);
InsertEdge(Graph,E);
}
}
// 如果顶点有数据
for (V=0;V<Graph->Nv;i++)
scanf("%c",Graph->Data[V]);
return Graph;
}