Skip to content

DeleteEdge: remove tail from parent list of head vertex#34

Open
svrana wants to merge 1 commit intogoombaio:masterfrom
svrana:deleteEdge-fix
Open

DeleteEdge: remove tail from parent list of head vertex#34
svrana wants to merge 1 commit intogoombaio:masterfrom
svrana:deleteEdge-fix

Conversation

@svrana
Copy link
Copy Markdown

@svrana svrana commented Jun 11, 2019

Makes DeleteEdge the inverse of AddEdge

Description

AddEdge updates the children and parents set of the head and tail vertex, while DeleteEdge only removes the edge from the children of the tail vertex. This makes it difficult to use DeleteEdge as it does not fully remove the edge from the dag. In order to implement a topological sort, I needed to first implement my own DeleteEdge which shouldn't be necessary.

Approach

Fix the glitch by updating the parent list of the headVertex.

I followed the existing code in DeleteEdge that searches the entire set before calling remove(), but this is redundant as OrderedSet will repeat the same operation afaict. I can adjust that if desired.

Makes DeleteEdge the inverse of AddEdge.
@Druid33
Copy link
Copy Markdown

Druid33 commented Aug 31, 2021

Hi,

i see this PR wait over 2 years to merge. Is this package still supported or not?
I used it in one project and found bug on removing Vertex. I thing about make bugfix, but if package is dead, its useless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants