Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Deletion of joint subtrees in steinertree3 incomplete #3

Open
m-i-c-h-ael opened this issue Jan 28, 2023 · 0 comments
Open

Deletion of joint subtrees in steinertree3 incomplete #3

m-i-c-h-ael opened this issue Jan 28, 2023 · 0 comments

Comments

@m-i-c-h-ael
Copy link

Hi,
I believe there is an issue with the merging of non-disjoint subtrees in the steinertree3 function in steinertree.R (lines 261 and following):
I encountered a case where there is no overlap between my trees with i=1 and j=2. So j is increased to 3. In this case there was an overlap between the i=1 and j=3 trees. When j reaches the end of the subtree list, i is increased. The problem is that the tree at i=1 is not the same anymore than the one that has been tested against j=2 (because it has been merged with other trees), so the new i=1 and j=2 trees may actually overlap. In my case, this lead to an empty list when calculating 'nsubtrees', which cased an error.
A solution may be to not increase i in a loop where something has been merged into the corresponding tree. My code is too complex to share here, but I hope the explanation makes sense.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant