igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Shortest path with highest weights


From: Chris Watson
Subject: Re: [igraph] Shortest path with highest weights
Date: Sun, 4 Jan 2015 10:11:37 -0500

I think you want to use 'all_shortest_paths' instead of 'get.shortest.paths'

On Sun, Jan 4, 2015 at 4:31 AM, Ragia Ibrahim <address@hidden> wrote:
Dear group,
kindly I have a graph that got the following edges:
 6 -> 4 with prob 0.4
 4 -> 3 with prob 0.2

6 -> 7 with prob 0.1
7 -> 3 with prob 0.01

I want to get the shortest path between 6, 3 with the highest probability "prob"
this I wrote this:
max(E(G,path=get.shortest.paths(G,6,3)$vpath[[1]])$prob)

this do not give me the vertices in between, how can I get them? and can I multiply probabilities instead of adding ?

your reply is highly appreciated
thanks in advance
Ragia

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



reply via email to

[Prev in Thread] Current Thread [Next in Thread]