pub struct Ellipsoid { /* private fields */ }Expand description
Axis-aligned ellipsoid: center c with per-axis semi-axes a_i > 0.
A point p is inside iff sum_i ((p_i - c_i) / a_i)^2 <= 1. The anisotropic
region type: an ellipsoid is a Gaussian/covariance concept whose extent
differs per dimension (a Ball is the special case a_i = r).
Point queries (contains, distance_to_point, log_volume) are exact;
the region-to-region predicates use the axis-aligned bounding box [c - a, c + a] as a tractable approximation (exact ellipsoid-ellipsoid containment
and intersection volume have no closed form).
Implementations§
Trait Implementations§
Source§impl Region for Ellipsoid
impl Region for Ellipsoid
Source§fn distance_to_point(&self, point: &[f32]) -> f32
fn distance_to_point(&self, point: &[f32]) -> f32
Minimum L2 distance from
point to the region surface.
Returns 0.0 if the point is inside the region.Source§fn contains(&self, point: &[f32]) -> bool
fn contains(&self, point: &[f32]) -> bool
Whether
point lies inside (or on the boundary of) this region.Source§fn bounding_ball(&self) -> (Vec<f32>, f32)
fn bounding_ball(&self) -> (Vec<f32>, f32)
A ball
(center, radius) that encloses this region. Read moreSource§fn contains_region(&self, other: &Self) -> bool
fn contains_region(&self, other: &Self) -> bool
Source§fn overlaps_region(&self, other: &Self) -> bool
fn overlaps_region(&self, other: &Self) -> bool
Source§fn log_volume(&self) -> f32
fn log_volume(&self) -> f32
Natural log of the region’s volume. Read more
Source§fn entailment_prob(&self, other: &Self) -> f32
fn entailment_prob(&self, other: &Self) -> f32
The probability that
self subsumes other, P(self ⊒ other) = vol(self ∩ other) / vol(other). Read moreAuto Trait Implementations§
impl Freeze for Ellipsoid
impl RefUnwindSafe for Ellipsoid
impl Send for Ellipsoid
impl Sync for Ellipsoid
impl Unpin for Ellipsoid
impl UnsafeUnpin for Ellipsoid
impl UnwindSafe for Ellipsoid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more