LightGraphs.jl
LightGraphs.jl copied to clipboard
Preserve vertex labels after deleting a vertex.
https://github.com/JuliaGraphs/LightGraphs.jl/blob/ddaf3d37aed00b2b22705376bd79fba2c4bb6363/src/SimpleGraphs/SimpleGraphs.jl#L124-L153
The documentation says node labels (indices) are lost when a node is removed from the graph. Perhaps it might be helpful to have an option to preserve it?
The internal structure of the SimpleGraph
maintains the vertices to a compact range starting from 1. This is part of the API contract of a SimpleGraph, and some algorithms may use this property. So we can't change it as we would not know which algorithms would break.