Description: Using an undirected graph adjacency matrix representation to complete the map creation, graph depth-first traversal, graph breadth-first traversal operation. In which vertex information is character, the graph vertex number by characters in order. The input sample used in the diagram are as follows:
Input Format:
The first line of input two values, the first one is the number of graph vertices, the second one is the number of graph edges
Second row, enter information in each vertex, that enter each vertex character
Start typing in the third line of each side, each side in the form of two vertices of the serial number, in the middle separated by a space, enter the End of an edge wrap
Output format:
First, the output vertex information, the output has finished wrapping
Then the output graph adjacency matrix, if the graph has n vertices, then the output of the form n rows n columns of the adjacency matrix, the output has finished wrapping
The next line of output from the
To Search:
- [agraphfromtheadjacencymatrixconversionoft] - a graph from the adjacency matrix conver
- [vertex] - data structures on the adjacent map matr
- [2007char] - use of adjacency matrix plans depth-firs
- [hello] - Graph adjacency matrix storage structure
- [graph] - Map of the basic training algorithm 1 an
- [HL] - Invoicing management of the textile indu
File list (Check if you may need any files):
main.dsp
main.dsw
main.plg
main.cpp