类文档
class Edge
表示图中单个边的类。
边通过它的索引引用,因此如果底层图发生更改,边的对象语义也可能会更改(如果在原始图中更改了边的索引)。
边的属性可以通过将边用作哈希来访问
>>> e["weight"] = 2 #doctest: +SKIP >>> print(e["weight"]) #doctest: +SKIP 2
方法 | attribute |
返回边的属性名称列表 |
方法 | attributes |
返回边的属性名称和值的字典 |
方法 | count |
代理方法到 Graph.count_multiple() |
方法 | delete |
代理方法到 Graph.delete_edges() |
方法 | is |
代理方法到 Graph.is_loop() |
方法 | is |
代理方法到 Graph.is_multiple() |
方法 | is |
代理方法到 Graph.is_mutual() |
方法 | update |
从字典/可迭代对象 E 和 F 更新边的属性。 |
代理方法到 Graph.count_multiple()
此方法调用 Graph
类的 count_multiple 方法,并将此边作为第一个参数,并返回结果。
参见 | |
Graph.count_multiple() 了解详情。 |
代理方法到 Graph.delete_edges()
此方法调用 Graph
类的 delete_edges 方法,并将此边作为第一个参数,并返回结果。
参见 | |
Graph.delete_edges() 了解详情。 |
代理方法到 Graph.is_multiple()
此方法调用 Graph
类的 is_multiple 方法,并将此边作为第一个参数,并返回结果。
参见 | |
Graph.is_multiple() 了解详情。 |