Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: <org.jgrapht@io...>  20131231 17:00:46

On Tue, 31 Dec 2013 17:05:50 +0100 "H.N. de Ridder" <hnridder@...> wrote: > Hi, > > no, the ConnectivityInspector ignores the direction of the edges. So if your graph has edges s>t>u and you call connectedSetOf(t), you will get {s, t, u} as the result. If you want to get precisely those nodes that are reachable from t (traversing edges in the "proper" direction only), you can do a breadth first search from t with BreadthFirstInspector. Yes, makes sense. Someone recommended DepthFirstInspector offlist, so I attempted that first (there are a few other properties of the depth first search that I can make use of in the implementation). > > If you want to do this for many nodes, it may be faster to first calculate the transitive closure of the graph and then check the outneighbours of your node. The transitive closure G' of G has an edge u>v precisely when there is a path u==>v in G. Right. > > Do you have a unique top level term from which all useful terms are reachable, or is your construction more complicated? The top level term is chosen manually at compiletime in much the same way that the toplevel term is chosen at runtime in Java. Thanks! M 