Returns a threshold subgraph that is close to largest in `G`. The threshold graph will contain the largest degree node in G. Parameters ---------- G : NetworkX graph instance An instance of `Graph`, or `MultiDiGraph` create_using : NetworkX graph class or `None` (d
(G, create_using=None)
| 371 | |
| 372 | @nx._dispatchable(returns_graph=True) |
| 373 | def find_threshold_graph(G, create_using=None): |
| 374 | """ |
| 375 | Returns a threshold subgraph that is close to largest in `G`. |
| 376 | |
| 377 | The threshold graph will contain the largest degree node in G. |
| 378 | |
| 379 | Parameters |
| 380 | ---------- |
| 381 | G : NetworkX graph instance |
| 382 | An instance of `Graph`, or `MultiDiGraph` |
| 383 | create_using : NetworkX graph class or `None` (default), optional |
| 384 | Type of graph to use when constructing the threshold graph. |
| 385 | If `None`, infer the appropriate graph type from the input. |
| 386 | |
| 387 | Returns |
| 388 | ------- |
| 389 | graph : |
| 390 | A graph instance representing the threshold graph |
| 391 | |
| 392 | Examples |
| 393 | -------- |
| 394 | >>> from networkx.algorithms.threshold import find_threshold_graph |
| 395 | >>> G = nx.barbell_graph(3, 3) |
| 396 | >>> T = find_threshold_graph(G) |
| 397 | >>> T.nodes # may vary |
| 398 | NodeView((7, 8, 5, 6)) |
| 399 | |
| 400 | References |
| 401 | ---------- |
| 402 | .. [1] Threshold graphs: https://en.wikipedia.org/wiki/Threshold_graph |
| 403 | """ |
| 404 | return threshold_graph(find_creation_sequence(G), create_using) |
| 405 | |
| 406 | |
| 407 | @nx._dispatchable |
nothing calls this directly
no test coverage detected
searching dependent graphs…