is_threshold_graph#

is_threshold_graph(G)[源代码]#

如果 G 是阈值图,则返回 True

参数:
GNetworkX 图实例

Graph、DiGraph、MultiGraph 或 MultiDiGraph 的实例

返回值:
bool

如果 G 是阈值图,则返回 True,否则返回 False

参考

示例

>>> 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