pub struct AlphaComplex {
pub alpha: f64,
pub points: Vec<[f64; 3]>,
pub edges: Vec<[usize; 2]>,
pub triangles: Vec<[usize; 3]>,
}Expand description
Alpha complex / alpha shapes for point clouds.
An alpha complex is a subset of the Delaunay triangulation based on a circumradius threshold α.
Fields§
§alpha: f64Alpha parameter (circumradius threshold)
points: Vec<[f64; 3]>Points in the cloud
edges: Vec<[usize; 2]>Edges included at this alpha value
triangles: Vec<[usize; 3]>Triangles included at this alpha value
Implementations§
Source§impl AlphaComplex
impl AlphaComplex
Sourcepub fn new(points: Vec<[f64; 3]>, alpha: f64) -> Self
pub fn new(points: Vec<[f64; 3]>, alpha: f64) -> Self
Creates an alpha complex from a point cloud.
§Arguments
points- Point cloudalpha- Circumradius threshold (larger = more simplices)
Sourcepub fn n_components(&self) -> usize
pub fn n_components(&self) -> usize
Returns the number of connected components at this alpha.
Sourcepub fn to_simplicial_complex(&self) -> SimplicialComplex
pub fn to_simplicial_complex(&self) -> SimplicialComplex
Returns the simplicial complex at this alpha level.
Trait Implementations§
Source§impl Clone for AlphaComplex
impl Clone for AlphaComplex
Source§fn clone(&self) -> AlphaComplex
fn clone(&self) -> AlphaComplex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AlphaComplex
impl RefUnwindSafe for AlphaComplex
impl Send for AlphaComplex
impl Sync for AlphaComplex
impl Unpin for AlphaComplex
impl UnsafeUnpin for AlphaComplex
impl UnwindSafe for AlphaComplex
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.