I'm not sure if I follow you. I totally understand zero value for the source vertex, since the distance/hops to itself is zero.
On Fri, May 31, 2013 at 12:25 AM, Yazan Boshmaf <[email protected]> wrote: > Hi all, > > For the SimpleShortestPathsComputation example in "giraph-examples" > module, I noticed that the distance to the source node is set to 0 by > convention. In most applications, however, one actually needs to find > the distance from a node to itself. A distance of 1 means a self-loop > and a greater value means a cycle consisting of more then one unique > node. In my opinion, a distance of 0 does not have a clear meaning: a > nodes is either reachable with 1 <= distance < Double.MAX or > unreachable with distance = Double.MAX, all from a given source node. > > Suggestions: > > As the values of all nodes are set to Double.MAX in seuperstep 0, I > would initialize minDist to vertex.getValue().get() in > SimpleShortestPathsComputation.java:65 > > What do you think? > > All the best, > Yazan > > P.S. Please let me know if such questions should go to the user list. > -- Maria Stylianou Intern at Telefonica, Barcelona, Spain Master Student of European Master in Distributed Computing<http://www.kth.se/en/studies/programmes/master/em/emdc> marsty5.wordpress.com
