giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yazan Boshmaf <bosh...@ece.ubc.ca>
Subject Giraph examples: SimpleShortestPathsComputation
Date Thu, 30 May 2013 22:25:17 GMT
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.

Mime
View raw message