dwave.embedding.edgelist_to_adjacency#

edgelist_to_adjacency(edgelist)[source]#

Convert an iterator of edges to an adjacency dict.

Parameters:

edgelist (iterable) – An iterator over 2-tuples where each 2-tuple is an edge.

Returns:

The adjacency dict in the form {v: Nv, ...} where v is a node in a graph and Nv is the neighbors of v as an set.

Return type:

dict