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で行ってください。