
hello. My graph is an: typedef adjacency_list < mapS, vecS, undirectedS, my_vertexProperty, property < edge_weight_t, float > > Graph; I have 100 edges, and I also have an array with 100 weights. How do I assign weight[i] to edge[i], and how do I create a weightmap to use in dijkstra_shortest_paths()? Thanks a lot AC

On Wed, 31 Mar 2010, Figa Pelosa wrote:
hello. My graph is an:
typedef adjacency_list < mapS, vecS, undirectedS, my_vertexProperty, property < edge_weight_t, float > > Graph;
I have 100 edges, and I also have an array with 100 weights.
How do I assign weight[i] to edge[i], and how do I create a weightmap to use in dijkstra_shortest_paths()?
The easiest way would probably be the "obvious" one -- iterate through
edges(g) and the weight array in parallel, and assign corresponding
elements. I.e., (using
participants (2)
-
Figa Pelosa
-
Jeremiah Willcock