igraph-help
[Top][All Lists]
Advanced

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

[igraph] Shortpath with maximum height


From: Romildo Martins
Subject: [igraph] Shortpath with maximum height
Date: Mon, 29 Mar 2010 18:16:36 -0300

Hi,

I would like to know how to function shortestpath choose paths with only edges with weight less than x (dinamic value).

For example, the simple graph below the shortest path between 0 and 3 is 0 - 1 - 3

However if the maximum is 7
(dinamic value), the shortest path is 0 - 2 - 3

g<-graph(c(0,1,0,2,1,3,2,3), directed=FALSE )
g<- graph.adjacency(get.adjacency(g),mode="undirected")
E(g)$weight<-c(1,6,8,5)
plot(g,vertex.shape="circle",  layout=layout.kamada.kawai, edge.label=E(g)$weight)


Thanks a lot

reply via email to

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