///
///
// Figure function function graph.h //
///
//
#include "graph.h"
Template
Void graph_creat (graph
{
Graphopp.creat ();
}
Template
Void graph_dfs (graph
{
Graphopp.dfs ();
}
Template
Void graph_bfs (graph
{
Graphopp.bfs ();
}
Template
Void graph_print (graph
{
Graphopp.printnode ();
}
Void graph ()
{
Graph
DO
{
COUT << "Operation:" << Endl
<< "1) Establishment Map" << ENDL
<< "2) The depth priority search" << Endl
<< "3) The Guangtian Priority Search" << Endl
<< "4) Print Figure" << Endl
<< "X) Exit Sort Sort Operation" << ENDL;
INT ITEM;
Item;
Switch (item)
{
Case 1: graph_creat (graphopp); Break;
Case 2: graph_dfs (graphopp); Break;
Case 3: graph_bfs (graphopp); Break;
Case 4: graph_print (graphopp); Break;
Default: return;
}
WHILE (TRUE);
}