I have found a minimum spanning tree (MST) of a graph using igraph (minimum.spanning.tree). From this MST I extracted an adjacency matrix with weights. Now I want to get a matrix of the shortest paths in this MST. This is quite easily done using shortest.paths. But I need the matrix A, where the element A(i,j) is the weight of the edge with maximum weight in the shortest path from vertex i to j. I simply do not need the total length of the shortest path in the matrix but only the maximum edge weight. Thanks in advance for any advice. For example
A = matrix(c(0, 0.25, 0, 0, 0.25, 0, 0.5, 0, 0, 0.5, 0, 0.75, 0,0,0.75, 0),nrow=4,ncol=4, byrow = TRUE)
mst<-graph.adjacency(A, mode=c("undirected"), weighted=TRUE)
shortest.paths(mst)
I do not need shortest.paths(mst) but only weight of the maximum edge in the corresponding shortest path.