pub enum SpatialConstraint {
Adjacency,
Distance {
radius: f64,
},
Grid {
rows: usize,
cols: usize,
},
Custom,
}Expand description
Spatial constraint types for spatial mixture models
Different types of spatial constraints can be applied to mixture models to incorporate spatial relationships and ensure spatial coherence in clustering.
Variants§
Adjacency
Adjacency-based spatial constraint using neighbor relationships
Uses topological adjacency to define spatial relationships. Neighboring spatial units influence each other’s cluster assignments.
Distance
Distance-based constraint with specified radius
Spatial units within a given distance radius influence each other. The radius parameter controls the spatial influence range.
Grid
Grid-based constraint for regular spatial patterns
Assumes data is arranged in a regular grid pattern. Neighboring grid cells influence each other based on grid topology.
Custom
Custom spatial constraint with user-defined relationships
Allows for arbitrary spatial relationship definitions. Users can provide custom spatial weights matrices.
Implementations§
Source§impl SpatialConstraint
impl SpatialConstraint
Sourcepub fn requires_coordinates(&self) -> bool
pub fn requires_coordinates(&self) -> bool
Check if the constraint requires coordinate information
Sourcepub fn requires_grid_dimensions(&self) -> bool
pub fn requires_grid_dimensions(&self) -> bool
Check if the constraint requires grid dimensions
Sourcepub fn constraint_name(&self) -> &'static str
pub fn constraint_name(&self) -> &'static str
Get a descriptive name for the constraint type
Trait Implementations§
Source§impl Clone for SpatialConstraint
impl Clone for SpatialConstraint
Source§fn clone(&self) -> SpatialConstraint
fn clone(&self) -> SpatialConstraint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SpatialConstraint
impl Debug for SpatialConstraint
Source§impl Default for SpatialConstraint
impl Default for SpatialConstraint
Source§impl PartialEq for SpatialConstraint
impl PartialEq for SpatialConstraint
impl StructuralPartialEq for SpatialConstraint
Auto Trait Implementations§
impl Freeze for SpatialConstraint
impl RefUnwindSafe for SpatialConstraint
impl Send for SpatialConstraint
impl Sync for SpatialConstraint
impl Unpin for SpatialConstraint
impl UnwindSafe for SpatialConstraint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more