? 圖論
平均路徑長(zhǎng)度:所有可能節(jié)點(diǎn)對(duì)應(yīng)的最短路徑長(zhǎng)度的平均值
nexworkx
nx.from_edgelist (el,directed=TRUE)
el:邊列表志群,兩列矩陣秽梅,字符或者數(shù)字
directed:是否創(chuàng)建有向圖
nexworkx.find_cliques(G):搜索圖中最大團(tuán)
nx.core_network(graph)? #搜索節(jié)點(diǎn)最大k-core
nx.add_edge('頂點(diǎn)u","頂點(diǎn)v")? #向graph中添加邊
Graph.has_node(n)Return True if the graph contains the node n.
Graph.__contains__(n)Return True if n is a node, False otherwise.
Graph.has_edge(u, v)Return True if the edge (u,v) is in the graph.
Graph.order()Return the number of nodes in the graph.
Graph.number_of_nodes()Return the number of nodes in the graph.
Graph.__len__()Return the number of nodes.
Graph.degree([nbunch, weight])Return the degree of a node or nodes.
Graph.degree_iter([nbunch, weight])Return an iterator for (node, degree).
Graph.size([weight])Return the number of edges.
Graph.number_of_edges([u, v])Return the number of edges between two nodes.
Graph.nodes_with_selfloops()Return a list of nodes with self loops.
Graph.selfloop_edges([data, default])Return a list of selfloop edges.
Graph.number_of_selfloops()Return the number of selfloop edges.
作者:Forget_ever
鏈接:http://www.reibang.com/p/e543dc63454f
來源:簡(jiǎn)書
簡(jiǎn)書著作權(quán)歸作者所有爷狈,任何形式的轉(zhuǎn)載都請(qǐng)聯(lián)系作者獲得授權(quán)并注明出處。