-
Notifications
You must be signed in to change notification settings - Fork 14
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
handleOverweighted1 sometimes gets stuck in an infinite loop #10
Comments
I finally get the issue you're facing with this code const data = [
{
initialWeight: 1,
initialPos: [0, 0],
},
{
initialWeight: 4,
initialPos: [0.43038567576932785, 0.5019115451839844],
},
],
initialPositioner = function (d) {
return d.initialPos;
},
initialWeighter = function (d) {
return d.initialWeight;
},
voronoiMapSimulation = d3VoronoiMap
.voronoiMapSimulation(data)
.initialPosition(initialPositioner)
.initialWeight(initialWeighter)
.stop();
let res = voronoiMapSimulation.state(); As you mentioned, weights are indefinitely increasing. The The increase of the weights is at least equal to P.S.: |
I don't fully understand what this function does! But I found while processing large trees, sometimes this function loops forever.
For a test case, I logged the following mapPoints data after 10,000 iterations:
It seems to be endlessly increasing the weights without stopping.
Note if I switch to handleOverweightedVariant = 0 I don't have this problem (but I'm not sure what the implications of the two algorithms are)
The text was updated successfully, but these errors were encountered: