Skip to main content
IBM Quantum Platform
번역 정보

이 페이지의 추가 언어 번역이 곧 제공될 예정입니다.

get_clusters

samplomatic.graph_utils.get_clusters(graph: PyDiGraph[T, S], filter_fn: Callable[[T], bool]) → Iterator[list[int]]

GitHub

Yield lists of nodes that all pass the filter and are connected in the graph.

Parameters

  • graph – The graph to search.
  • filter_fn – A filter function acting on node data that returns booleans.

Yields

Lists of nodes, where each list is a maximal weakly connected set of nodes that all pass the filter.

이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.