i want to construct an undirected weighted graph (as a python dict), where weight is the Euclidean distance between two nodes connected by edges given in the Mapdata.csv file. I cant find anything on google. please help me. I want python code for creating weighted undirected graph.
To represent a graph in a file, we list the number of vertices and edges, then list the vertices (index followed by its x and y coordinates), then list the edges (pairs of vertices). For example, the following figure shows a graph and its file representation: