You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by "Kaepke, Marc" <ma...@haw-hamburg.de> on 2017/04/27 18:20:07 UTC

Graph iteration with triplets or access to edges

Hi everyone,

in Gelly I use the Scatter-Gather Iteration to create clusters depends on edge-values.

During a superstep each vertex has to sum all edge values of its neighbors. The scatter and gather functions both works on one vertex. 

How can I get the out and in-going edges of each vertex? 
Or
Does the iterations works with triplets and if: how?


Best,
Marc

Re: Graph iteration with triplets or access to edges

Posted by Vasiliki Kalavri <va...@gmail.com>.
Hi Marc,

you can access the edge values inside the ScatterFunction using the
getEdges() method. For an example look at SingleSourceShortestPaths [1]
which sums up edge values to compute distances.

I hope that helps!
-Vasia.

[1]:
https://github.com/apache/flink/blob/master/flink-libraries/flink-gelly-examples/src/main/java/org/apache/flink/graph/examples/SingleSourceShortestPaths.java#L115

On 28 April 2017 at 12:38, Kaepke, Marc <ma...@haw-hamburg.de> wrote:

> to summarize my question:
> Does Flink or Gelly offers an access to the edges of a single vertex?
> Or:
> I need a VertexTriplet and not an EdgeTriplet (graph.getTriplets())
>
> Thanks!
> Best,
> Marc
>
> > Am 27.04.2017 um 20:20 schrieb Kaepke, Marc <marc.kaepke@haw-hamburg.de
> >:
> >
> > Hi everyone,
> >
> > in Gelly I use the Scatter-Gather Iteration to create clusters depends
> on edge-values.
> >
> > During a superstep each vertex has to sum all edge values of its
> neighbors. The scatter and gather functions both works on one vertex.
> >
> > How can I get the out and in-going edges of each vertex?
> > Or
> > Does the iterations works with triplets and if: how?
> >
> >
> > Best,
> > Marc
>
>

Re: Graph iteration with triplets or access to edges

Posted by "Kaepke, Marc" <ma...@haw-hamburg.de>.
to summarize my question:
Does Flink or Gelly offers an access to the edges of a single vertex?
Or:
I need a VertexTriplet and not an EdgeTriplet (graph.getTriplets())

Thanks!
Best,
Marc

> Am 27.04.2017 um 20:20 schrieb Kaepke, Marc <ma...@haw-hamburg.de>:
> 
> Hi everyone,
> 
> in Gelly I use the Scatter-Gather Iteration to create clusters depends on edge-values.
> 
> During a superstep each vertex has to sum all edge values of its neighbors. The scatter and gather functions both works on one vertex. 
> 
> How can I get the out and in-going edges of each vertex? 
> Or
> Does the iterations works with triplets and if: how?
> 
> 
> Best,
> Marc