2011年4月27日 星期三

The example creates an empty graph and uses readGraph() with the file samplegraph.dat to load the vertices, edges and weights. An output statement uses toString() to display the graph. The following is a listing of the file with an accompanying picture of the graph :- File samplegraph.dat :