I have a graph I created from a data frame, in the form of from, to, cost
columns. I also have a path (as a succession of vertexes, in the vpath
format of igraph
) which is valid (my graph is directed).
Is there any function that, given my graph and my path, would give me the cost of that path?
I'm not asking for the shortest path, as I obtained the path from all_shortest_paths
. However, I only get the node succession and not the weight of the path, which I also need.
Edit: Data
This is my dataframe which I turn into the graph: http://www.sharecsv.com/s/47209742f0052a37e17db37ea3af63ac/arcsWithCost.csv
And my path is 15 4 50 212 183 112 114 37 228 119
Cannot get edge ids, invalid vertex id, Invalid vertex id
– Annabal