pub struct SpatialConfig {
pub coverage_samples: usize,
pub exclusivity_samples: usize,
pub voronoi_samples: usize,
}Expand description
Monte Carlo sample counts for SpatialQuality::compute.
These run once at build time. Higher = more precise but slower.
Fields§
§coverage_samples: usizeSamples used to estimate what fraction of S² is covered by any
category’s cap. Higher = tighter coverage estimate. Default
100_000 → ~50ms at 31 categories.
exclusivity_samples: usizeSamples used per category to estimate its cap exclusivity (the
fraction of its cap not overlapped by any other category).
Runs n_categories times so cost scales linearly with C.
Default 30_000 per category.
voronoi_samples: usizeSamples used to estimate the spherical Voronoi tessellation over
category centroids. Higher = tighter per-cell area estimates.
Default 100_000 → ~100ms at 31 centroids.
Trait Implementations§
Source§impl Clone for SpatialConfig
impl Clone for SpatialConfig
Source§fn clone(&self) -> SpatialConfig
fn clone(&self) -> SpatialConfig
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 moreSource§impl Debug for SpatialConfig
impl Debug for SpatialConfig
Source§impl Default for SpatialConfig
impl Default for SpatialConfig
Source§impl<'de> Deserialize<'de> for SpatialConfigwhere
SpatialConfig: Default,
impl<'de> Deserialize<'de> for SpatialConfigwhere
SpatialConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SpatialConfig
impl RefUnwindSafe for SpatialConfig
impl Send for SpatialConfig
impl Sync for SpatialConfig
impl Unpin for SpatialConfig
impl UnsafeUnpin for SpatialConfig
impl UnwindSafe for SpatialConfig
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<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>
Converts
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>
Converts
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