本文簡要介紹
networkx.DiGraph.number_of_nodes
的用法。用法:
DiGraph.number_of_nodes()
返回圖中的節點數。
- nnodes:int
圖中的節點數。
返回:
例子:
>>> G = nx.path_graph(3) # or DiGraph, MultiGraph, MultiDiGraph, etc >>> G.number_of_nodes() 3
相關用法
- Python NetworkX DiGraph.number_of_edges用法及代碼示例
- Python NetworkX DiGraph.nodes用法及代碼示例
- Python NetworkX DiGraph.__contains__用法及代碼示例
- Python NetworkX DiGraph.to_directed用法及代碼示例
- Python NetworkX DiGraph.in_degree用法及代碼示例
- Python NetworkX DiGraph.out_degree用法及代碼示例
- Python NetworkX DiGraph.add_edges_from用法及代碼示例
- Python NetworkX DiGraph.edge_subgraph用法及代碼示例
- Python NetworkX DiGraph.adjacency用法及代碼示例
- Python NetworkX DiGraph.remove_nodes_from用法及代碼示例
- Python NetworkX DiGraph.has_edge用法及代碼示例
- Python NetworkX DiGraph.out_edges用法及代碼示例
- Python NetworkX DiGraph.add_weighted_edges_from用法及代碼示例
- Python NetworkX DiGraph.__iter__用法及代碼示例
- Python NetworkX DiGraph.has_node用法及代碼示例
- Python NetworkX DiGraph.size用法及代碼示例
- Python NetworkX DiGraph.add_edge用法及代碼示例
- Python NetworkX DiGraph.get_edge_data用法及代碼示例
- Python NetworkX DiGraph.clear用法及代碼示例
- Python NetworkX DiGraph.copy用法及代碼示例
- Python NetworkX DiGraph.remove_node用法及代碼示例
- Python NetworkX DiGraph.add_node用法及代碼示例
- Python NetworkX DiGraph.subgraph用法及代碼示例
- Python NetworkX DiGraph.degree用法及代碼示例
- Python NetworkX DiGraph.__len__用法及代碼示例
注:本文由純淨天空篩選整理自networkx.org大神的英文原創作品 networkx.DiGraph.number_of_nodes。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。