[pyar] Sobre grafos, nodos y objetos

Jose Jachuf jjachuf en gmail.com
Lun Nov 8 12:13:34 ART 2010


Tordek,

ya entendí lo que me dijiste, en el mail anterior me parece que
respondí cualquiera.

Lo que me confunde es lo siguiente, según la documentación de networkx
para add_edge [1] si el nodo ya existe (basado en el __hash__),  no lo
agrega, por el contrario, si no existe, lo agrega.

* The nodes u and v will be automatically added if they are not
already in the graph.
* Nodes must be hashable (and not None) Python objects.

Jose

[1] http://networkx.lanl.gov/reference/generated/networkx.Graph.add_edge.html?highlight=add_edge



More information about the pyar mailing list