iqm.benchmarks.utils.get_neighbors_of_edges

iqm.benchmarks.utils.get_neighbors_of_edges#

iqm.benchmarks.utils.get_neighbors_of_edges(edges: Sequence[Sequence[int]], graph: Sequence[Sequence[int]]) Set[int]#

Given a Sequence of edges and a graph, return all neighboring nodes of the edges.

Parameters:
  • edges (Sequence[Sequence[int]]) – A sequence of pairs of integers, representing edges of a graph.

  • graph (Sequence[Sequence[int]]) – The input graph specified as a sequence of edges (Sequence[int]).

Returns:

list of all neighboring nodes of the input edges.

Return type:

Sequence[int]