pub fn voronoi(
points: &ArrayView2<'_, f64>,
furthestsite: bool,
) -> SpatialResult<Voronoi>Expand description
Compute a Voronoi diagram from a set of points
§Arguments
points- Input points, shape (npoints, n_dim)furthestsite- Whether to compute a furthest-site Voronoi diagram (default: false)
§Returns
- Result containing a Voronoi diagram or an error
§Examples
use scirs2_spatial::voronoi::voronoi;
use ndarray::array;
let points = array![
[0.0, 0.0],
[1.0, 0.0],
[0.0, 1.0],
[1.0, 1.0]
];
let vor = voronoi(&points.view(), false).unwrap();