【发布时间】:2016-04-12 05:26:12
【问题描述】:
同上..我在 NetworkX 文档中找不到任何内容...
在 Python Igraph 中,我可以使用:
import igraph as ig
G = ig.Graph(directed=True)
G.add_vertices(2)
G.add_edge(0,1)
eid = G.get_eid(0,1)
edge = G.es[eid]
nodes = (edge.source, edge.target)
print nodes
【问题讨论】:
-
如果你能提供更多关于你想要什么的信息,那将更容易回答你的问题。你的出发点是什么?有向边?
-
@Joel:见上面的编辑 ;-)
标签: python graph nodes networkx edges