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 (vertex*type). However I found in the source code that the "in*edges/out*edges" methods of vertex*type 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: http://docs.graphlab.org/using*warp*graph*vertex*program.html#using*warp*graph*vertex*program_updatefn

A second example is using the GAS (gather / apply / scatter) model:
http://docs.graphlab.org/using*graphlab*distributed*graph*vertex_program.html

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: https://github.com/graphlab-code/graphlab/blob/master/toolkits/graph*analytics/simple*undirected*triangle*count.cpp
which basically looks for joint neighbors of a node which has an edge between them.