obnb icon indicating copy to clipboard operation
obnb copied to clipboard

Create `remove_node`(s) method for graph objects

Open RemyLau opened this issue 2 years ago • 0 comments

This is challenging because the naive implementation will be very computationally expensive as everytime node is removed, all the edge data need to be modified due to the indexing.

One idea to work around this is to implement another list of index that maps from the apparent index to the true index. In this way, the we don't need to update the edge data index right away. But an important caution is to make sure we do this consistently! For example, the edge count function must be able to understand this.

After this has been implemented, implement a cleanup function to clean up deprecated nodes and realign the true and apparent index arrays.

RemyLau avatar Aug 25 '22 00:08 RemyLau