Skip to content
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

What's the reason for the duplication of the data in voronoi.vectors? #102

Closed
vchizhov opened this issue Feb 12, 2020 · 1 comment
Closed
Labels
question Further information is requested

Comments

@vchizhov
Copy link

vchizhov commented Feb 12, 2020

Why does voronoi.vectors duplicate the rays on the hull? It should be enough to just store a ray once per hull edge, then we can access the rays at hull vertex i through hull[i] and hull[i+1].

EDIT: In fact the description An Uint64Array [vx0, vy0, wx0, wy0, …] is misleading, as instead it is a Float64Array, and the rays are not even quadruples per vertex, instead it seems like the construction of the rays simply does redundant overwrites of possibly previously filled in rays.

@mourner mourner added the question Further information is requested label Feb 12, 2020
@Fil
Copy link
Member

Fil commented May 28, 2020

I'm not sure how to answer your question, please feel free to send a PR with optimized code. And I've now fixed the mistake in the README, thank you for the report.

@Fil Fil closed this as completed May 28, 2020
Fil added a commit that referenced this issue May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
3 participants