class documentation
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() 详情请见。 |