-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logic of taking the subset within a given radius #8
Comments
The code is here. Just a DFS. I think it doesn't guarantee to find all nodes within a radius, but the nodes it finds should be ok. Lines 6 to 43 in 5f7fe55
|
Probably I should change DFS to BFS... |
Got you! Do I understand correctly that the current implementation will produce weird result in a quite common case of querying the subgraph around the path in the graph? |
I don't think so. The nodes gfatools brings should be correct. |
Maybe I am missing something, but it seems that if I ask for radius 3 then when I start with the first segment in the path I will reach the 4-th segment from it. Then 4-th segment will already be visited and we will not start the 'fresh' DFS from it, missing its neighbours. I can try to allocate some time next week to provide an example missing relevant vertices. |
gfatools may have false negatives, but it should not have false positives. If you can provide an example, I can explore BFS. Thanks. |
You are correct, it will not have false positives. If you think that false negatives are not a problem please close the issue :) |
Thanks for the confirmation. I will mark this as a question and close it. Nonetheless, I still want to come back to subgraph extraction at some point to address the false negative part. BFS sounds the better approach anyway. |
Dear @lh3,
Can you please provide a comment on how the subgraph extraction with a given radius works?
I tried using this function and was getting weird results. In particular the resulting graph had some non-branching paths that to the best of my knowledge shouldn't have been there and my own implementation wasn't producing them.
The text was updated successfully, but these errors were encountered: