Crate wsp[][src]

Expand description

Rust implementation of the WSP space filling algorithm.

Provides an implementation of the WSP algorithm. Creates a point set of randomly sampled points and runs the algorithm to remove points too close to each other. The resulting set (usually) contains less points than the original set, ensuring that all remaining points are fat enough from each other according to a minimal distance set by the user.

The crate also provides another function to dynamically adjust the minimal distance to target a specific number of resulting points in the point set.

Structs

Internal representation of the WSP algorithm values. It is needed for the computation and to store information about the resulting point set.

Functions

This is an adaptive version of the WSP algorithm. The traditional algorithm requires a d_min and based on that we obtain a set of a given number of points. Here we adaptively change d_min to get (an approximation of) the desired number of points active after the algorithm.

Executes the WSP space filling algorithm according to the paper. (Pseudo-)randomly chooses an origin, and removes all points too close to it according to the d_min value of the PointSet structure. Then, the new origin is the closest valid point from the old origin. The algorithm iterates like this until all points have been visited or removed.