This page is documentation for a DEVELOPMENT / PRE-RELEASE version.
Switch to stable version
安装
教程
参考文献
释放
开发商
绘图示例
Guides
Home Page
GitHub
v2.8
devel (latest)
current (stable)
介绍
图形类型
算法
功能
学位
degree_histogram
密度
信息
create_empty_copy
is_directed
to_directed
to_undirected
is_empty
add_star
add_path
add_cycle
子图
subgraph_view
induced_subgraph
restricted_view
reverse_view
edge_subgraph
节点
number_of_nodes
邻里
all_neighbors
non_neighbors
common_neighbors
边
number_of_edges
密度
non_edges
selfloop_edges
number_of_selfloops
nodes_with_selfloops
is_weighted
is_negatively_weighted
set_node_attributes
get_node_attributes
set_edge_attributes
get_edge_attributes
is_path
path_weight
冰冻
is_frozen
图形生成器
线性代数
转换为其他数据格式或从其他数据格式转换
重新标记节点
读写图表
绘图
随机性
例外情况
公用事业
术语表
path_weight
#
path_weight
(
G
,
path
,
weight
)
[源代码]
#
返回与指定路径和权重相关联的总成本
参数
G
图表
网络X图。
path: list
定义要遍历的路径的节点标注列表
weight: string
指示要将哪个边属性用于路径成本的字符串
返回
成本:整型或浮点型
表示相对于指定路径的指定权重的总成本的整数或浮点数
加薪
NetworkXNoPath
如果指定的边缘不存在。