|
From: Nick C. <nic...@ve...> - 2003-01-28 17:38:52
|
Hi, We've discovered a potentially bad bug in RePast 2.0 in the DefaultEdge class. The bug will occur under the following conditions: DefaultNode i = new DefaultNode(); DefaultNode j = new DefaultNode(); DefaultNode k = new DefaultNode(); DefaultEdge edge = new DefaultEdge(i, j); i.addOutEdge(edge); j.addInEdge(edge); // this much above is fine. The line below is the problem. edge.setTo(k); At this point the edge knows its from node is i and its to node is k. However, we are now caching some connection information in the nodes themselves for efficient lookups of what other nodes a particular node is connected to. DefaultEdge.setTo and DefaultEdge.setFrom doesn't update the nodes' caches correctly and so DefaultNode.hasEdgeTo/From queries may not return the correct answer. Note that if you never call edge.setTo or edge.setFrom then, you will not be effected. A new repast.jar that fixes this problem can be found at: http://repast.sourceforge.net/repast.jar.zip Unzip the jar and replace the one in repast/lib/ with this new one. We should have updated distributions on the web page in few days. If you are confused over whether or not you may be affected by this bug, feel free to email me. Lastly, this new jar also fixes the random stream problem in the Fruch graph layout mentioned a few days ago. Nick -- Nick Collier Social Science Research Computing University of Chicago http://repast.sourceforge.net |