- (graph-neighbours (G <multidigraph>) vertex)method
- (graph-neighbours (G <multigraph>) vertex)method
- (graph-neighbours (G <digraph>) vertex)method
- (graph-neighbours (G <graph>) vertex)method
Returns the set or multiset of adjacent vertices to the provided vertex. If called with a multigraph type, the multiset contains pair-lists with the adjacent vertex identifier as well as the unique id field for each edge. E.g. if vertex a has two edges to b, labeled with id 1 and 2 respectively, the multiset returned will be {(b 1) (b 2)}. If this was instead a regular graph, then the returned set would be {b}.
- G
- the graph to search neighbours within
- vertex
- the vertex whose neighbours you wish to receive
NOTE: raises an error if the vertex does not exist.