#[non_exhaustive]pub struct VoronoiNd {
pub points: Vec<Vec<f64>>,
pub vertices: Vec<Vec<f64>>,
pub ridge_points: Vec<[usize; 2]>,
pub ridge_vertices: Vec<Vec<Option<usize>>>,
pub regions: Vec<Vec<Option<usize>>>,
pub furthest_site: bool,
}Expand description
The Voronoi diagram of points in any dimension (SciPy’s Voronoi), as the dual of the
Delaunay triangulation: one Voronoi vertex per Delaunay simplex (its circumcentre), one
region per input point, and one ridge per Delaunay edge (pair of neighbouring points).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.points: Vec<Vec<f64>>§vertices: Vec<Vec<f64>>§ridge_points: Vec<[usize; 2]>The pairs of input points that each ridge separates.
ridge_vertices: Vec<Vec<Option<usize>>>The Voronoi vertices of each ridge, with None for a vertex at infinity (SciPy’s −1).
regions: Vec<Vec<Option<usize>>>For each input point, the vertices of its region (unordered), with None if unbounded.
furthest_site: boolWhether this is the furthest-site diagram.
Implementations§
Source§impl VoronoiNd
impl VoronoiNd
pub fn new(points: &[Vec<f64>]) -> Result<VoronoiNd, ErrorsJSL>
Sourcepub fn new_furthest_site(points: &[Vec<f64>]) -> Result<VoronoiNd, ErrorsJSL>
pub fn new_furthest_site(points: &[Vec<f64>]) -> Result<VoronoiNd, ErrorsJSL>
The furthest-site Voronoi diagram (SciPy’s Voronoi(furthest_site=True)): the dual of the
furthest-site Delaunay triangulation, whose cells are the points of the plane (or space) for
which a given input point is the farthest. Only the vertices of the convex hull have a
region, and every region is unbounded; the other points get empty regions.
Sourcepub fn with_options(
points: &[Vec<f64>],
furthest_site: bool,
options: &QhullOptions,
) -> Result<VoronoiNd, ErrorsJSL>
pub fn with_options( points: &[Vec<f64>], furthest_site: bool, options: &QhullOptions, ) -> Result<VoronoiNd, ErrorsJSL>
As VoronoiNd::new or VoronoiNd::new_furthest_site with Qhull-style options.