igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] shortest path on condition, more clear question


From: Tamas Nepusz
Subject: Re: [igraph] shortest path on condition, more clear question
Date: Sat, 1 Nov 2014 21:20:04 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

> when I used the wight (attribute of the graph edge) to get the path
> the "shortest.paths" did get it even condition is not applied for teh whole 
> path
> example 
> node15 linked to node 10 with weight 0
> node 10 linked to node 1 with weight 1
> if I run 
> shortest.paths(graph,15,to=V(graph),mode="out", E(graph)$weight==1)
> the path from node 15 to 1 will show up
> I want to retrieve nodes on the path where all of them satisfy the weight 
> condition.

As I said, remove the edges that do not satisfy the weight condition first. Use
delete.edges(). Then run shortest.paths() with the modified graph.

-- 
T.



reply via email to

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