NetworkX 1.5#

发布日期:2011年6月4日

亮点#

新功能#

加权图算法#

许多“加权”图算法现在接受可选参数,用于指定哪个边属性应作为权重(默认='weight')(工单 https://networkx.lanl.gov/trac/ticket/509

在某些情况下,参数名称从 weighted_edges 或 weighted 更改为 weight。以下是如何指定算法中使用的边属性:

  • 使用 weight=None 表示所有权重相等(无权情况)

  • 使用 weight=True 或 weight='weight' 来使用 'weight' 边属性

  • 使用 weight='other' 来使用 'other' 边属性

受影响的算法有:

betweenness_centrality, closeness_centrality, edge_betweenness_centrality, betweenness_centrality_subset, edge_betweenness_centrality_subset, betweenness_centrality_source, load, closeness_vitality, weiner_index, spectral_bipartivity current_flow_betweenness_centrality, edge_current_flow_betweenness_centrality, current_flow_betweenness_centrality_subset, edge_current_flow_betweenness_centrality_subset, laplacian, normalized_laplacian, adj_matrix, adjacency_spectrum, shortest_path, shortest_path_length, average_shortest_path_length, single_source_dijkstra_path_basic, astar_path, astar_path_length

随机几何图#

随机几何图生成器已简化。它不再支持 create_using、repel 或 verbose 参数。新增了一个可选的 pos 关键字,用于指定节点位置。

错误修复#