#[non_exhaustive]pub struct ConvexHullNd {
pub points: Vec<Vec<f64>>,
pub simplices: Vec<Vec<usize>>,
pub equations: Vec<Vec<f64>>,
pub neighbors: Vec<Vec<usize>>,
pub vertices: Vec<usize>,
pub facet_groups: Vec<Vec<usize>>,
pub volume: f64,
pub area: f64,
/* private fields */
}Expand description
The convex hull of points in any dimension d ≥ 2 (SciPy’s ConvexHull), with simplicial
facets. Points within a small tolerance of a facet are treated as inside.
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>>§simplices: Vec<Vec<usize>>Each facet as d point indices (SciPy’s simplices).
equations: Vec<Vec<f64>>Each facet’s hyperplane [n, b] with outward unit normal n and n·x + b ≤ 0 inside
(SciPy’s equations).
neighbors: Vec<Vec<usize>>For each facet, the facets across the ridges opposite each of its vertices.
vertices: Vec<usize>The hull’s vertices, sorted (SciPy’s vertices is in counter-clockwise order in 2-D).
facet_groups: Vec<Vec<usize>>The hull’s facets as Qhull sees them after merging: for each facet of the polytope (all the
coplanar pieces of a cube’s face, say), the indices into simplices of the simplices that
triangulate it. A facet that is already a simplex has one entry.
volume: f64The d-volume enclosed and the (d − 1)-volume of the boundary.
area: f64Implementations§
Source§impl ConvexHullNd
impl ConvexHullNd
pub fn new(points: &[Vec<f64>]) -> Result<ConvexHullNd, ErrorsJSL>
Sourcepub fn with_options(
points: &[Vec<f64>],
options: &QhullOptions,
) -> Result<ConvexHullNd, ErrorsJSL>
pub fn with_options( points: &[Vec<f64>], options: &QhullOptions, ) -> Result<ConvexHullNd, ErrorsJSL>
As ConvexHullNd::new with Qhull-style options (see QhullOptions).
Sourcepub fn add_points(&mut self, new: &[Vec<f64>]) -> Result<(), ErrorsJSL>
pub fn add_points(&mut self, new: &[Vec<f64>]) -> Result<(), ErrorsJSL>
Adds points (SciPy’s add_points): the new points get the next indices. The hull is grown
from its current state, as Quickhull does: only the new points that lie outside it are
added, each replacing the facets it sees, and nothing is recomputed for the rest. The hull
is that of the union (the order of the simplices may differ from a fresh computation).