Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Preserve vertex labels after deleting a vertex. #1587

Open
rachithaiyappa opened this issue Aug 25, 2021 · 1 comment
Open

Preserve vertex labels after deleting a vertex. #1587

rachithaiyappa opened this issue Aug 25, 2021 · 1 comment

Comments

@rachithaiyappa
Copy link

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?

@rachithaiyappa rachithaiyappa changed the title Request to preserve vertex labels when deleting a vertex. Preserve vertex labels when deleting a vertex. Aug 25, 2021
@rachithaiyappa rachithaiyappa changed the title Preserve vertex labels when deleting a vertex. Preserve vertex labels after deleting a vertex. Aug 25, 2021
@etiennedeg
Copy link

etiennedeg commented Aug 26, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants