IGRAPH IN R: Find the path between vertices that maximizes the product of edge attributes
问题 I need to find a way to find the path between two vertices that maximizes the product of edge attributes. In my case the edge attribute is a probability of connection. Let's assume I want to find the maximum probability path between the vertex 1 and 4 in the following example: require(igraph) G<-graph.data.frame(as.data.frame(cbind(id1=c(1,1,2,3,1,4),id2=c(2,3,4,4,5,5),weight=c(0.5,0.35,0.5,0.9,0.6,0.6))), directed=FALSE) plot(G, edge.label=paste(E(G),"=",signif(E(G)$weight, digits=1)),