I have a directed graph:
<Graph object, directed, with 61560 vertices and 42858 edges, edges filtered
by (<PropertyMap object with key type 'Edge' and value type 'bool', for
Graph 0x11a5e9190, at 0x11a5e96d0>, False), vertices filtered by
(<PropertyMap object with key type 'Vertex' and value type 'bool', for Graph
0x11a5e9190, at 0x11a5e9710>, False) at 0x11a5e9190>
I would like to get all in neighbors of a vertex, using the following codes:
for v in g.vertices():
print('')
print("vertex id:")
print(v)
print('all out neighbors')
print(g.get_out_neighbours(v))
print('all in neighbors')
print(g.get_in_neighbours(v))
print('all in edges')
print(g.get_in_edges(v))
raw_input()
Here's the console output:
vertex id:
0
all out neighbors
[18099]
all in neighbors
[0]
all in edges
[[1 0 1]]
Output from get_in_edges() suggests that the in neighbor should be vertex 1;
but get_int_neighbours() suggests that the in neighbors is itself. I am not
sure what's going wrong. Any help would be appreciated. Thanks a lot!
--
View this message in context:
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/get-in-neighbours-and-get-in-edges-output-do-not-match-tp4027336.html
Sent from the Main discussion list for the graph-tool project mailing list
archive at Nabble.com.
_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool