haskell - Which data structure to use when implementing Birdson's Poisson-Disc Distribution -


I am trying to write a function which creates a set of digits (:: (float, float )) Use Hoskel by using POSON-disk delivery I am using Burden's algorithm .

Points are placed in a grid, it is not that once per cell is no more. By doing so, the closest neighbor problem decreases from o (n) to o (1) .

My question is, what kind of data structure should be used for this grid. Javascript uses unstable arrays and for-loops, because it is essential to do the languages. I can use this approach to vectors but I think that there may be a better functional data structure.

What structure might be suitable for this grid? Is this the place to use commodities ?

For the closest neighbor problem, Voronio has a general structure in the name of the diagram. From the point of view on that diagram, you can find the closest neighbor in O (Log N). I think o (1) is impossible unless there is some other special feature for your problem. For point placement, you can use the series method of the Adelsbruner, or the continuous binary search tree by the sweatator and sage. Hope you can get some implementation in you, you can also apply these algorithms and data structures in javascript:.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -