`class Edge:`

Class representing a single edge in a graph.

The edge is referenced by its index, so if the underlying graph changes, the semantics of the edge object might change as well (if the edge indices are altered in the original graph).

The attributes of the edge can be accessed by using the edge as a hash:

>>> e["weight"] = 2 #doctest: +SKIP >>> print(e["weight"]) #doctest: +SKIP 2

Method | `attribute` |
Returns the list of edge attribute names |

Method | `attributes` |
Returns a dict of attribute names and values for the edge |

Method | `count` |
Proxy method to `Graph.count_multiple()` |

Method | `delete` |
Proxy method to `Graph.delete_edges()` |

Method | `is` |
Proxy method to `Graph.is_loop()` |

Method | `is` |
Proxy method to `Graph.is_multiple()` |

Method | `is` |
Proxy method to `Graph.is_mutual()` |

Method | `update` |
Updates the attributes of the edge from dict/iterable E and F. |

Proxy method to `Graph.count_multiple()`

This method calls the count_multiple method of the `Graph`

class with this edge as the first argument, and returns the result.

See Also | |

`Graph.count_multiple()` for details. |

Proxy method to `Graph.delete_edges()`

This method calls the delete_edges method of the `Graph`

class with this edge as the first argument, and returns the result.

See Also | |

`Graph.delete_edges()` for details. |

Proxy method to `Graph.is_loop()`

This method calls the is_loop method of the `Graph`

class with this edge as the first argument, and returns the result.

See Also | |

`Graph.is_loop()` for details. |

Proxy method to `Graph.is_multiple()`

This method calls the is_multiple method of the `Graph`

class with this edge as the first argument, and returns the result.

See Also | |

`Graph.is_multiple()` for details. |

Proxy method to `Graph.is_mutual()`

This method calls the is_mutual method of the `Graph`

class with this edge as the first argument, and returns the result.

See Also | |

`Graph.is_mutual()` for details. |

Updates the attributes of the edge from dict/iterable E and F.

If E has a `keys()` method, it does: `for k in E: self[k] = E[k]`. If E lacks a `keys()` method, it does: `for (k, v) in E: self[k] = v`. In either case, this is followed by: `for k in F: self[k] = F[k]`.

This method thus behaves similarly to the `update()` method of Python dictionaries.