I managed to solve this problem at last :-)
What was happening was each time my Walker traversed an edge of the graph
the Edge's 'visitted' attribute was set to true. So when another walked
tried to go over the graph later it failed because it thought that all the
nodes had been visitted already.
So I put something like this in the code before each walk to reset all the
edge's methods:
for (Object o:this.graph.getEdges()) {
((Graphable)o).setVisited(false);
}
Although this isn't a bug I think it's a bit unintuitive, to me it seems
that two independent walkers should be able to traverse a graph without
getting in each other's way. Others might disagree with me, and even if you
agree it might be more hassle than it's worth to change. I suggest adding
something the api about this (apologies if it's there and I missed it).
Cheers,
Nick
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Problem-iterating-over-a-graph-tp6676019p6881855.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users