I guess you are trying to get the neighborhood of an specific vertex, like a "Gather" operation. 'tripleapply' is an edge based computation abstraction, so you cannot do "getedges" in side an edge apply function.
But all gather operations can be implemented using 'tripleapply'. For example, counting the degree of each vertex is the simplest gather operation, and we have example code of how to do that using tripleapply.
Degree is one example of neighborhood summary statistics, which can be cheaply computed and stored. If you really want to access the 'raw' neighborhood, you can use triple_apply to implement a similar gather like following:
g.vertices['neighborlist'] = gl.SArray.fromconst(, len(g.vertices))
def gatherneighborid(src, edge, dst):
return src, edge, dst
g = g.tripleapply(gatherneighborid, ['neighbor_list'])
But remember, the size of neighborhood of some vertices maybe very large, especially in the social network, and it could require significant memory/disk to keep the 'neighbor_list' field.