我有2个节点类型,其中TypeA将始终指向TypeB,TypeB没有出站边.
如何使用igraph将其指示为有向图?
http://igraph.org/python/doc/igraph.Graph-class.html# INIT
g = Graph(directed=True) g.add_vertices(2) g.add_edges([(0,1)]) g.degree(mode="in") # -> [0, 1] g.degree(mode="out") # -> [1, 0]