Remove all neighbors of a vertex

classic Classic list List threaded Threaded
2 messages Options
Max
Reply | Threaded
Open this post in threaded view
|

Remove all neighbors of a vertex

Max
I have a Graph with 20 vertices, i.e. the index is 0, 1, 2,...19. Vertex with
index 12 is connected with all other vertices except 3 and 15. I want to
remove vertex 12 and all its neighbors, that is I want to keep 3 and 5 in
the graph. What should I do? I tried the remove_vertex() API, it seems there
is something wrong. I ask for help from You.



--
Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool
Reply | Threaded
Open this post in threaded view
|

Re: Remove all neighbors of a vertex

Tiago Peixoto
Administrator
Am 20.05.20 um 04:35 schrieb Max:
> I have a Graph with 20 vertices, i.e. the index is 0, 1, 2,...19. Vertex with
> index 12 is connected with all other vertices except 3 and 15. I want to
> remove vertex 12 and all its neighbors, that is I want to keep 3 and 5 in
> the graph. What should I do? I tried the remove_vertex() API, it seems there
> is something wrong. I ask for help from You.

Please explain what is wrong with minimal and self-contained example
that shows the problem.

--
Tiago de Paula Peixoto <[hidden email]>
_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool
--
Tiago de Paula Peixoto <tiago@skewed.de>