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, ...}wherevis a node in a graph andNvis the neighbors ofvas an set.- Return type: