Home > other >  Questions about networkxnx. Add_edge () parameters
Questions about networkxnx. Add_edge () parameters

Time:09-19

As follows:
 & gt;> G=nx. MultiDiGraph () 
> G.a dd_edge (1, 2, weight=3)
> G.a dd_edge (1, 2, key=0, weight=4) # update data for key=0
> G.a dd_edge (1, 3, weight=7, capacity=15, length=342.7)

This is my official documentation from https://networkx.github.io/documentation/networkx-1.9/reference/generated/networkx.MultiDiGraph.add_edge.html see example,

But don't know the parameters of the third line of code inside the key role, it explained: "the key: hashable identifier, optional (default=lowest unused integer)

2 distinguish multiedges between a pair of nodes ", but still don't understand what is the relationship and hash identifier, everybody can, for example?
  • Related