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

[BUG] #1591

Open
lindapamg opened this issue Sep 5, 2021 · 4 comments
Open

[BUG] #1591

lindapamg opened this issue Sep 5, 2021 · 4 comments
Labels
bug confirmed bug producing incorrect results

Comments

@lindapamg
Copy link

loss some edges when I use biconnected_components function

start=[1,1,2,2,2,3,4,4,5,5,7,7,8,8,9,9,10,10,12,12,1,2,3]
destination=[2,4,4,5,3,5,7,8,7,8,9,10,9,10,11,12,12,13,13,11,11,12,13]

graph_s=SimpleWeightedGraph(start,destination,collect(1:23))

bi_components= biconnected_components(graph_s)

image

image

loss four edges

@lindapamg lindapamg added the bug confirmed bug producing incorrect results label Sep 5, 2021
@etiennedeg
Copy link

The error is here : the edge is added only if state.low[v] > state.depth[w], whereas it should be always added to the stack. I can make a PR, but I have an interrogation: Why do we return the biconnected components by their edges? As the subgraphs are induced, this is more easily defined by the vertices. Is there a good reason to do that, or would it be too breaking to change this behavior?

@lindapamg
Copy link
Author

Because I want to gain biconnected_components with edges to remove some unwanted edges. So , How can we solve this problem(error)?

@lindapamg
Copy link
Author

The error is here : the edge is added only if state.low[v] > state.depth[w], whereas it should be always added to the stack. I can make a PR, but I have an interrogation: Why do we return the biconnected components by their edges? As the subgraphs are induced, this is more easily defined by the vertices. Is there a good reason to do that, or would it be too breaking to change this behavior?

Thank you for you reply this problem.

@etiennedeg
Copy link

My response is mainly intended to contributors of LightGraphs, and does not actually gives you an easy workaround for the problem. It seems that at the moment, the committers are not very active, but this is probably a consequence of summer vacations. So I can't exactly tell you when this will be fixed. If you need a workaround quickly, you can either modify directly the package (following the fix I described), or copy the biconnected_components in your code and override it with the fix.

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

No branches or pull requests

2 participants