I need help with building a complete graph from a file.
The format in the file is as follows.
[ vertex 1] [ x_coordinate 1] [ y_coordinate 1] [cityname 1]
[ vertex 2] [ x_coordinate 2] [ y_coordinate 2] [cityname 2]
. . .
[ vertex n] [ x_coordinate n] [ y_coordinate n] [cityname n]
What kind of data structure shall I use in order to store date in a complete graph so there is an edge between every pair?
is there any special set up to load data into the graph?
I am not really sure how to proceed...below is the code I have so far...
and then... I need to find weight of each edge by the Euclidean distance
metric. Do I need to generate subsets of 2 nodes in order to calculate the edge weight?