How to get the edges/neighbors of a vertex?

User 83 | 3/5/2014, 8:27:32 AM

I'm writing my own algorithm on GraphLab. When programming, I need to get all the edges (or neighbor vertices) of a given vertex (vertextype). However I found in the source code that the "inedges/outedges" methods of vertextype struct is not implemented. Is there some other way to get the edges or neighbors of a vertex?


User 6 | 3/5/2014, 9:34:11 AM

There are a few ways to do it in graphlab. One example is using the warp engine:

A second example is using the GAS (gather / apply / scatter) model:

User 83 | 3/5/2014, 10:34:06 AM

Well, thank you! But that's not what I want. Specifically, inside the gather function of GAS model, I need to get the mutual friends of the self-vertex and other vertex. To calculate the mutual friends, I need to get the neighbor lists of each vertex all at once. Then, I will use the mutual friends to do some other things in the gather function.

User 6 | 3/5/2014, 12:15:30 PM

In that case you should follow the undirected triangle counting example: which basically looks for joint neighbors of a node which has an edge between them.