You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by yeshwanth kumar <ye...@gmail.com> on 2014/04/20 19:57:14 UTC

finding vertex at certain distance

hi i am trying to find out vertices which are at equal distance from a
vertex. using giraph,
can someone suggest  a good way to do it.

Thanks.

Re: finding vertex at certain distance

Posted by nishant gandhi <ni...@gmail.com>.
https://github.com/nishantgandhi99/giraph/blob/master/Giraph/src/Success/VL.java

use this code.

Nishant Gandhi
M.Tech. CSE
IIT Patna


On Mon, Apr 21, 2014 at 12:48 AM, Schweiger, Tom <th...@ebay.com>wrote:

>  That sounds like a breadth-first search.
>
> Start with all vertexes with a distance of MAX_INTEGER
>
> From the starting vertex, set its distance to zero and send one to all
> neighbors. As vertexes get messages, if the message distance is less than
> the current distance, set the current distance to the message distance and
> send current distance +1 to all the vertexes neighbors.
>
> That will give you the shortest path of every vertex to the source. You
> can stop early if your computation knows the target distance.
>
> Sent from my phone using large fingers and a small keypad.
>
>
> -----Original Message-----
> *From:* yeshwanth kumar [yeshwanth43@gmail.com]
> *Received:* Sunday, 20 Apr 2014, 10:57AM
> *To:* user@giraph.apache.org [user@giraph.apache.org]
> *Subject:* finding vertex at certain distance
>
>  hi i am trying to find out vertices which are at equal distance from a
> vertex. using giraph,
> can someone suggest  a good way to do it.
>
>  Thanks.
>

RE: finding vertex at certain distance

Posted by "Schweiger, Tom" <th...@ebay.com>.
That sounds like a breadth-first search.

Start with all vertexes with a distance of MAX_INTEGER

>From the starting vertex, set its distance to zero and send one to all neighbors. As vertexes get messages, if the message distance is less than the current distance, set the current distance to the message distance and send current distance +1 to all the vertexes neighbors.

That will give you the shortest path of every vertex to the source. You can stop early if your computation knows the target distance.

Sent from my phone using large fingers and a small keypad.

-----Original Message-----
From: yeshwanth kumar [yeshwanth43@gmail.com]
Received: Sunday, 20 Apr 2014, 10:57AM
To: user@giraph.apache.org [user@giraph.apache.org]
Subject: finding vertex at certain distance

hi i am trying to find out vertices which are at equal distance from a vertex. using giraph,
can someone suggest  a good way to do it.

Thanks.