-
Notifications
You must be signed in to change notification settings - Fork 182
Function to delete a bunch of vextexs at once #1043
Comments
I am currently using code like
Output:
|
Probably not the solution you are looking for, but you could just build the subgraph of non-isolated vertices. Something like
A |
Nice, I didn't know indexing did that. |
The proper way to get rid of a bunch of vertices at once is to use induced subgraphs, as @simonschoelly shows. There's no good/efficient way to do a |
The problem with the induced subgraphs that we have right now, is that they copy the graph which for large graphs uses a lot of memory. I see a legit use case for a function We even could have a flag |
PRs welcome. |
rem_vertex!
can remove 1 vertex.Which is fine.
But if you want to remove more than one vertex then it is really annoying to do so.
Since the ids will all change every time you remove one.
The text was updated successfully, but these errors were encountered: