Figure function function graph.h

xiaoxiao2021-03-06  103

///

///

// Figure function function graph.h //

///

//

#include "graph.h"

Template

Void graph_creat (graph & graphopp)

{

Graphopp.creat ();

}

Template

Void graph_dfs (graph & graphopp)

{

Graphopp.dfs ();

}

Template

Void graph_bfs (graph & graphopp)

{

Graphopp.bfs ();

}

Template

Void graph_print (graph & graphopp)

{

Graphopp.printnode ();

}

Void graph ()

{

Graph graphopp;

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);

}

转载请注明原文地址:https://www.9cbs.com/read-102104.html

New Post(0)