is_threshold_graph#

is_threshold_graph(G)[源代码]#

返回 True 如果 G 是一个阈值图。

参数
G网络X图形实例

的一个实例 GraphDiGraphMultiGraphMultiDiGraph

返回
布尔尔

True 如果 G 是一个阈值图, False 否则。

工具书类

1

阈值图:https://en.wikipedia.org/wiki/Threshold_图形

实例

>>> from networkx.algorithms.threshold import is_threshold_graph
>>> G = nx.path_graph(3)
>>> is_threshold_graph(G)
True
>>> G = nx.barbell_graph(3, 3)
>>> is_threshold_graph(G)
False