Adjacent Neighbors

Topics: algorithm, graph
Nov 18, 2009 at 4:46 AM

I would like to find a vertex's adjacent neighbors. There doesn't seem to be a method I can use.

Perhaps I am using the wrong graph type, AdjacencyGraph. All I could find for this graph was outEdges() which returns a list of all edges.

Could someone point me to the appropriate graph type or method with which I can find the adjacent neighbors for a vertex?

Thank you,


Nov 29, 2009 at 1:42 AM

You want to use either an UndirectedGraph or a BiDirectionalGraph which provides fast access to in and out edges.